Closed wpiekutowski closed 2 years ago
This will potentially generate large diffs for folks with lots of PO files. It's alright, just something that we might want to call out in the CHANGELOG. 🙃
Thanks @wpiekutowski! ❤️
Thanks for the quick review and merge!
I agree it's a good idea to explain these large diffs in the CHANGELOG, although I suppose they won't be significantly bigger than the ones resulting from 0.19.1 ex-autogen -> elixir-autogen rename.
Summary
This PR changes the order in which flags and references are dumped into PO files, so that flags are placed after references. This behavior seems to be common among a small sample of non-Elixir PO files I saw.
Background
In of the projects, I'm going to use transifex.com to enable easier management of translations. However, I've noticed that they output comments in PO files in a different order than Elixir's gettext. They first output file references and then flags, while Elixir's gettext does it the other way. This results in some unnecessary churn in git history, because these 2 lines are swapped back and forth. Folks at transifex.com insist that Elixir's gettext is outputing comments in the wrong order:
However, I wasn't able to find any explicit mention of the "standard" comment order in PO files, except for the example PO file in the linked gettext doc. My short GitHub research indicated that indeed PO files with flags (that I've found) had them placed after the references, so that gives some additional credibility to transifex claim.