aboutsummaryrefslogtreecommitdiffstats
path: root/devtools
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2014-12-14 14:56:15 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2015-01-16 15:20:32 -0600
commit26217cbe0dabe7422bf21ea873fee9114fb4dd08 (patch)
treedb01cca059ff5a3bcdc03c2cded5e643d35a505c /devtools
parent94e90c77d0bd141d2a068c50ce02207ee87bef3b (diff)
downloadmediagoblin-26217cbe0dabe7422bf21ea873fee9114fb4dd08.tar.lz
mediagoblin-26217cbe0dabe7422bf21ea873fee9114fb4dd08.tar.xz
mediagoblin-26217cbe0dabe7422bf21ea873fee9114fb4dd08.zip
Update the pootle translation updating script to compile the right files
Made similar changes in the Transifex script, so ported those over. Also, the script did not seem to be running the compile step as it wasn't finding the files (different file structure), but it is doing fine now.
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/update_translations_pootle.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/devtools/update_translations_pootle.sh b/devtools/update_translations_pootle.sh
index 161f1acd..56fdf201 100755
--- a/devtools/update_translations_pootle.sh
+++ b/devtools/update_translations_pootle.sh
@@ -32,7 +32,23 @@ echo "==> Extracting translations"
./bin/pybabel extract -F babel.ini -o mediagoblin/i18n/templates/mediagoblin.pot .
echo "==> Compiling .mo files"
-./bin/pybabel compile -D mediagoblin -d mediagoblin/i18n/
+## This used to be a lot simpler...
+##
+## But now we have a Lojban translation that we can't compile
+## currently. We don't want to get rid of it because we want it... see
+## https://issues.mediagoblin.org/ticket/1070
+## to track progress.
+
+for file in `find mediagoblin/i18n/ -name "*.po"`; do
+ if [ "$file" != "mediagoblin/i18n/jbo/mediagoblin.po" ] && \
+ [ "$file" != "mediagoblin/i18n/templates/en/mediagoblin.po" ]; then
+ ./bin/pybabel compile -i $file \
+ -o `dirname $file`/mediagoblin.mo \
+ -l `echo $file | awk -F / '{ print $3 }'`;
+ else
+ echo "Skipping $file which pybabel can't compile :(";
+ fi;
+done
echo "==> Committing to git"
git add mediagoblin/i18n/