-#! /bin/sh
-
-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"
-
-if [ -e gforge/translations/gforge.pot ] ; then # We're in the parent dir
- cd gforge
-elif [ -e ../gforge/translations/gforge.pot ] ; then # We're in tools/ or gforge/
- cd ../gforge
-elif [ -e ../translations/gforge.pot ] ; then # In a subdir of gforge
+#!/bin/sh
+if [ -e src/translations/fusionforge.pot ] ; then # We're in the parent dir
+ cd src
+elif [ -e ../src/translations/fusionforge.pot ] ; then # We're in tools/ or src/
+ cd ../src
+elif [ -e ../translations/fusionforge.pot ] ; then # In a subdir of src/
cd ..
else
echo "Couldn't find translations directory..."
exit 1
fi
-
if [ "$1" = --stats ] ; then
- mode=stats
+ utils/manage-translations.sh stats
else
- mode=refresh
+ utils/manage-translations.sh refresh
fi
-
-locales=$(echo $locales | xargs -n 1 | sort)
-
-if [ $mode = "refresh" ] ; then
- rm translations/gforge.pot
-
- find -type f -\( -name \*.php -or -name users -or -name projects -\) \
- | grep -v -e {arch} -e svn-base \
- | grep -v ^./plugins/wiki \
- | LANG=C sort \
- | xargs xgettext -d gforge -o translations/gforge.pot -L PHP --from-code=iso-8859-1
-
- for l in $locales ; do
- echo "Processing $l..."
- msgmerge -U translations/$l.po translations/gforge.pot
- done
-fi
-
-for l in $(echo $locales | xargs -n 1 | sort) ; do
- printf "* %5s: " $l
- msgfmt --statistics -o /dev/null translations/$l.po
-done