prefer the venv pybabel but allow the system one to be used (if found)

This commit is contained in:
kytv
2013-08-31 23:58:20 +00:00
parent ba651ceafb
commit 5c7672eb1c
5 changed files with 27 additions and 7 deletions

View File

@@ -1,20 +1,26 @@
#!/bin/sh
. ./etc/translation.vars
export TZ=UTC
if [ ! -e $POTDIR ]; then
mkdir $POTDIR
fi
# By setting the PYTHONPATH here we can help pybabel find 'our' highlighting
# extension and we can use any pybabel
export PYTHONPATH=i2p2www:$PYTHONPATH
if [ $# -ge 1 ]
then
TZ=UTC ./pybabel extract --msgid-bugs-address="http://trac.i2p2.de" \
$PYBABEL extract --msgid-bugs-address="http://trac.i2p2.de" \
--project=$PROJECT \
--version=$VERSION \
-F $BABELCFG/$1 \
-o $POTDIR/$1.pot $PROJDIR
else
for domain in $(ls $BABELCFG); do
TZ=UTC ./pybabel extract --msgid-bugs-address="http://trac.i2p2.de" \
$PYBABEL extract --msgid-bugs-address="http://trac.i2p2.de" \
--project=$PROJECT \
--version=$VERSION \
-F $BABELCFG/$domain \