From 23921cef317c1dda0463d5e1e442b8fa8156b9a2 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 18 Sep 2024 09:49:51 +1000 Subject: [PATCH] chore: remove uneeded logs --- tools/localization/dynamicVariables.py | 7 +++---- tools/localization/generateLocales.py | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/localization/dynamicVariables.py b/tools/localization/dynamicVariables.py index 6832fae4d..1e3122ead 100644 --- a/tools/localization/dynamicVariables.py +++ b/tools/localization/dynamicVariables.py @@ -112,7 +112,6 @@ def findImproperTags(input_dict): # Find all improper tag matches improper_tags = [match for match in improper_tag_pattern.findall(value) if not re.match(r'<\s*/?\s*\w+.*?>', match)] - print(improper_tags) # Store the results in the output dictionary output_dict[key] = improper_tags @@ -179,7 +178,7 @@ def extractFormattingTags(input_dict): return output_dict_b_tags, output_dict_br_tags, output_dict_span_tags, disallowed_tags, improper_tags -def identifyLocaleDyanmicVariableDifferences(locales, locale_b_tags, +def identifyLocaleDynamicVariableDifferences(locales, locale_b_tags, locale_br_tags, locale_span_tags, locale_disallowed_tags, locale_improper_tags): """ @@ -288,12 +287,12 @@ def identifyLocaleDyanmicVariableDifferences(locales, locale_b_tags, def prettyPrintIssuesTable(issues): """ - Pretty prints a table from the return of identifyLocaleDyanmicVariableDifferences + Pretty prints a table from the return of identifyLocaleDynamicVariableDifferences where the rows are locale name and the columns are the issue types. Values will be number of occurrences of each issues. Args: - issues (dict): The issues dictionary returned from identifyLocaleDyanmicVariableDifferences. + issues (dict): The issues dictionary returned from identifyLocaleDynamicVariableDifferences. """ diff --git a/tools/localization/generateLocales.py b/tools/localization/generateLocales.py index 01e46d37f..d59c30ab2 100755 --- a/tools/localization/generateLocales.py +++ b/tools/localization/generateLocales.py @@ -13,7 +13,7 @@ timer = ExecutionTimer() from dynamicVariables import ( extractVariablesFromDict, - identifyLocaleDyanmicVariableDifferences, + identifyLocaleDynamicVariableDifferences, prettyPrintIssuesTable, identifyAndPrintOldDynamicVariables, extractFormattingTags, ) @@ -135,7 +135,7 @@ for locale, data in locales.items(): locale_improper_tags[locale], ) = extractFormattingTags(data) -problems = identifyLocaleDyanmicVariableDifferences(localeVariables, locale_b_tags, +problems = identifyLocaleDynamicVariableDifferences(localeVariables, locale_b_tags, locale_br_tags, locale_span_tags, locale_disallowed_tags, locale_improper_tags) @@ -174,7 +174,6 @@ if problems: if "missing_b_tags" in locale_problems: for problem_string, tag_issues in locale_problems["missing_b_tags"].items(): if tag_issues > 0: - print("ME", problem_string, tag_issues) if problem_string not in string_to_locales: string_to_locales[problem_string] = [locale] else: @@ -188,7 +187,6 @@ if problems: string_to_locales[problem_string].append(locale) if "disallowed_tags" in locale_problems: for problem_string, tag_issues in locale_problems["disallowed_tags"].items(): - print(f"problem string: {problem_string}, tag_issues: {tag_issues}") if tag_issues > 0: if problem_string not in string_to_locales: string_to_locales[problem_string] = [locale]