Skip to content

Commit

Permalink
Secure push-trad-to-zanata
Browse files Browse the repository at this point in the history
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 &&
  • Loading branch information
tcitworld committed May 28, 2018
1 parent 149b64e commit 4b8fe75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
@@ -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
Expand Down
9 changes: 9 additions & 0 deletions scripts/locales.sh
@@ -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

0 comments on commit 4b8fe75

Please sign in to comment.