Closed samhocevar closed 1 year ago
By the way, the reason this is important is because it creates all sorts of source control conflicts when different tools are used to edit PO data.
This change makes perfect sense. Thanks for the contribution!
FYI, just released this in v1.10.0.
Note: the actual changes are in
POGenerator.cs
, the rest is mostly fixing the unit tests.By default, i.e. when not asked to preserve header order, the library sorts them alphabetically. This is contrary to GNU gettext behaviour (see the
construct_header()
function here) as well as the Python polib library (see theordered_metadata()
function here).This PR ensures that when not explicitly requested to preserve header order, the library serialises them in an order compatible with GNU gettext and polib. All unit tests were fixed accordingly.