#36691: Spanish translation missing for some error messages in Django 5.2.7
-------------------------------------+-------------------------------------
     Reporter:  Carlos Sánchez       |                     Type:  Bug
  López                              |                Component:
       Status:  new                  |  Internationalization
      Version:  5.2                  |                 Severity:  Normal
     Keywords:  translation,         |             Triage Stage:
  spanish, validation, obsolete      |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 ==== Expected behavior ====
 Email validation error should display in Spanish: "Introduzca una
 dirección de correo electrónico válida."

 ==== Actual behavior ====
 Error displays in English: "Enter a valid email address."

 Note: All other Django admin messages (form errors, labels, etc.)
 correctly display in Spanish.
 Only this specific email validation message appears in English.

 ==== Configuration ====
 - Django Version: 5.2.7
 - Python Version: 3.13
 - settings.py:
 {{{#!python
 ...
 MIDDLEWARE = [
    ...
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.locale.LocaleMiddleware',
     'django.middleware.common.CommonMiddleware',
     ...
 ]
 ...
 LANGUAGE_CODE = 'es'
 USE_I18N = True
 LANGUAGES = [('es', 'Spanish')]
 ...
 }}}

 ==== Investigation ====
 Confirmed the English string is still used in Django's validator:
 {{{
 $ grep -i "email" env/lib/python3.13/site-
 packages/django/core/validators.py | grep -i "message"
     message = _("Enter a valid email address.")
 }}}

 Checked Spanish locale file - translation exists but is marked as obsolete
 (`#~`):
 {{{
 $ grep -i "correo" env/lib/python3.13/site-
 packages/django/conf/locale/es/LC_MESSAGES/django.po
 #~ msgstr "Introduzca una dirección de correo electrónico válida."
 #~ msgstr "Correo electrónico"
 #~ msgstr "Introduzca una dirección de correo electrónico válida."
 #~ msgstr "Correo electrónico"
 }}}

 Confirmed no active (non-obsolete) translation exists:
 {{{
 $ grep -i "valid.*email" env/lib/python3.13/site-
 packages/django/conf/locale/es/LC_MESSAGES/django.po | grep -v "^#"
 # no results returned
 }}}

 Verified the compiled .mo file doesn't contain the translation:
 {{{
 $ msgunfmt env/lib/python3.13/site-
 packages/django/conf/locale/es/LC_MESSAGES/django.mo | grep -i "email"
 # no results returned
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36691>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019a2755e532-fec13113-2b5b-4f45-94e7-6e9372639212-000000%40eu-central-1.amazonses.com.

Reply via email to