Browse Source

Merge pull request #2031 from pixlwave/doug/localazy-files

Only download content.json from Localazy.
pull/2034/head
Benoit Marty 9 months ago committed by GitHub
parent
commit
1af6bbb013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      changelog.d/2031.misc
  2. 8
      tools/localazy/generateLocalazyConfig.py

1
changelog.d/2031.misc

@ -0,0 +1 @@ @@ -0,0 +1 @@
Only process content.json from Localazy.

8
tools/localazy/generateLocalazyConfig.py

@ -47,7 +47,7 @@ for entry in config["modules"]: @@ -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"]: @@ -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 | { @@ -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: @@ -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)

Loading…
Cancel
Save