Enable extraction, update and compilation of a single gettext domain

This commit is contained in:
str4d
2013-07-21 22:15:24 +00:00
parent e7ffd2b587
commit 6f714fd19e
3 changed files with 27 additions and 8 deletions

View File

@ -1,6 +1,11 @@
#!/bin/sh
. ./translation.vars
for domain in $(ls $BABELCFG); do
TZ=UTC env/bin/pybabel compile -D $domain -d $TRANSDIR
done
if [ $# -ge 1 ]
then
TZ=UTC env/bin/pybabel compile -D $1 -d $TRANSDIR
else
for domain in $(ls $BABELCFG); do
TZ=UTC env/bin/pybabel compile -D $domain -d $TRANSDIR
done
fi

View File

@ -5,10 +5,19 @@ if [ ! -e $POTDIR ]; then
mkdir $POTDIR
fi
for domain in $(ls $BABELCFG); do
if [ $# -ge 1 ]
then
TZ=UTC ./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" \
--project=$PROJECT \
--version=$VERSION \
-F $BABELCFG/$domain \
-o $POTDIR/$domain.pot $PROJDIR
done
done
fi

View File

@ -1,6 +1,11 @@
#!/bin/sh
. ./translation.vars
for domain in $(ls $BABELCFG); do
TZ=UTC env/bin/pybabel update -D $domain -i $POTDIR/$domain.pot -d $TRANSDIR
done
if [ $# -ge 1 ]
then
TZ=UTC env/bin/pybabel update -D $1 -i $POTDIR/$1.pot -d $TRANSDIR
else
for domain in $(ls $BABELCFG); do
TZ=UTC env/bin/pybabel update -D $domain -i $POTDIR/$domain.pot -d $TRANSDIR
done
fi