xgettext warnings cause the makemessages command to raise an exception
|Reported by:||anonymous||Owned by:||claudep|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Related to ticket #7564, in that the messages thrown are the same.
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.
Change History (5)
comment:1 Changed 3 years ago by baokham.chau@…
- Needs documentation unset
- Needs tests unset
- Owner changed from baokham.chau@… to anonymous
- Patch needs improvement unset
comment:2 Changed 3 years ago by claudep
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Cleanup/optimization
comment:4 Changed 3 years ago by claudep
- Owner changed from anonymous to claudep
- Status changed from new to assigned