aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2016-03-29 12:00:28 -0700
committerChristopher Allan Webber <cwebber@dustycloud.org>2016-03-29 12:00:28 -0700
commitc01572e97f86e6b4126287542581e1240bd5ab03 (patch)
treedb32cc874b14ce80997b9759434d5b84dc9dd93e
parent1c6c97c5aaca2e6d3d9bb239015fa67093d643de (diff)
downloadmediagoblin-c01572e97f86e6b4126287542581e1240bd5ab03.tar.lz
mediagoblin-c01572e97f86e6b4126287542581e1240bd5ab03.tar.xz
mediagoblin-c01572e97f86e6b4126287542581e1240bd5ab03.zip
devtools: Use pybabel in virtualenv or on path depending on which is present.
* devtools/update_translations.sh (PYBABEL): New variable, points to whichever pybabel we should use.
-rwxr-xr-xdevtools/update_translations.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/devtools/update_translations.sh b/devtools/update_translations.sh
index 29d3a5fc..69313b53 100755
--- a/devtools/update_translations.sh
+++ b/devtools/update_translations.sh
@@ -19,6 +19,12 @@
# exit if anything fails
set -e
+if [ -f "./bin/pybabel" ]; then
+ PYBABEL="./bin/pybabel";
+else
+ PYBABEL=pybabel;
+fi
+
echo "==> checking out master"
git checkout master
@@ -29,7 +35,7 @@ echo "==> pulling present translations"
rsync --exclude-from="devtools/pootle-exclude.txt" -vaz chapters.gnu.org::pootle/mediagoblin/ mediagoblin/i18n/
echo "==> Extracting translations"
-./bin/pybabel extract -F babel.ini -o mediagoblin/i18n/templates/mediagoblin.pot .
+$PYBABEL extract -F babel.ini -o mediagoblin/i18n/templates/mediagoblin.pot .
echo "==> Compiling .mo files"
./devtools/compile_translations.sh