Secure push-trad-to-zanata

Test json files with python module to make sure they're valid before converting them to po

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Remove &&
This commit is contained in:
Thomas Citharel 2018-05-27 17:48:52 +02:00
parent 149b64e3b0
commit 4b8fe75f95
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,5 @@
locales:
json2po -P -i locale/en.json -t locale/en.json -o po/framadate.pot
scripts/locales.sh
push-locales: locales
zanata-cli -q -B push

9
scripts/locales.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
python -m json.tool < locale/en.json
if [[ $? == 0 ]];
then
json2po -P -i locale/en.json -t locale/en.json -o po/framadate.pot
else
echo "Can't convert json files to po, the json file is incorrect"
exit 1
fi