#34738 closed Bug (invalid)
Django admin doesn't translate error
Reported by: | Aleksandr Yudin | Owned by: | Aleksandr Yudin |
---|---|---|---|
Component: | contrib.admin | Version: | 4.2 |
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
Hello.
To reproduce the bug you need:
- Create an empty project with django 4.2
- Change the LANGUAGE_CODE setting to "ru-RU"
- Get error in admin panel "Please correct the error below." instead of "Пожалуйста, исправьте ошибки ниже."
In version 4.1.7 everything works correctly
Attachments (1)
Change History (6)
by , 17 months ago
comment:1 by , 17 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 17 months ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 17 months ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
When a simple string is converted to a plural with blocktranslate count, the language has to re-translate the string, gettext cannot reuse the previously "simple" string. So please complete the Russian translation on Transifex.
comment:4 by , 17 months ago
Triage Stage: | Accepted → Unreviewed |
---|
Thank you Claude! A TIL for me :-)
I can see now how, for example, the es
translation has the following for this case:
msgid "Please correct the error below." msgid_plural "Please correct the errors below." msgstr[0] "Por favor, corrija el siguiente error." msgstr[1] "Por favor, corrija los siguientes errores." msgstr[2] "Por favor, corrija los siguientes errores."
Note:
See TracTickets
for help on using tickets.
I can confirm there is something going on that may need further debugging. At first I thought this was a missing translation string, but I checked and the translation for
ru
is available. In fact, the following shows the translated string:But what's in the template:
does not use the translated string. Accepting for now, I'll debug more later today if no one beats me to it.