After saving, the generated msgstr looks like this:
msgstr "Line 1\n
Line 2\n
Line 3"
Notice the missing quotes on each line, as well as the deleted "" that should be on the first line.
What is the expected correct behavior?
The expected msgstr should look like this:
msgstr ""
"Line 1\n"
"Line 2\n"
"Line 3"
Relevant logs and/or screenshots
Please note that even if you don't make any changes in the file, GitLocalize will re-save over existing multiline strings and break them. Example diff:
On very large files, this makes it so having to go over every single multiline string and fix it manually can be extremely tedious.
Possible fixes
GitLocalize should ideally follow the correct formatting for PO files. The generated files become invalid/corrupted. A good way to validate this is opening the resulting files with Poedit, which shows the errors:
Summary
When translating a multiline string in a POT/PO file, the
msgstr
generated isn't valid.Steps to reproduce
Translate a multiline string in a PO file, then save. For example:
Repository URL
https://gitlocalize.com/repo/8365
What is the current bug behavior?
After saving, the generated
msgstr
looks like this:Notice the missing quotes on each line, as well as the deleted
""
that should be on the first line.What is the expected correct behavior?
The expected
msgstr
should look like this:Relevant logs and/or screenshots
Please note that even if you don't make any changes in the file, GitLocalize will re-save over existing multiline strings and break them. Example diff: On very large files, this makes it so having to go over every single multiline string and fix it manually can be extremely tedious.
Possible fixes
GitLocalize should ideally follow the correct formatting for PO files. The generated files become invalid/corrupted. A good way to validate this is opening the resulting files with Poedit, which shows the errors: