choose pybabel depending on whether one is available in the environment

This commit sponsored by Erik Mekhsian.  Thank you!
This commit is contained in:
Christopher Allan Webber 2015-02-14 16:02:11 -06:00
parent 33cdeef94f
commit aac69eb9aa

View File

@ -19,6 +19,13 @@
# exit if anything fails # exit if anything fails
set -e set -e
if [ -f "./bin/pybabel" ]; then
PYBABEL="./bin/pybabel";
else
PYBABEL=pybabel;
fi
## This used to be a lot simpler... ## This used to be a lot simpler...
## ##
## But now we have a Lojban translation that we can't compile ## But now we have a Lojban translation that we can't compile
@ -30,7 +37,7 @@ for file in `find mediagoblin/i18n/ -name "*.po"`; do
if [ "$file" != "mediagoblin/i18n/jbo/mediagoblin.po" ] && \ if [ "$file" != "mediagoblin/i18n/jbo/mediagoblin.po" ] && \
[ "$file" != "mediagoblin/i18n/templates/en/mediagoblin.po" ]; then [ "$file" != "mediagoblin/i18n/templates/en/mediagoblin.po" ]; then
mkdir -p `dirname $file`/LC_MESSAGES/; mkdir -p `dirname $file`/LC_MESSAGES/;
./bin/pybabel compile -i $file \ $PYBABEL compile -i $file \
-o `dirname $file`/LC_MESSAGES/mediagoblin.mo \ -o `dirname $file`/LC_MESSAGES/mediagoblin.mo \
-l `echo $file | awk -F / '{ print $3 }'`; -l `echo $file | awk -F / '{ print $3 }'`;
else else