Integrate desktop file translation into meson

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.
This commit is contained in:
Oneric 2023-04-22 20:48:01 +02:00
parent 429455263f
commit 66efa84eed
4 changed files with 5 additions and 3 deletions

View file

@ -18,8 +18,8 @@ elif host_machine.system() == 'darwin'
else
conf_pkg.set('AEGISUB_COMMAND', 'aegisub')
desktop_template = configure_file(input: 'desktop/aegisub.desktop.template.in',
output: 'aegisub.desktop.template',
desktop_template = configure_file(input: 'desktop/aegisub.desktop.in.in',
output: 'aegisub.desktop.in',
configuration: conf_pkg)
i18n = import('i18n')

View file

@ -1,3 +1,5 @@
packages/desktop/aegisub.desktop.in.in
src/ass_style.cpp
src/audio_box.cpp
src/audio_karaoke.cpp

View file

@ -41,7 +41,7 @@ find ../automation -name *.lua \
for i in 'Name' 'GenericName' 'Comment' 'Keywords'
do
grep ^$i -n ../packages/desktop/aegisub.desktop.template.in \
grep ^$i -n ../packages/desktop/aegisub.desktop.in.in \
| sed 's/\([0-9]\+\):[^=]\+=\(.*\)$/aegisub.desktop|\1|"\2"/' \
| maybe_append
done