From: Jo-Philipp Wich Date: Wed, 27 Jun 2012 18:02:50 +0000 (+0000) Subject: build: add i18n-sync.sh, a script to automatically sync most translations X-Git-Tag: 0.11.0~558 X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=3944cdaac4d145b67668da055c15b931fd117e80 build: add i18n-sync.sh, a script to automatically sync most translations --- diff --git a/build/i18n-sync.sh b/build/i18n-sync.sh new file mode 100755 index 000000000..137852bb6 --- /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