diff options
| author | Jules Aguillon | 2025-08-16 18:55:26 +0200 |
|---|---|---|
| committer | GitHub | 2025-08-16 18:55:26 +0200 |
| commit | 00d7d882712b28118386a53075e77a4ccd2dfe16 (patch) | |
| tree | d5b90acdf506b8d9fd3366ddedac9f56c5d0efa0 | |
| parent | 7e4e4bf4d9e5a14eb8626d9321e186792dd6ece4 (diff) | |
| download | unexpected-keyboard-00d7d882712b28118386a53075e77a4ccd2dfe16.tar.gz unexpected-keyboard-00d7d882712b28118386a53075e77a4ccd2dfe16.zip | |
gradle: Disable sync_translations (#1076)
The diffs created by sync_translations.py creates conflicts with the
changes made on Weblate. It is disable to make merging translations from
Weblate easier.
| -rw-r--r-- | build.gradle | 11 | ||||
| -rw-r--r-- | sync_translations.py | 6 |
2 files changed, 5 insertions, 12 deletions
diff --git a/build.gradle b/build.gradle index 9cad84c..444525e 100644 --- a/build.gradle +++ b/build.gradle @@ -89,8 +89,6 @@ android { } lintOptions { - // Translation are already checked by 'syncTranslations' - disable 'MissingTranslation' } } @@ -121,7 +119,6 @@ tasks.register('genEmojis') { tasks.withType(Test).configureEach { dependsOn 'genLayoutsList' dependsOn 'checkKeyboardLayouts' - dependsOn 'syncTranslations' dependsOn 'compileComposeSequences' } @@ -141,14 +138,6 @@ tasks.register('checkKeyboardLayouts') { } } -tasks.register('syncTranslations') { - println "\nUpdating translations" - exec { - workingDir = projectDir - commandLine "python", "sync_translations.py" - } -} - tasks.register('compileComposeSequences') { def out = "srcs/juloo.keyboard2/ComposeKeyData.java" println "\nGenerating ${out}" diff --git a/sync_translations.py b/sync_translations.py index fe76623..3d0ab7d 100644 --- a/sync_translations.py +++ b/sync_translations.py @@ -1,5 +1,5 @@ import xml.etree.ElementTree as ET -import glob, os +import glob, os, sys # Edit every strings.xml files: # - Add missing translation as comments @@ -87,6 +87,10 @@ def sync_metadata(value_dir, strings): sync_meta_file("short_description.txt", ("short_description", None)) sync_meta_file("full_description.txt", ("store_description", None)) +if len(sys.argv) < 2 or sys.argv[1] != "sync": + print("Syncing of translation files is no longer needed. Run with 'sync_translation.py sync' to do it anyway.") + exit(1) + baseline = parse_strings_file("res/values/strings.xml") for value_dir in glob.glob("res/values-*"): |
