#10533 closed (fixed)
Invalid format specifiers for singular and plural forms
Reported by: | Jarek Zgoda | Owned by: | nobody |
---|---|---|---|
Component: | Translations | Version: | dev |
Severity: | 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
I seem to be unable to compile translation catalog for Polish language, I cann't find any reasonable cause. The problem is signaled by msgfmt as wrong format specifier. The problematic section is:
#: contrib/admin/options.py:745 #, python-format msgid "%(count)s %(singular)s was changed successfully." msgid_plural "%(count)s %(plural)s were changed successfully." msgstr[0] "%(count)s %(singular)s został zmieniony." msgstr[1] "%(count)s %(plural)s zostały zmienione." msgstr[2] "%(count)s %(plural)s zostało zmienionych."
The problematic line is msgstr[0]
. My msgfmt seems to not accept %(singular)s
as valid format specifier:
jarek:~/install/django/django$ LANG=C django-admin.py compilemessages -l pl processing file django.po in /Users/jarek/install/django/django/conf/locale/pl/LC_MESSAGES /Users/jarek/install/django/django/conf/locale/pl/LC_MESSAGES/django.po:378: a format specification for argument 'singular', as in 'msgstr[0]', doesn't exist in 'msgid' msgfmt: found 1 fatal error
If I change the specifier to %(plural)s
the compilation succeeds, but in a result plural form is used instead of singular.
Note:
See TracTickets
for help on using tickets.
Fixed in r10081.