From b17773ec3df817f860129c5636164187aebc7816 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Tue, 24 Jun 2025 17:42:11 +0200 Subject: [PATCH] localizationChecker: Added method to ignore specific error messages in the evaluation of a language --- .github/scripts/localizationChecker.py | 16 ++++++++++++++-- descriptions/rep/zh_cn.lua | 4 ++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/scripts/localizationChecker.py b/.github/scripts/localizationChecker.py index 64b1bd53..bcca72ae 100644 --- a/.github/scripts/localizationChecker.py +++ b/.github/scripts/localizationChecker.py @@ -27,13 +27,19 @@ Cyan='\033[0;36m' # Cyan White='\033[0;37m' # White BWhite='\033[1;37m' # Bold White -ignoreNodesWithName = {"fonts"} +ignoreNodesWithName = {"fonts", "alternativeLanguageCodes"} ignoreTypeMissmatchNodesWithName = {"ConditionalDescs", "BFFSSynergies"} dlcs = ["ab+", "rep", "rep+"] -maxChecklimit = {"tarotClothBuffs": 2, "carBattery": 2, "BFFSSynergies": 2} +maxChecklimit = {"tarotClothBuffs": 1, "carBattery": 1, "BFFSSynergies": 1} +ignoreErrors = { +"fr(rep)->collectibles->49", # No number to change in text +"fr(rep)->ConditionalDescs->5.300.83", # not applicable +"fr(rep+)->tarotClothBuffs->11", # Not needed, since pluralization is already handles in rep file +"zh_cn(rep+)->tarotClothBuffs->11", # Not needed +} # count English entries for stats def count_entries(t): @@ -80,6 +86,9 @@ def compare_tables(table1, table2, prev_key): # dont evaluate nodes that are listed in this table continue if k not in table2: + if prev_key+"->"+str(k) in ignoreErrors: + # ignore this error + continue print(f"\tTable '{prev_key}' does not contain entry: {k}") errorCount += 1 # table is missing. add all missing entries as error @@ -100,6 +109,9 @@ def compare_tables(table1, table2, prev_key): ignoreError = True break if not ignoreError: + if prev_key+"->"+str(k) in ignoreErrors: + # ignore this error + continue print(f"\tType mismatch in table '{prev_key}', key: {k}") errorCount += 1 diff --git a/descriptions/rep/zh_cn.lua b/descriptions/rep/zh_cn.lua index 2113349a..2e908b7d 100644 --- a/descriptions/rep/zh_cn.lua +++ b/descriptions/rep/zh_cn.lua @@ -762,6 +762,10 @@ EID.descriptions[languageCode].TearFlagNames = { [106] = "{{Collectible506}}从背后攻击造成更多伤害并造成流血", -- Deals extra damage from behind and inflicts bleeding } +-- Special Locust effects when Item was eaten by Abyss. Entries here will override the auto-generated descriptions +-- Kept in for backwards compatibility +EID.descriptions[languageCode].abyssSynergies = {} + -- Effect of Car battery on Active Items local repCarBattery = { [34] = {2, 3}, -- The Book of Belial