From 429455263fd4d2821c4c254bdcaf2630af853efa Mon Sep 17 00:00:00 2001 From: Oneric Date: Sat, 22 Apr 2023 20:24:32 +0200 Subject: [PATCH] Fix generation and translation of desktop file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a91c4f70c335bd8cbeab23c7ebd3227bec65907c 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. --- packages/desktop/aegisub.desktop.template.in | 2 +- po/make_pot.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/desktop/aegisub.desktop.template.in b/packages/desktop/aegisub.desktop.template.in index ce73b1417..40b017635 100644 --- a/packages/desktop/aegisub.desktop.template.in +++ b/packages/desktop/aegisub.desktop.template.in @@ -9,7 +9,7 @@ TryExec=@AEGISUB_COMMAND@ Icon=aegisub Terminal=false Categories=AudioVideo;AudioVideoEditing;GTK; -_Keywords=subtitles;subtitle;captions;captioning;video;audio; +Keywords=subtitles;subtitle;captions;captioning;video;audio; MimeType=application/x-srt;text/plain;text/x-ass;text/x-microdvd;text/x-ssa; StartupNotify=true StartupWMClass=aegisub diff --git a/po/make_pot.sh b/po/make_pot.sh index eccf9a9b1..15102b8e9 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.template.in \ | sed 's/\([0-9]\+\):[^=]\+=\(.*\)$/aegisub.desktop|\1|"\2"/' \ | maybe_append done