055a20606a
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.
14 lines
307 B
Fish
Executable File
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
|