date.chapril.org-framadate/push-trad-to-zanata.sh
Luc Didry 3637e052d5 [Zanata] Add script to update zanata for one locale
ex: ./push-trad-to-zanata.sh fr_FR
2018-02-27 17:39:46 +01:00

12 lines
295 B
Bash
Executable File

#!/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