#!/usr/bin/env python3 "" __author__ = "kwadronaut, cyberta" __copyright__ = "Copyright 2023, LEAP" __license__ = "GPL3 or later3 or later3 or later" __version__ = "2" import os import re import argparse import json import subprocess import sys def get_script_path(): return os.path.dirname(os.path.realpath(sys.argv[0])) # Set the path to the res directory containing different language folders main_res_dir = get_script_path() + "/../app/src/main/res" custom_res_dir = get_script_path() + "/../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