From 66efa84eed76bb548710dbdadbd1f6a54cdd4611 Mon Sep 17 00:00:00 2001 From: Oneric Date: Sat, 22 Apr 2023 20:48:01 +0200 Subject: [PATCH] Integrate desktop file translation into meson MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../{aegisub.desktop.template.in => aegisub.desktop.in.in} | 0 packages/meson.build | 4 ++-- po/POTFILES | 2 ++ po/make_pot.sh | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) rename packages/desktop/{aegisub.desktop.template.in => aegisub.desktop.in.in} (100%) diff --git a/packages/desktop/aegisub.desktop.template.in b/packages/desktop/aegisub.desktop.in.in similarity index 100% rename from packages/desktop/aegisub.desktop.template.in rename to packages/desktop/aegisub.desktop.in.in diff --git a/packages/meson.build b/packages/meson.build index db933b5e3..82976fbb2 100644 --- a/packages/meson.build +++ b/packages/meson.build @@ -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') diff --git a/po/POTFILES b/po/POTFILES index 233f76faf..10f071b25 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -1,3 +1,5 @@ +packages/desktop/aegisub.desktop.in.in + src/ass_style.cpp src/audio_box.cpp src/audio_karaoke.cpp diff --git a/po/make_pot.sh b/po/make_pot.sh index 15102b8e9..dd4f01cfb 100755 --- a/po/make_pot.sh +++ b/po/make_pot.sh @@ -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