2018-06-30 09:11:45 +00:00
|
|
|
#!/bin/bash -eux
|
2018-12-19 20:45:12 +00:00
|
|
|
locales=$(tail -n +2 src/locales.js | sed -e 's/export default //' | jq '.locales[].code' | grep -v 'en_US' | xargs echo)
|
2018-12-20 13:16:56 +00:00
|
|
|
mkdir -p src/translations
|
|
|
|
|
2018-12-19 20:45:12 +00:00
|
|
|
for locale in $locales; do
|
2018-12-20 13:16:56 +00:00
|
|
|
$(yarn bin)/gettext-compile locales/$locale/LC_MESSAGES/app.po --output src/translations/$locale.json
|
2018-12-19 20:45:12 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# find locales -name '*.po' | xargs $(yarn bin)/gettext-compile --output src/translations.json
|