3 if [ -e src/translations/fusionforge.pot ] ; then # We're in the parent dir
5 elif [ -e translations/fusionforge.pot ] ; then # probably in src/ (or a renamed src/)
6 cd . # do nothing, but shell syntax requires an instruction in a then-block
7 elif [ -e ../src/translations/fusionforge.pot ] ; then # in tools/ or tests/ or something
9 elif [ -e ../translations/fusionforge.pot ] ; then # In a subdir of src/
12 echo "Couldn't find translations directory..."
16 locales=$(cd translations; ls *.po | sed 's/.po$//' | sort)
19 for l in $(echo $locales | xargs -n 1 | sort) ; do
21 msgfmt --statistics -o /dev/null translations/$l.po
26 for l in $(echo $locales | xargs -n 1 | sort) ; do
27 msgfmt -c -o /dev/null translations/$l.po
39 rm translations/fusionforge.pot
41 find . -type f \( -name \*.php -or -name users -or -name projects \) \
42 | grep -v -e {arch} -e svn-base \
43 | grep -v ^./plugins/wiki \
45 | xargs xgettext -d fusionforge -o translations/fusionforge.pot -L PHP --from-code=utf-8
47 for l in $locales ; do
48 echo "Processing $l..."
49 msgmerge -U translations/$l.po translations/fusionforge.pot
53 for l in $locales ; do
54 mkdir -p locales/$l/LC_MESSAGES
55 msgfmt -o locales/$l/LC_MESSAGES/fusionforge.mo translations/$l.po
59 echo "Unknown operation"