diff options
| author | Jules Aguillon | 2026-05-02 21:34:19 +0200 |
|---|---|---|
| committer | GitHub | 2026-05-02 21:34:19 +0200 |
| commit | e2fdced765366aa99b6a2f94253e18f568bf93e1 (patch) | |
| tree | f2eb37310db1b6d521702784749b311a9ece8048 /sync_translations.py | |
| parent | 78a7ffc473e011d575760f7c457adb065ddf6087 (diff) | |
| download | unexpected-keyboard-e2fdced765366aa99b6a2f94253e18f568bf93e1.tar.gz unexpected-keyboard-e2fdced765366aa99b6a2f94253e18f568bf93e1.zip | |
releases: Update languages supported by Google Play (#1257)
Remove languages from fastlane metadata that are not supported by Google
Play and prevented the release from continuing.
Diffstat (limited to 'sync_translations.py')
| -rw-r--r-- | sync_translations.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sync_translations.py b/sync_translations.py index ca36ee6..3532a27 100644 --- a/sync_translations.py +++ b/sync_translations.py @@ -8,17 +8,19 @@ import glob, os, sys # The baseline is 'values/strings.xml', which is english. # Sync store title and descriptions to the metadata directory. +# Map language codes to the codes that Google Play understands. Languages +# mapped to [None] are not supported by Google Play. VALUE_DIR_TO_METADATA = { "ar": "ar", - "ars": "ars", - "arz": "arz", - "bn-rBD": "bn-BD", + "ars": None, + "arz": None, + "bn-rBD": None, "ca": "ca", "cs": "cs-CZ", "de": "de-DE", "en": "en-US", "es": "es-ES", - "fa": "fa-IR", + "fa": None, "fil": "fil", "fr": "fr-FR", "in": "id", @@ -26,14 +28,14 @@ VALUE_DIR_TO_METADATA = { "ja": "ja-JP", "ko": "ko-KR", "lv": "lv", - "my": "my", + "my": None, "nl": "nl-NL", "pl": "pl-PL", "pt": "pt-BR", "ro": "ro", "ru": "ru-RU", "th": "th", - "tok": "tok", + "tok": None, "tr": "tr-TR", "uk": "uk", "vi": "vi", @@ -78,7 +80,10 @@ def sync_metadata(value_dir, strings): locale = os.path.basename(value_dir).removeprefix("values-") if not locale in VALUE_DIR_TO_METADATA: raise Exception("Locale '%s' not known, please add it into sync_translations.py" % locale) - meta_dir = "fastlane/metadata/android/" + VALUE_DIR_TO_METADATA[locale] + metadata_name = VALUE_DIR_TO_METADATA[locale] + if metadata_name == None: + return # Not supported by the play store + meta_dir = "fastlane/metadata/android/" + metadata_name def sync_meta_file(fname, string_name): if string_name in strings: string = strings[string_name] |
