Describe the bug
When using the Generate MO files addon, the resulting MO files when creating from monolingual PO files are incorrect. For the msgid, only the first character from the ID is taken and used. Also, every entry has a msgid_plural property, even though the original file does not have them. Moreover, the msgstr is array based, with only one entry (not sure if this last one is a problem).
I've included a snippet of the original .po file and the resulting .mo at the bottom of this issue.
This issue is very much related to this issue. We had that problem as well, and were eager to use the fix for the 3.6 version, but now we're encountering this problem. Though, the resulting problems in the MO files are different, hence creating a new issue instead of commenting on the linked one.
To Reproduce
Steps to reproduce the behavior (copied from the linked issue, because the steps are the same):
msgunfmt on the command line.Expected behavior
The resulting MO structure from the msgunfmt command should be identical (or functionally identical) to the original PO file.
Example file
Snippet from the PO file:
msgid "action.cancel.text"
msgstr "cancel"
msgid "action.confirm.text"
msgstr "confirm"
Snippet from the msgunfmt result of the MO file (with the same fields):
msgid "a"
msgid_plural "c"
msgstr[0] "cancel"
msgid "a"
msgid_plural "c"
msgstr[0] "confirm"
We just updated to 3.6 to check if the MO plugin was working again for us. Before it didn't, like I mentioned in my previously reported issue. Now it still doesn't because of this issue.
Thank you for your report, the issue you have reported has just been fixed.
@nijel I see you fixed it already, but the fix will be part of the 3.7 update which is due to June 15. Can you maybe release a bugfix update with this fix included (3.6.1)?
Yes, there will be 3.6.1 in few days.
Most helpful comment
Yes, there will be 3.6.1 in few days.