django-admin makemessages generates new locales (LC_MESSAGES/django.po) with PO template markers
|Reported by:||Guttorm Flatabø||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||1.4|
|Severity:||Normal||Keywords:||gettext, translation, .po|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Newly generated locales files made by
django-admin makemessages have "#, fuzzy" before the fist empty translation entry before the header, thus composing:
#, fuzzy msgid "" msgstr ""
(If you remove the fuzzy marker manually it will not be re-added on later updates of the translation)
See example here. According to Translatewiki founder and administrator Nike this seems to be the only way of marking a po template file (apart from the "pot" file name ending). It can thus confuse applications and services such as translatewiki when a translation message file (django.po) looks like a template.
I have been unable to find an "official" mention of what defines a PO Template file, probably because there is none. However, this gettext guide seems to indicate the same kind of using "#, fuzzy" as a template marker.
The locale files made by django-admin makemessages are not supposed to be po template files, and I thus suggest that you try to produce them without the fuzzy marker on the line before the first empty entry (before the header).
I suppose the marker is added by the gettext tools used by django-admin makemessages and that the easiest solution is to have the string be removed as part of the script.
Change History (4)
comment:1 follow-up: 3 Changed 5 years ago by
|Patch needs improvement:||unset|
comment:3 Changed 5 years ago by
|Status:||new → closed|