find may output matching files in any order.
To avoid unnecessary changes between regeneration
sort its output. For C++ sources xgettext’s --sort-by-file
already has an equivalent effect. All other files are already
statically listed in a fixed order.
Adopts part of: 4aee271d03
And document which aprts are still missing.
The keyword list is are copied from make_pot.sh.
Sorting by file helps keeping future PO(T) update diffs small'ish
and is also done in wangqr’s PO-file update procedure. (POT file
generation also sorts, but by preapplying `LC_ALL=C sort` to the
file list instead of using xgettext’s sorting option.)
Without this, meson’s aegisub-pot missed the majority of translatable
strings from C++ sources. While this brings the target much closerto
make_pot.sh, the remaining strings aren't straigthforward to integrate
unfortunately. At the time of writing meson has no support for iss files
and make_pot.sh uses custom logic to select only specific strings
from Lua and JSON files.
Even after this commit, POT updates should
thus still continue to use make_pot.sh.
It used to be genrated and installed by the old custom build system,
but apparently got lost in switching to meson.
Rename to .in.in instead of .template.in, since i18n otherwise gets
utterly confused failing to recognise the file type and both erroring
out with "no ITS rules found" during merge_file and failing to extract
any translatable strings.
Also drop underscores which were previously processed by intltool.
This doesn't yet automatically replace the release version and date
in the appdata file, but neither did the old build.
Note: while this slightly improves the situation, meson’s aegisub-pot
target is still missing many strings. make_pot.sh should be used.
meson’s i18n module get’s confused by .template and fails
to extract translatable strings, thus rename to in.in.
Note: while this slightly improves the situation, meson’s aegisub-pot
target is still missing many strings. make_pot.sh should be used.
a91c4f70c3 switched processing of the
desktop file from intltool to gettext-backed i18n.merge_file and dropped
leading underscores which used to be processed by intltool.
However, this commit omitted dropping the underscore from Keywords,
resulting in this field being stripped from the installed version.
Furthermore, make_pot.sh was broken since it too relied on the
underscore meaning POT regeneration will now remove the desktop files
strings from translation files.
Since it was not added to po/POTFILES meson’s native aegisub-pot target
also doesn't add desktop file strings to the translation pool. Though,
this target still misses a lot of other strings as well and shouldn't be
used yet anyway.
This commit removes leftover underscores and reintegrates desktop file
strings into both make_pot.sh. Integration into aegisub-pot is done in a
follow-up commit.
It's modestly faster, significantly more type-safe, and doesn't assert
when there's too few arguments, which causes problems for plural forms.
Closes#1733.