Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#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.

Change History (2)

comment:1 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in r10081.

comment:2 by Malcolm Tredinnick, 16 years ago

This looks like a bug / un-feature in xgettext. Very annoying. :-(

Note: See TracTickets for help on using tickets.
Back to Top