Opened 15 years ago

Closed 15 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: 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

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 django-admin.py makemessages under such platform:

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

#: .\conf\global_settings.py:44

msgid "Arabic"
msgstr "árabe"

#: .\conf\global_settings.py:45

msgid "Bulgarian"
msgstr "búlgaro"

#: .\conf\global_settings.py:46

msgid "Bengali"
msgstr "bengalí"

#: .\conf\global_settings.py:47

#, fuzzy
msgid "Bosnian"
msgstr "estonio"

#: .\conf\global_settings.py:48

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 by Jannis Leidel, 15 years ago

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