To reproduce the bug you need:
1. Create an empty project with django 4.2
2. Change the LANGUAGE_CODE setting to "ru-RU"
3. Get error in admin panel "Please correct the error below." instead of
"Пожалуйста, исправьте ошибки ниже."
In version 4.1.7 everything works correctly
--
Ticket URL: <https://code.djangoproject.com/ticket/34738>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "4.2.PNG" added.
* owner: nobody => Aleksandr Yudin
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/34738#comment:1>
* stage: Unreviewed => Accepted
Comment:
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:
{{{
<p>{% blocktranslate %}Please correct the errors below.{%
endblocktranslate %}</p>
}}}
But what's in the template:
{{{
<p>{% blocktranslate count counter=errors|length %}Please correct the
error below.{% plural %}Please correct the errors below.{%
endblocktranslate %}</p>
}}}
does not use the translated string. Accepting for now, I'll debug more
later today if no one beats me to it.
--
Ticket URL: <https://code.djangoproject.com/ticket/34738#comment:2>
* status: assigned => closed
* resolution: => invalid
Comment:
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/34738#comment:3>
* stage: Accepted => Unreviewed
Comment:
Thank you Claude! A TIL for me :-)
I can see now how, for example, the `es` translation has
[https://github.com/django/django/blob/main/django/contrib/admin/locale/es/LC_MESSAGES/django.po
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."
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34738#comment:4>
Comment (by Aleksandr Yudin):
Thank you!
--
Ticket URL: <https://code.djangoproject.com/ticket/34738#comment:5>