Bug: order of terms in .po file is not respected
Hi, I just noticed a bug with .po file import/export, which is related to the order of terms in the file.
POEditor does not keep the order of terms in the original .po file after import, and shows them in a different order. As a result, when the file gets exported back to the repo, all the terms there are messed up, which causes a huge diff and A LOT of merge conflicts when trying to integrate the file exported from POEditor back into our project.
It does not help exporting with A-Z sorting rule, as this is still not the order of the original .po file format, and also causes a lot of merge conflicts. The default gettext tool never generates .po file in alphabetical order, but in the order of files the terms are referenced it. POEditor does not respect that on import and introduces it's own random ordering.
This is a big issue, because it makes the continuous localization impossible, as with every even smallest change in .po file, we will have a huge diff to resolve manually in order to integrate our system with POEditor. It's not feasible.
Is this something that can be fixed quickly? This is a showstopper for us, as it makes the localization workflow very difficult and basically renders the entire integrations with POEditor useless
Thank you
-
Eugene Yermolenko commented
Steps to reproduce:
1. Using any external tools (e.g. Python/Django or any other tool that relies on standard GNU gettext), generate a .po-file (the file I'm working with is 40k+ lines, but smaller might work too). All the terms in the file will be in the order of files they are referenced in, e.g.
# reference/to/file_a.py
msgid "Foo"
msgstr ""# reference/to/file_b.py
msgid "Bar"
msgstr ""# reference/to/file_c.py
msgid "Baz"
msgstr ""2. Import it to POEditor (I import through github integration). With large enough file you will see the order of terms in PO editor after import is not the same as they appear in the original file, e.g.:
Foo (# reference/to/file_a.py)
Baz (# reference/to/file_c.py)
Bar (# reference/to/file_b.py)3. Export .po-file from POEditor (either download it or through github). Similarly, you will see the order of terms in the file is different from the original file, e.g.:
# reference/to/file_a.py
msgid "Foo"
msgstr ""# reference/to/file_c.py
msgid "Baz"
msgstr ""# reference/to/file_b.py
msgid "Bar"
msgstr ""This (rightfully) makes Git think there were 2 changes in the file, even though no edits were done. Imagine this happening at the scale of thousands of terms, and with real edits in the file on top of it, and it quickly becomes an unmanageable diff to resolve.
-
Thank you for your feedback.
Newly added terms go to the end of your project's terms list in POEditor, and not at random. This is the expected behavior.
However, we've checked your project and have a solution for you to overcome the conflicts.
Please check your email for further instructions.