From f417f6f1ad78c2a5924978ef889fb59f56bfd0cd Mon Sep 17 00:00:00 2001 From: Oneric Date: Sat, 29 Apr 2023 03:32:40 +0200 Subject: [PATCH] po/Make_pot: replace xmlstarelet+jq with gettext MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gettext can deal with AppData (and other XML files) since version 0.19.6 (2015). We already depend on gettext anyway so let’s utilise this, to get rid of two build dependencies and simplify the extraction logic. This depends on the removal of underscore prefixes as done in a prior commit. After this the developer name "Aegisub Group" is now also treated as a translateable string. --- po/make_pot.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/po/make_pot.sh b/po/make_pot.sh index 72caece0b..8eb7fe9fc 100755 --- a/po/make_pot.sh +++ b/po/make_pot.sh @@ -45,9 +45,8 @@ find ../automation -name *.lua \ xgettext ../packages/desktop/aegisub.desktop.in.in \ --language=Desktop --join-existing --omit-header -o aegisub.pot -for i in 'name' 'summary' 'p' 'li' 'caption'; do - xmlstarlet sel -t -v "//$i" ../packages/desktop/aegisub.appdata.xml.in.in | jq -R . -done | nl -v0 -w1 -s'|' | sed -re 's/^/aegisub.appdata.xml|/' | maybe_append +xgettext ../packages/desktop/aegisub.appdata.xml.in.in \ + --language=AppData --join-existing --omit-header -o aegisub.pot grep '^_[A-Za-z0-9]*=.*' ../packages/win_installer/fragment_strings.iss.in | while read line do