From 9e7ac9de6ddc482b0118e2642bd70d97d287c458 Mon Sep 17 00:00:00 2001 From: __JosephAbbey Date: Thu, 24 Jul 2025 23:46:25 +0100 Subject: [PATCH] Update removeTranslations.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: __JosephAbbey --- removeTranslations.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/removeTranslations.py b/removeTranslations.py index 553ada9..ff09c0c 100644 --- a/removeTranslations.py +++ b/removeTranslations.py @@ -74,7 +74,12 @@ def main(translation_id: str) -> None: :param translation_id: The id of the translation to remove. """ - xml_files = [d + "/strings/strings.xml" for d in os.listdir(".") if os.path.isdir(d) and "resources-" in d and os.path.exists(d + "/strings/strings.xml")] + xml_files = [] + for directory in os.listdir("."): + if os.path.isdir(directory) and "resources-" in directory: + xml_file_path = os.path.join(directory, "strings", "strings.xml") + if os.path.exists(xml_file_path): + xml_files.append(xml_file_path) for xml_file in xml_files: print(f"Processing file: {xml_file}")