Potential problem with GlotPress-generated MO files

Bug #1400878 reported by Данило Шеган
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
php-gettext
New
Medium
Unassigned

Bug Description

Nemanja Avramović reports that MO files generated by GlotPress sometimes cause weird trailing characters in translated strings.

In particular, he noticed it with the attached MO file when looking up a message like "Our Facebook" (see http://awesomescreenshot.com/07b4011v6c). When tested with poEdit-generated MO file, everything worked fine.

However, msgunfmt reads it correctly and generates a proper PO file that can then be converted to MO file (with eg. msgfmt) that's identical to the one generated from the source PO file directly.

Since GlotPress-generated MO file is shorter than the one generated with msgfmt, I am suspecting that the optimized hash table is missing and that php-gettext is not handling that case well.

Revision history for this message
Данило Шеган (danilo) wrote :
Revision history for this message
Данило Шеган (danilo) wrote :
description: updated
Revision history for this message
Nemanja Avramovic (avramyu) wrote :

As Danilo explained, some strings have some weird character at the end which I can not even copy/paste here. Attached is a ZIP with three files:

* spanish.po (exported from GlotPress)
* not-working.mo (exported from GlotPress, has these weird characters)
* working.mo (spanish.po opened and saved with poEdit, doesn't have them)

If you open spanish.po file and do a search for word "Buscar", fourth result is one of the affected:

msgid "Search title or reference ID"
msgstr "Buscar título o ID de referencia"

At first I thought only strings with non-English-alphabet characters make problems (note the "í" in "título") but there seems not to be any rule, some strings with only English alphabet letters have this problem too, while some work fine even though they have non-English characters.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.