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.
Sorting import statements was made easier and less error-prone using [isort](https://pypi.org/project/isort/)
Make it clear that the `yaml` package is not part of Python's Standard Library and should be installed with a package manager as outlined in [this](https://pep8.org/#imports) section of PEP8.
This applies to the Walking Corpse in particular, which has 4 MP and 4
movement cost to enter shallow water. In practice this means that it can
move into shallow water only if it's not slowed and hasn't spent any
movement points this turn, and then it cannot move any further until the
next turn.
Closes#5689.
The following line was causing a wmllint error because it contains _s:
Irs, book_start Icr^Ii, Irs
"../../data/campaigns/Descent_Into_Darkness/maps/07c_A_Small_Favor3.map", line 10: warning, fog or shroud in map file
As far as I can tell this lines do nothing.
1. `file_handle = None` is NOT how to close a file in python
2. The file handle is already closed due to `with open() as file_handle:`
A comment containing a string [advancefrom] was causing wmllint to get confused
../../data/campaigns/Dead_Water/scenarios/06_Uncharted_Islands.cfg, line 22: [advancefrom] needs to be manually updated to [modify_unit_type] and moved into the _main.cfg file
wmllint saw [side] inside a comment and incorrectly assumed it is reading a side definition
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 484: side number 5 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 488: side number 5 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 512: side number 6 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 516: side number 6 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 540: side number 7 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 544: side number 7 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 568: side number 8 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 572: side number 8 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 805: side number 1 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 818: side number 2 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 831: side number 3 is out of sequence (11 expected)
"../../data/multiplayer/scenarios/4p_A_New_Land.cfg", line 844: side number 4 is out of sequence (11 expected)