aboutsummaryrefslogtreecommitdiff
path: root/advtrains/po/update-translations.sh
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2024-11-11 20:50:28 +0100
committerorwell <orwell@bleipb.de>2024-11-11 20:50:28 +0100
commit380c26f7a851f4b4edb3879b544a542e7bfbb490 (patch)
tree158ac366c93a8581f5792f95eba6932bafe4c325 /advtrains/po/update-translations.sh
parent29180f0f60871f92889f686fe666c029ac07861a (diff)
parent3d2d19f6f7eba90f0d19b002824b2ff466567608 (diff)
downloadadvtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.tar.gz
advtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.tar.bz2
advtrains-380c26f7a851f4b4edb3879b544a542e7bfbb490.zip
Merge branch 'master' into route_prog_rework
Diffstat (limited to 'advtrains/po/update-translations.sh')
-rwxr-xr-xadvtrains/po/update-translations.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/advtrains/po/update-translations.sh b/advtrains/po/update-translations.sh
new file mode 100755
index 0000000..3a56c7c
--- /dev/null
+++ b/advtrains/po/update-translations.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+# NOTE: Please make sure you also have basic_trains installed, as it uses attrans for historical reasons
+
+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'` \
+ &&
+for i in "$PODIR"/*.po; do
+ msgmerge -U \
+ --sort-by-file \
+ $i "$POTFILE"
+done