1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/usr/bin/env bash set -Eeuo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" cd ../ set -x ./scripts/extract-translations.sh ./scripts/apply-translations.sh if [[ "${1:-}" = '--check' ]]; then git add locale/ git diff --quiet --staged || { echo 'Translations are out of sync' exit 1 } fi