diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-06-27 18:02:50 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-06-27 18:02:50 +0000 |
commit | 3944cdaac4d145b67668da055c15b931fd117e80 (patch) | |
tree | eaa97e38720be4f378cf604e8bca951c66155e2f /build | |
parent | e782a6f339ee66764e3b5ddc8cffcf9e8ed60860 (diff) |
build: add i18n-sync.sh, a script to automatically sync most translations
Diffstat (limited to 'build')
-rwxr-xr-x | build/i18n-sync.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/build/i18n-sync.sh b/build/i18n-sync.sh new file mode 100755 index 0000000000..137852bb63 --- /dev/null +++ b/build/i18n-sync.sh @@ -0,0 +1,24 @@ +#!/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/i18n-update.pl po |