1
0
forked from mirrors/0ad

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.
This commit is contained in:
Dunedan
2024-12-17 10:02:55 +01:00
parent ce197de0b0
commit 3a0f6aca32
+4 -1
View File
@@ -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())