aboutsummaryrefslogtreecommitdiff
path: root/advtrains/po/update-translations.sh
blob: 4c22c85f2bd386f6923332fd9d58bf5301e8b491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/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 \
	--add-location=file \
	--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