From 3504c51ed30f2b0570d2ef36210a5f014839db36 Mon Sep 17 00:00:00 2001 From: Cooliokid956 <68075390+Cooliokid956@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:27:42 -0500 Subject: [PATCH] the spoken peachy review it is honestly better printing everything after processing, thanks --- autogen/check_languages.py | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/autogen/check_languages.py b/autogen/check_languages.py index 0ab8ef6f2..611aeee4d 100644 --- a/autogen/check_languages.py +++ b/autogen/check_languages.py @@ -37,12 +37,14 @@ for file in os.listdir(os.fsencode(LANG_DIR)): lang = open_lang(filename) warned = False + sections = [] for section in DEF_LANG.sections(): warnings = { - "UNTRANSLATED": [], - "MISSING": [], - "EXTRA": [], + "Name": section, + "Untranslated": [], + "Missing": [], + "Extra": [], } if lang.has_section(section): @@ -50,10 +52,10 @@ for file in os.listdir(os.fsencode(LANG_DIR)): for entry in entries: if lang.has_option(section, entry): if not DEF_LANG.has_option(section, entry): - warnings["EXTRA"].append(entry) + warnings["Extra"].append(entry) continue else: - warnings["MISSING"].append(entry) + warnings["Missing"].append(entry) continue verified = verified_entries.get(filename) @@ -64,15 +66,20 @@ for file in os.listdir(os.fsencode(LANG_DIR)): if lang.get(section, entry) == DEF_LANG.get(section, entry) \ and not verified: - warnings["UNTRANSLATED"].append(entry) - else: warnings["MISSING"].append("SECTION") + warnings["Untranslated"].append(entry) + else: warnings["Missing"].append("Section") - if len(warnings["EXTRA"] + warnings["MISSING"] + warnings["UNTRANSLATED"]) > 0: - if not warned: warned = True; print(filename+":") + if len(warnings["Extra"] + warnings["Missing"] + warnings["Untranslated"]) > 0: + sections.append(warnings) + + if len(sections) > 0: + print(filename) + for warnings in sections: + print(f" [{warnings.pop("Name")}]") - print(f"[{section}]") for level, entries in warnings.items(): if len(entries) > 0: - print(level + ": " + ", ".join(entries)) - print() + print(f" {level}: " + ", ".join(entries)) + print() + \ No newline at end of file