From 3a0f6aca320f91bf0562e9ab3b8f28000285f0b6 Mon Sep 17 00:00:00 2001 From: Dunedan Date: Tue, 17 Dec 2024 10:02:55 +0100 Subject: [PATCH] Don't credit our Transifex account as translator This account is only used for fixing technical bugs in translations and not doing translations themselves, so let's exclude it from the credited translators. --- source/tools/i18n/credit_translators.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/tools/i18n/credit_translators.py b/source/tools/i18n/credit_translators.py index 7fa0b285a7..c756789d72 100755 --- a/source/tools/i18n/credit_translators.py +++ b/source/tools/i18n/credit_translators.py @@ -40,6 +40,9 @@ from babel import Locale, UnknownLocaleError from i18n_helper import L10N_FOLDER_NAME, PROJECT_ROOT_DIRECTORY, TRANSIFEX_CLIENT_FOLDER +# Set of translators by name to exclude from the credits. +EXCLUDE_TRANSLATORS = {"WFG Transifex"} + po_locations = [] for root, folders, _filenames in os.walk(PROJECT_ROOT_DIRECTORY): for folder in folders: @@ -104,7 +107,7 @@ for location in po_locations: for lang in langs_lists: translators = {} for name in sorted(langs_lists[lang], reverse=True): - if name.lower() not in translators or name.istitle(): + if (name.lower() not in translators or name.istitle()) and name not in EXCLUDE_TRANSLATORS: translators[name.lower()] = name langs_lists[lang] = sorted(translators.values(), key=lambda s: s.lower())