From f1a8d894579b77f96e333d8621fa5e9e8999e838 Mon Sep 17 00:00:00 2001 From: kwadronaut Date: Tue, 18 Jul 2023 17:06:34 +0200 Subject: Add Turkish and Dutch, fix .tx flow --- .tx/config | 4 +- scripts/prepareForTx.py | 107 +++++++++++++++++++++ src/README.md | 27 +++++- .../fastlane/metadata/nl/full_description.txt | 3 + .../fastlane/metadata/nl/short_description.txt | 1 + src/custom/fastlane/metadata/nl/store-meta-nl.json | 5 + src/custom/fastlane/metadata/nl/title.txt | 1 + .../fastlane/metadata/nl-NL/full_description.txt | 11 --- .../fastlane/metadata/nl-NL/short_description.txt | 1 - src/normal/fastlane/metadata/nl-NL/title.txt | 1 - .../fastlane/metadata/nl/full_description.txt | 11 +++ .../fastlane/metadata/nl/short_description.txt | 1 + src/normal/fastlane/metadata/nl/store-meta-nl.json | 5 + src/normal/fastlane/metadata/nl/title.txt | 1 + .../fastlane/metadata/tr/full_description.txt | 12 +++ .../fastlane/metadata/tr/short_description.txt | 2 + src/normal/fastlane/metadata/tr/store-meta-tr.json | 5 + src/normal/fastlane/metadata/tr/title.txt | 1 + src/normal/fastlane/metadata/tr/tx-values-tr.json | 1 + 19 files changed, 184 insertions(+), 16 deletions(-) create mode 100755 scripts/prepareForTx.py create mode 100644 src/custom/fastlane/metadata/nl/full_description.txt create mode 100644 src/custom/fastlane/metadata/nl/short_description.txt create mode 100644 src/custom/fastlane/metadata/nl/store-meta-nl.json create mode 100644 src/custom/fastlane/metadata/nl/title.txt delete mode 100644 src/normal/fastlane/metadata/nl-NL/full_description.txt delete mode 100644 src/normal/fastlane/metadata/nl-NL/short_description.txt delete mode 100644 src/normal/fastlane/metadata/nl-NL/title.txt create mode 100644 src/normal/fastlane/metadata/nl/full_description.txt create mode 100644 src/normal/fastlane/metadata/nl/short_description.txt create mode 100644 src/normal/fastlane/metadata/nl/store-meta-nl.json create mode 100644 src/normal/fastlane/metadata/nl/title.txt create mode 100644 src/normal/fastlane/metadata/tr/full_description.txt create mode 100644 src/normal/fastlane/metadata/tr/short_description.txt create mode 100644 src/normal/fastlane/metadata/tr/store-meta-tr.json create mode 100644 src/normal/fastlane/metadata/tr/title.txt create mode 100644 src/normal/fastlane/metadata/tr/tx-values-tr.json diff --git a/.tx/config b/.tx/config index fb2da86d..66127f4a 100644 --- a/.tx/config +++ b/.tx/config @@ -7,13 +7,13 @@ lang_map = es_AR: es-rAR, fa_IR: fa-rIR, kn_IN: kn-rIN, pt_BR: pt-rBR, pt_PT: pt source_file = se.leap.bitmasakclient.json type = KEYVALUEJSON resource_name = Bitmask details in Appstore -file_filter = bitmaskclient/google/-strings.json +file_filter = src/normal/fastlane/metadata//store-meta-.json minimum_perc = 96 [o:otf:p:bitmask:r:riseupvpn-playstore-listing] source_file = se.leap.riseupvpn-desc.json type = KEYVALUEJSON resource_name = RiseupVPN details in Appstore -file_filter = riseupvpn/google/-strings.json +file_filter = src/custom/fastlane/metadata//store-meta-.json minimum_perc = 96 diff --git a/scripts/prepareForTx.py b/scripts/prepareForTx.py new file mode 100755 index 00000000..c683c84a --- /dev/null +++ b/scripts/prepareForTx.py @@ -0,0 +1,107 @@ +#!/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 +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