Commit graph

11 commits

Author SHA1 Message Date
Steve Cotton
ec1c336078 wmlxgettext: treat gender as a po hint
This will automatically record the gender (if specified) of each
[unit], [unit_type] and [side].

The hint "gender=male,female" is often applied to [unit_type]name=,
although that's usually the male name. I believe that's the only
downside of this change.
2024-02-12 23:42:59 +01:00
Slayer95
4892963072
Refactor collection of #po, #po-override comments (#7574) 2023-07-12 22:47:26 +02:00
Slayer95
be991e027d
wmlxgettext: Support extracting all textdomains at once (#7624)
* wmlxgettext: Support extracting all textdomains at once

- -o now expects a folder.
- --domain is now treated as an optional filter.

* wmltools/gui/wmlxgettext: Update input handling

- Fix --initialdomain
- Textdomain is no longer mandatory.
- Accept output dir rather than output file.
2023-05-24 22:08:18 +02:00
Slayer95
0620822ab2
wmlxgettext: Improve parser resiliency for malformed files (#7625)
* wmlxgettext: Improve parser resiliency for malformed files

- WML files with no translatable strings will no longer
crash the script on unbalanced tags (but translatable will).
- .cfg files belonging to man(1) will no longer crash the script.

* Remove stray quotes from textdomain declarations

These are not recognized by the wmlxgettext parser.
2023-05-17 21:40:36 +02:00
Slayer95
36ed4641cd
wmlxgettext: Error out on unused #po, #po-override directives (#7573)
* wmlxgettext: Error out on unused #po, #po-override directives

* wmlxgettext: Ignore out of domain #po, #po-override comments

* wmlxgettext: Properly clear pending #po, #po-override on textdomain switch

* Fix misplaced #po comments in DiD, SoF, TSG, Editor

Some of these ugly relocations can be reverted in or after #7570.
2023-05-08 00:08:21 +02:00
Elvish_Hunter
59b6049f9f wmlxgettext: always use Unix file paths in .pot files
Fixes #7380.
2023-02-16 23:28:05 +01:00
Steve Cotton
c30c30acfc wmlxgettext: support double quotes in raw strings (fixes #4484)
This adds support for _<<map="{maps/01_First_Map.map}">>.
2019-10-19 20:37:39 +02:00
Nobun
0cf8da9357 typefix 2019-09-11 14:32:16 +02:00
Nobun
e1c7c84957 wmlxgettext: fix #4275: not handle objectives.lua's turn counter 2019-09-11 14:32:16 +02:00
josteph
e642223017 wmlxgettext: Fix crash if no *.cfg file is found
fixes #3719
[ci skip]
2018-11-14 20:14:44 +01:00
Celtic Minstrel
42c48d1483 Move wmlxgettext to the data/tools directory so that it's automatically included in official packages
(cherry-picked from commit 59e78e5565)
2018-10-07 03:24:58 +00:00