diff options
Diffstat (limited to 'scripts/localization')
| -rwxr-xr-x | scripts/localization | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/localization b/scripts/localization index 6d0f6ac104..097f113a4d 100755 --- a/scripts/localization +++ b/scripts/localization @@ -13,8 +13,9 @@ function main { upload) upload_to_crowdin;; download) download_from_crowdin;; sync-local-files) sync_localizations;; + verify) verify;; "") - echo "Available subcommands: prepare, upload, download and sync-local-files" + echo "Available subcommands: prepare, upload, download, sync-local-files and verify" ;; *) echo "Unknown parameter: $1" @@ -102,5 +103,21 @@ function download_from_crowdin { commit_changes "Update translations" } +function verify { + sync_localizations + git diff + ! git status -s | grep . + local out_of_sync=$? + + pushd ../gui/scripts + npm exec ts-node verify-translations-format.ts + local incorrect_format=$? + popd + + if [ "$out_of_sync" -ne 0 ] || [ "$incorrect_format" -ne 0 ]; then + exit 1 + fi +} + main "$@" |
