aboutsummaryrefslogtreecommitdiff
path: root/advtrains/po/update-translations.sh
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2023-10-04 22:14:18 +0200
committerY. Wang <y5nw@protonmail.com>2024-11-04 17:17:52 +0100
commiteb0c5b78627505bcba409dc5f52dbb05891954c5 (patch)
tree1a9dc00e6ce6a7f64cbdd913c5b49099f3abf992 /advtrains/po/update-translations.sh
parent425b0993d355b9f45ddd400bd4925f9f1a5bd34d (diff)
downloadadvtrains-eb0c5b78627505bcba409dc5f52dbb05891954c5.tar.gz
advtrains-eb0c5b78627505bcba409dc5f52dbb05891954c5.tar.bz2
advtrains-eb0c5b78627505bcba409dc5f52dbb05891954c5.zip
Various translation improvements
Diffstat (limited to 'advtrains/po/update-translations.sh')
-rwxr-xr-xadvtrains/po/update-translations.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/advtrains/po/update-translations.sh b/advtrains/po/update-translations.sh
index d86c568..3a56c7c 100755
--- a/advtrains/po/update-translations.sh
+++ b/advtrains/po/update-translations.sh
@@ -1,24 +1,28 @@
#!/bin/sh
# NOTE: Please make sure you also have basic_trains installed, as it uses attrans for historical reasons
-ATDIR=`dirname "$0"`/../..
-BTDIR="$ATDIR"/../basic_trains
+PODIR=`dirname "$0"`
+ATDIR="$PODIR/../.."
+BTDIR="$ATDIR/../basic_trains"
+POTFILE="$PODIR/advtrains.pot"
xgettext \
-D "$ATDIR" \
-D "$BTDIR" \
-d advtrains \
+ -o "$POTFILE" \
-p . \
-L lua \
--from-code=UTF-8 \
+ --sort-by-file \
--keyword='attrans' \
--keyword='S' \
--package-name='advtrains' \
--msgid-bugs-address='advtrains-discuss@lists.sr.ht' \
`find $ATDIR $BTDIR -name '*.lua' -printf '%P\n'` \
&&
-mv advtrains.po template.pot &&
-for i in *.po; do
+for i in "$PODIR"/*.po; do
msgmerge -U \
- $i template.pot
+ --sort-by-file \
+ $i "$POTFILE"
done