diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-10-21 10:11:14 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-10-21 10:11:14 +0200 |
| commit | 28fb2fe839d68b54c28448eba6803e9decc7b84c (patch) | |
| tree | 0af0d2ceed3bf6a647c3848c9275771bcd56ca24 /scripts/localization | |
| parent | 7cdfd0b139d9c597676efc5c22204d3ca1a1d66d (diff) | |
| parent | b619ad2efd8465b0447b47d8eaf4693ab8a6f4f2 (diff) | |
| download | mullvadvpn-28fb2fe839d68b54c28448eba6803e9decc7b84c.tar.xz mullvadvpn-28fb2fe839d68b54c28448eba6803e9decc7b84c.zip | |
Merge branch 'unify-formatting'
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 "$@" |
