[wesnoth-commits] [wesnoth/wesnoth] 2adcb9: wmlxgettext: sort-by-filename before processing files
Steve Cotton
noreply at github.com
Thu Dec 2 09:08:04 UTC 2021
Branch: refs/heads/1.16
Home: https://github.com/wesnoth/wesnoth
Commit: 2adcb92fabd612ffa3804c2ec32aee03770d7f9c
https://github.com/wesnoth/wesnoth/commit/2adcb92fabd612ffa3804c2ec32aee03770d7f9c
Author: Steve Cotton <steve at octalot.co.uk>
Date: 2021-12-02 (Thu, 02 Dec 2021)
Changed paths:
M data/tools/wmlxgettext
Log Message:
-----------
wmlxgettext: sort-by-filename before processing files
Add a sort inside wmlxgettext so that the order of filenames on the command
line doesn't affect the output. The sort is run unconditionally, because I
don't see a usecase for not enabling it. For consistency with xgettext and
msgcat, if there was an option to enable it then it would be called
`--sort-by-file`.
The aim of this change is to reduce the number of changes in .po files caused
by a pot-update. When multiple comments refer to the same translatable string,
separate runs of pot-update could generate them in a random order. If I've
understood the root cause correctly, wmlxgettext itself was deterministic, but
the order of the files on wmlxgettext's command line was not deterministic.
For testing, I tried reversing the sort order; the resulting reordering hit
lines that commonly swap order during pot-updates.
This affects the ordering of the lines beginning `#.` that are generated from
`#po:` comments and also those auto-generated from `[message]speaker=`, etc.
(cherry picked from commit 3761faf92579651ef0fcc5467e707431618cb31d)
More information about the Commits
mailing list