From 20fed253912cfa8348ca23433ae71215e0c96f31 Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 14 Dec 2023 16:00:51 +0000 Subject: [PATCH 1/2] Only process content.json from Localazy. --- changelog.d/pr-2031.misc | 1 + tools/localazy/generateLocalazyConfig.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 changelog.d/pr-2031.misc diff --git a/changelog.d/pr-2031.misc b/changelog.d/pr-2031.misc new file mode 100644 index 0000000000..8b9039fa02 --- /dev/null +++ b/changelog.d/pr-2031.misc @@ -0,0 +1 @@ +Only process content.json from Localazy. diff --git a/tools/localazy/generateLocalazyConfig.py b/tools/localazy/generateLocalazyConfig.py index b1ade3fdb0..ffdbe1f2c8 100755 --- a/tools/localazy/generateLocalazyConfig.py +++ b/tools/localazy/generateLocalazyConfig.py @@ -47,7 +47,7 @@ for entry in config["modules"]: "includeKeys": list(map(lambda i: "REGEX:" + i, entry["includeRegex"])), "excludeKeys": list(map(lambda i: "REGEX:" + i, excludeRegex)), "conditions": [ - "equals: ${languageCode}, en" + "equals: ${languageCode}, en | equals: ${file}, content.json" ] } # print(action) @@ -59,7 +59,7 @@ for entry in config["modules"]: "includeKeys": list(map(lambda i: "REGEX:" + i, entry["includeRegex"])), "excludeKeys": list(map(lambda i: "REGEX:" + i, excludeRegex)), "conditions": [ - "!equals: ${languageCode}, en" + "!equals: ${languageCode}, en | equals: ${file}, content.json" ] } allActions.append(actionTranslation) @@ -70,7 +70,7 @@ mainAction = baseAction | { "output": "libraries/ui-strings/src/main/res/values/localazy.xml", "excludeKeys": list(map(lambda i: "REGEX:" + i, allRegexToExcludeFromMainModule + regexToAlwaysExclude)), "conditions": [ - "equals: ${languageCode}, en" + "equals: ${languageCode}, en | equals: ${file}, content.json" ] } # print(mainAction) @@ -82,7 +82,7 @@ if allFiles: "output": "libraries/ui-strings/src/main/res/values-${langAndroidResNoScript}/translations.xml", "excludeKeys": list(map(lambda i: "REGEX:" + i, allRegexToExcludeFromMainModule + regexToAlwaysExclude)), "conditions": [ - "!equals: ${languageCode}, en" + "!equals: ${languageCode}, en | equals: ${file}, content.json" ] } allActions.append(mainActionTranslation) From 993432d3f8c70ed7ac238e92b1fb938ab645e785 Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 14 Dec 2023 16:07:41 +0000 Subject: [PATCH 2/2] Rename changelog --- changelog.d/{pr-2031.misc => 2031.misc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog.d/{pr-2031.misc => 2031.misc} (100%) diff --git a/changelog.d/pr-2031.misc b/changelog.d/2031.misc similarity index 100% rename from changelog.d/pr-2031.misc rename to changelog.d/2031.misc