3 locales="eu bg ca zh_TW nl en eo fr de el he id it ja ko la nb pl pt_BR pt ru zh_CN es sv th"
5 if [ -e gforge/translations/gforge.pot ] ; then # We're in the parent dir
7 elif [ -e ../gforge/translations/gforge.pot ] ; then # We're in tools/ or gforge/
9 elif [ -e ../translations/gforge.pot ] ; then # In a subdir of gforge
12 echo "Couldn't find translations directory..."
16 if [ "$1" = --stats ] ; then
22 locales=$(echo $locales | xargs -n 1 | sort)
26 rm translations/gforge.pot
28 find -type f -\( -name \*.php -or -name users -or -name projects -\) \
29 | grep -v -e {arch} -e svn-base \
30 | grep -v ^./plugins/wiki \
32 | xargs xgettext -d gforge -o translations/gforge.pot -L PHP --from-code=iso-8859-1
34 for l in $locales ; do
35 echo "Processing $l..."
36 msgmerge -U translations/$l.po translations/gforge.pot
41 for l in $(echo $locales | xargs -n 1 | sort) ; do
43 msgfmt --statistics -o /dev/null translations/$l.po