Opened 16 years ago
Closed 12 years ago
#7564 closed Uncategorized (fixed)
Translated string with unamed arguments
Reported by: | Marc Garcia | Owned by: | Tomáš Kopeček |
---|---|---|---|
Component: | Internationalization | Version: | newforms-admin |
Severity: | Normal | Keywords: | nfa-blocker |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When executing django/bin/make-messages.py on newforms-admin branch, next warnings are displayed:
errors happened while running xgettext on options.py ./contrib/admin/options.py:430: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments. ./contrib/admin/options.py:433: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments. ./contrib/admin/options.py:438: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named arguments, and a mapping instead of a tuple for the arguments.
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | gettext.diff added |
---|
comment:1 by , 16 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 by , 12 years ago
Easy pickings: | unset |
---|---|
Resolution: | fixed |
Severity: | → Normal |
Status: | closed → reopened |
Type: | → Uncategorized |
UI/UX: | unset |
System: Macbook Pro, Lion OS, Django 1.4, Python 2.7.3, xgettext 0.18.1
Still seeing the error:
Error: errors happened while running xgettext on models.py
./myproject/models.py:177: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
The translator cannot reorder the arguments.
Please consider using a format string with named arguments,
and a mapping instead of a tuple for the arguments.
This happens because xgettext will still throw a warning, which will be catch by the "if errors:" block in makemessages.py. Inside the block, we will then raise an exception, regardless of whether or not this error is a fatal error or not. Suggest fix to at least look at the error level (info,warning, error, etc.) and only raise an exception if the error is fatal.
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
If I understand it well, you are asking here to not raise an exception when xgettext emits warning only. Then please create a new ticket with this specific request, do not reopen old fixed issues.
Lines corrected, make-messages now doesn't complain.