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:
parent
149b64e3b0
commit
4b8fe75f95
2
Makefile
2
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
|
||||
|
|
9
scripts/locales.sh
Executable file
9
scripts/locales.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user