From 59ac1fbc444fce21898482660dd1dca05287db43 Mon Sep 17 00:00:00 2001 From: str4d Date: Fri, 18 Jan 2013 11:01:32 +0000 Subject: [PATCH] Added script for updating existing translations --- extract-messages.sh | 5 ++--- translation.vars | 6 ++++++ update-existing-po.sh | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 translation.vars create mode 100755 update-existing-po.sh diff --git a/extract-messages.sh b/extract-messages.sh index bb2019da..da8753d8 100755 --- a/extract-messages.sh +++ b/extract-messages.sh @@ -1,4 +1,3 @@ -PROJECT=I2P -VERSION=website +source ./translation.vars -TZ=UTC env/bin/pybabel extract --project=$PROJECT --version=$VERSION -F i2p2www/babel.cfg i2p2www/ > messages.pot +TZ=UTC env/bin/pybabel extract --project=$PROJECT --version=$VERSION -F $BABELCFG $PROJDIR > $POTFILE diff --git a/translation.vars b/translation.vars new file mode 100644 index 00000000..27a7c47e --- /dev/null +++ b/translation.vars @@ -0,0 +1,6 @@ +PROJECT=I2P +VERSION=website +PROJDIR=i2p2www +BABELCFG=$PROJDIR/babel.cfg +POTFILE=messages.pot +TRANSDIR=$PROJDIR/translations diff --git a/update-existing-po.sh b/update-existing-po.sh new file mode 100755 index 00000000..8d6b600c --- /dev/null +++ b/update-existing-po.sh @@ -0,0 +1,3 @@ +source ./translation.vars + +TZ=UTC env/bin/pybabel update -i $POTFILE -d $TRANSDIR