isso/bin/tx-pull
Martin Zimmermann 055a20606a add tx-pull and tx-push FILE helper scripts
tx-pull fetches translations from Transifex to .tx/<ressource>/<lang>
and converts the JSON into an AMD module. Requires `transifex-client`
from PyPi.

tx-push FILE submits a AMD translation module to Transifex using `curl`
and credentials from ~/.transifexrc.
2014-01-06 18:21:27 +01:00

14 lines
307 B
Fish
Executable File

#!/usr/bin/env fish
set -g TRANSIFEX ".tx/js/"
set -g JS "isso/js/app/i18n/%s.js"
# fetch latest translations to .tx/<ressource>/<lang>
tx pull -a
for lang in (ls $TRANSIFEX)
printf "define(" > (printf $JS $lang)
cat .tx/js/$lang >> (printf $JS $lang)
printf ");\n" >> (printf $JS $lang)
end