summaryrefslogtreecommitdiffhomepage
path: root/build/i18n-sync.sh
blob: 430e13f28db9e24e57206c59cf791eda88056877 (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
#!/bin/sh

for m in */*/Makefile; do
	if grep -qE '^PO *=' $m; then
		p="${m%/Makefile}"
		t="$(sed -ne 's/^PO *= *//p' $m)"

		case "$t" in
			*\ *)
				echo "WARNING: Cannot handle $p" >&2
				continue
			;;
			*base*)
				continue
			;;
		esac

		if [ -f "po/templates/$t.pot" ]; then
			./build/i18n-scan.pl "$p" > "po/templates/$t.pot"
		fi
	fi
done

./build/mkbasepot.sh
./build/i18n-update.pl po