#37527 new Bug

MinimumLengthValidator error message is not translated to Czech (cs) when LANGUAGE_CODE = 'cs'

Reported by: bomot Owned by:
Component: contrib.auth Version: 6.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

# Description
When LANGUAGE_CODE is set to 'cs' (Czech) and USE_I18N = True (without LocaleMiddleware), the validation error message from MinimumLengthValidator ("This password is too short. It must contain at least %(min_length)d characters.") is rendered in English instead of Czech.

This reproduces both in standard Django forms (UserCreationForm) and with third-party packages like django-allauth.

# Steps to Reproduce

  1. Create a clean Django project.
  2. In settings.py, set LANGUAGE_CODE = 'cs' and USE_I18N = True. Ensure LocaleMiddleware is not in MIDDLEWARE (so browser Accept-Language headers do not interfere).
  3. Ensure django.contrib.auth.password_validation.MinimumLengthValidator is active in AUTH_PASSWORD_VALIDATORS.
  4. Render a registration/password form (e.g., UserCreationForm) and submit a password shorter than 8 characters.
  5. Inspect {{ form.password1.errors }} (or {{ form.password2.errors }}).

# Expected Behavior
The error message should be translated into Czech.

# Actual Behavior
The error message is rendered in English:
This password is too short. It must contain at least 8 characters.

# Environment

  • Django version: [6.1.3]
  • Python version: [3.14.10]

Thank you for developing and maintaining such a great framework!

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top