diff options
Diffstat (limited to 'advtrains/po/update-translations.sh')
-rwxr-xr-x | advtrains/po/update-translations.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/advtrains/po/update-translations.sh b/advtrains/po/update-translations.sh index b37d019..3a56c7c 100755 --- a/advtrains/po/update-translations.sh +++ b/advtrains/po/update-translations.sh @@ -1,25 +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 advtrains.pot && -for i in *.po; do +for i in "$PODIR"/*.po; do msgmerge -U \ - --no-fuzzy-matching \ - $i advtrains.pot + --sort-by-file \ + $i "$POTFILE" done |