#30535: czech translations for "This password is too short. It must contain at
least %(min_length)d character." broken in django >= 2.1.0
----------------------------------------+------------------------
Reporter: Jakub Kaláb | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
----------------------------------------+------------------------
The plural czech translations for "This password is too short. It must
contain at least %(min_length)d character." are broken in django versions
2.1.0 and higher for n >= 5. Can be easily reproduced:
- create django project
- set LANGUAGE_CODE = 'cs-CZ' and USE_I18N = True
- open shell
- import django.utils.translation.ngettext
- run ngettext("This password is too short. It must contain at least
%(min_length)d character.", "This password is too short. It must contain
at least %(min_length)d characters.", 5) - returns original english
message instead of the localized one
Translations for n <= 4 work correctly.
I thing this bug was introduced in
https://github.com/django/django/commit/3e01aab5335394201701710d7fcd67f523878c5b
#diff-59a8943fbf4bd5fd330ef8d22e40bd3f , but am not completely sure, since
the commit was created after the 2.1.0 release. Could this be backported?
Frankly, I'm not even sure why this change was necessary - in czech there
are only 3 forms of the message needed - they differ in the last word
'znak' (which means character) thusly:
- 1 znak
- 2, 3, 4 znaky
- 5 and more znaků and also 0 znaků
I tested this behavior on python 3.6.8 and 3.7.3 and django 2.1.0 and
2.1.8.
--
Ticket URL: <https://code.djangoproject.com/ticket/30535>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.a10196927c685aabbb6769f7e3bcb9ae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.