build: add i18n-init.sh, a helper script to initalize missing *.po files
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 21 May 2011 21:22:47 +0000 (21:22 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 21 May 2011 21:22:47 +0000 (21:22 +0000)
build/i18n-init.sh [new file with mode: 0755]

diff --git a/build/i18n-init.sh b/build/i18n-init.sh
new file mode 100755 (executable)
index 0000000..72199bb
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+for lang in $(cd po; echo ?? ??_??); do
+       for file in $(cd po/templates; echo *.pot); do
+               if [ ! -f "po/$lang/${file%.pot}.po" ]; then
+                       msginit --no-translator -l "$lang" -i "po/templates/$file" -o "po/$lang/${file%.pot}.po"
+                       svn add "po/$lang/${file%.pot}.po"
+               fi
+       done
+done