9612068c91e2ab47456c3e49e467e868ba661c60
[project/luci.git] / build / i18n-init.sh
1 #!/bin/sh
2
3 PATTERN=$1
4
5 [ -z "$PATTERN" ] && PATTERN='*.pot'
6
7 for lang in $(cd po; echo ?? ??_??); do
8         for file in $(cd po/templates; echo $PATTERN); do
9                 if [ -f po/templates/$file -a ! -f "po/$lang/${file%.pot}.po" ]; then
10                         msginit --no-translator -l "$lang" -i "po/templates/$file" -o "po/$lang/${file%.pot}.po"
11                         svn add "po/$lang/${file%.pot}.po"
12                 fi
13         done
14 done