From 3637e052d5116e5ea016ab9edc9413574bff72fd Mon Sep 17 00:00:00 2001
From: Luc Didry <luc@didry.org>
Date: Tue, 27 Feb 2018 17:34:37 +0100
Subject: [PATCH] [Zanata] Add script to update zanata for one locale

ex: ./push-trad-to-zanata.sh fr_FR
---
 push-trad-to-zanata.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 push-trad-to-zanata.sh

diff --git a/push-trad-to-zanata.sh b/push-trad-to-zanata.sh
new file mode 100755
index 00000000..b4520508
--- /dev/null
+++ b/push-trad-to-zanata.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+FILE=$1
+if [[ ! -e locale/$FILE.json ]]
+then
+    echo "locale/$FILE.json does not exist. Exiting."
+    exit 1
+else
+    LOCALE=$(echo $FILE | sed -e "s@_@-@g")
+    json2po -i locale/$FILE.json -t locale/en.json -o po/$FILE.po
+    zanata-cli -q -B push --push-type trans -l $LOCALE
+fi
-- 
GitLab