From 8c7a5edb835663ddf57cf61b8f666413cbaaafda Mon Sep 17 00:00:00 2001 From: kwadronaut Date: Fri, 1 Mar 2024 00:57:49 +0000 Subject: Update l10n for app and app store meta data. Tweaks the tx config and the python script to pull all translations from Transifex and parse the meta data in a fastlane compatible format. --- scripts/prepareForTx.py | 108 ----------------------------- scripts/pullTranslations.py | 164 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 108 deletions(-) delete mode 100755 scripts/prepareForTx.py create mode 100755 scripts/pullTranslations.py (limited to 'scripts') diff --git a/scripts/prepareForTx.py b/scripts/prepareForTx.py deleted file mode 100755 index ec4c7314..00000000 --- a/scripts/prepareForTx.py +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env python3 -"" -__author__ = "kwadronaut" -__copyright__ = "Copyright 2023, LEAP" -__license__ = "GPL3 or later3 or later3 or later" -__version__ = "1" - -import os -import re -import argparse -import json - -# Set the path to the res directory containing different language folders -main_res_dir = "../app/src/main/res" -custom_res_dir = "../app/src/custom/res" - -# List all valid locale folders in the res directory -# We don't want to create a translated store listing without localized app -def list_locales(app_type): - locales = [] - if app_type == "main": - res_dir = main_res_dir - elif app_type == "custom": - res_dir = custom_res_dir - else: - raise ValueError("Invalid app type. Use 'main' or 'custom'.") - - valid_locale_pattern = re.compile(r'^values-(?P[a-z]{2})(-(?P