funquail/front/scripts/i18n-compile.sh
Kasper Seweryn 2b40707f4f Cleanup a lot of stuff
I've replaced `lodash` with `lodash-es`, so it can be tree-shaken

`~/modules` is a directory with application modules that run before app is mounted. Useful for configuration, web socket connection, and other stuff

`~/composables` is a directory with our custom composables. Much like `~/utils` but each util is in its own file
2022-09-06 09:26:36 +00:00

13 lines
478 B
Bash
Executable file

#!/usr/bin/env -S bash -eux
cd "$(dirname $0)/.." # change into base directory
source scripts/utils.sh
locales=$(tail -n +3 src/locales.ts | sed -E 's/^[^[]+\[] =//' | jq -r '.[].code' | grep -v 'en_US')
mkdir -p src/translations
for locale in $locales; do
$(npm_binaries)/gettext-compile locales/$locale/LC_MESSAGES/app.po --output src/translations/$locale.json
done
# find locales -name '*.po' | xargs $(npm_binaries)/.bin/gettext-compile --output src/translations.json