From 04aa01a39baf1d4c71ebaf4ab5c2d11a50d55fbf Mon Sep 17 00:00:00 2001 From: Dunedan Date: Mon, 9 Sep 2024 09:19:14 +0200 Subject: [PATCH] Speed up fetching of translations from Transifex This increases the number of workers to use when fetching translations from Transifex from 5 (the default) to 12. While the Transifex CLI allows up to 20 workers, using more workers results in frequent request throttling, which hurts performance more than it improves it. --- source/tools/i18n/pull_translations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tools/i18n/pull_translations.py b/source/tools/i18n/pull_translations.py index 24b178efcd..95adc75ed3 100755 --- a/source/tools/i18n/pull_translations.py +++ b/source/tools/i18n/pull_translations.py @@ -32,7 +32,7 @@ def main(): path = os.path.join(root, folder) os.chdir(path) print(f"INFO: Starting to pull translations in {path}...") - subprocess.run(["tx", "pull", "-a", "-f"], check=False) + subprocess.run(["tx", "pull", "--all", "--force", "--workers=12"], check=False) if __name__ == "__main__":