From bed66e0f901ae9f8e21675035f174292120fea4f Mon Sep 17 00:00:00 2001 From: ywang Date: Sat, 27 Mar 2021 14:13:53 +0100 Subject: Rework translation system to use PO files The French translations are provided by Tanavit. Unfortunately I was not able to keep this addition as a separate commit as the translation file was originally added as a .tr file that I then converted to .po file in the meantime. Also note that this commit is created from squashing 20+ commits from the l10n branch that preceded the transition to PO files. In addition to changes to the locale files (which were all included in the single commit for transitioning to PO files), these commits also included code that has now become obsolete for l10n work. In particular, it included a GUI program written in Tcl to edit .tr files; this program can now be found in the following repo: https://codeberg.org/y5nw/mt_tr_editor Co-authored-by: Tanavit --- advtrains/po/update-translations.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 advtrains/po/update-translations.sh (limited to 'advtrains/po/update-translations.sh') diff --git a/advtrains/po/update-translations.sh b/advtrains/po/update-translations.sh new file mode 100755 index 0000000..d86c568 --- /dev/null +++ b/advtrains/po/update-translations.sh @@ -0,0 +1,24 @@ +#!/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 + +xgettext \ + -D "$ATDIR" \ + -D "$BTDIR" \ + -d advtrains \ + -p . \ + -L lua \ + --from-code=UTF-8 \ + --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 + msgmerge -U \ + $i template.pot +done -- cgit v1.2.3