From 19a218cd48d0814507c6ec985229373946014520 Mon Sep 17 00:00:00 2001 From: Itms Date: Wed, 16 Mar 2016 23:04:10 +0000 Subject: [PATCH] Change the language names for translation credits to the names in the original language. This removes the loophole in our release process, fixes #3827. This was SVN commit r17904. --- .../data/mods/public/gui/credits/credits.js | 3 ++ source/tools/i18n/creditTranslators.py | 36 +++++++++---------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/binaries/data/mods/public/gui/credits/credits.js b/binaries/data/mods/public/gui/credits/credits.js index 6235e3d6a8..235ddb60a7 100644 --- a/binaries/data/mods/public/gui/credits/credits.js +++ b/binaries/data/mods/public/gui/credits/credits.js @@ -18,6 +18,9 @@ function parseHelper(list) for (let object of list) { + if (object.LangName) + result += "[font=\"sans-bold-stroke-14\"]" + object.LangName + "\n"; + if (object.Title) result += "[font=\"sans-bold-stroke-14\"]" + translate(object.Title) + "\n"; diff --git a/source/tools/i18n/creditTranslators.py b/source/tools/i18n/creditTranslators.py index 69a108e954..ecc09fdf98 100644 --- a/source/tools/i18n/creditTranslators.py +++ b/source/tools/i18n/creditTranslators.py @@ -33,22 +33,22 @@ import json, os, glob, re # Credited languages - Keep in sync with source/tools/dist/remove-incomplete-translations.sh langs = { - 'cs': 'Czech', - 'de': 'German', + 'cs': 'Ceština', + 'de': 'Deutsch', 'en_GB': 'English (UK)', - 'es': 'Spanish', - 'fr': 'French', - 'gd': 'Gaelic', - 'gl': 'Galician', - 'id': 'Indonesian', - 'it': 'Italian', - 'nl': 'Dutch', - 'pl': 'Polish', - 'pt_PT': 'Portuguese (Portugal)', - 'pt_BR': 'Portuguese (Brazil)', - 'ru': 'Russian', - 'sk': 'Slovak', - 'tr': 'Turkish'} + 'es': 'Español', + 'fr': 'Français', + 'gd': 'Gàidhlig', + 'gl': 'Galego', + 'id': 'Bahasa Indonesia', + 'it': 'Italiano', + 'nl': 'Nederlands', + 'pl': 'Polski', + 'pt_PT': 'Português (Portugal)', + 'pt_BR': 'Português (Brasil)', + 'ru': 'Русский', + 'sk': 'Slovenčina', + 'tr': 'Türkçe'} root = '../../../' @@ -74,12 +74,12 @@ newJSONData = {'Content': []} # add them to the new data after processing, else add them immediately. # NB: All of this is quite inefficient for element in JSONData['Content']: - if 'Title' not in element or element['Title'] not in langs.values(): + if 'LangName' not in element or element['LangName'] not in langs.values(): newJSONData['Content'].append(element) continue for (langCode, langName) in langs.items(): - if element['Title'] == langName: + if element['LangName'] == langName: langsLists[langCode] = element['List'] break @@ -117,7 +117,7 @@ for lang in langs.keys(): # Now insert the new data into the new JSON file for (langCode, langList) in sorted(langsLists.items()): - newJSONData['Content'].append({'Title': langs[langCode], 'List': []}) + newJSONData['Content'].append({'LangName': langs[langCode], 'List': []}) for name in langList: newJSONData['Content'][-1]['List'].append({'name': name})