summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config10
-rwxr-xr-xupdate_translations25
2 files changed, 35 insertions, 0 deletions
diff --git a/config b/config
new file mode 100644
index 0000000..e98d644
--- /dev/null
+++ b/config
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+set -u
+
+TRANSLATION_REPO=/srv/translation.torproject.org/translations/
+
+TX=/srv/translation.torproject.org/transifex-client/bin/tx
+
+PROJECTS="bridgedb gettor orbot vidalia vidalia_help vidalia_installer"
diff --git a/update_translations b/update_translations
new file mode 100755
index 0000000..6a9ae44
--- /dev/null
+++ b/update_translations
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+cd `dirname $0`
+
+source config
+
+# Prepare the repository by making sure it is up to date.
+cd $TRANSLATION_REPO
+
+# For each project, fetch the new translations and commit
+# if there are any changes.
+
+for project in $PROJECTS; do
+
+ cd $project;
+ $TX pull -a -s > /dev/null;
+
+ git add . > /dev/null;
+ git commit -qm "Update translations for $project" > /dev/null || test $? = 1;
+
+ git push origin $project;
+
+ cd ..;
+done
+