Opened 8 years ago

Closed 8 years ago

#12783 closed (fixed)

makemessages creates broken .po files since r12296 when updating them under Windows

Reported by: Ramiro Morales Owned by: nobody
Component: Internationalization Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


In r12296 a migration from os.popen3() to subprocess.Popen() to drop Python 2.3 constructs was implemented.

Unfortunately this broke the updating (creating new files isn't affected) of message files because the files obtained don't have the standard format (This has been always a tricky area; we added a mode 't' argument to the popen3() calls back in r8576 to solve this kind of problems.)

An example of the Django own django.po when updating them with makemessages under such platform:

.po file header snipped
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms:  nplurals=2; plural=(n != 1);\n"

#: .\conf\

msgid "Arabic"
msgstr "árabe"

#: .\conf\

msgid "Bulgarian"
msgstr "búlgaro"

#: .\conf\

msgid "Bengali"
msgstr "bengalí"

#: .\conf\

#, fuzzy
msgid "Bosnian"
msgstr "estonio"

#: .\conf\

msgid "Catalan"
msgstr "catalán"

Note the extra empty lines between the location comments line and the msgid or flags line (it is actually caused by a mix of \r and \r\n sequences.)

This issue is fixed by the patch attached to #11869.

Change History (1)

comment:1 Changed 8 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

(In [12383]) Fixed #11869 - Prevent deadlocks when calling gettext utilities on Windows. Also fixes #12783. Thanks Ramiro Morales and soulburner.

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