From bcb97d6349211f75811beffbef93bfe964a3fbd6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 12:09:36 +0000 Subject: [PATCH 1/2] Initial plan From d68a8d6228b109baac4087f0898da5e46cf3f603 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 12:11:37 +0000 Subject: [PATCH 2/2] Fix class naming, translation check bug, comment, spacing, and disabled_rules param Co-authored-by: admdly <2807620+admdly@users.noreply.github.com> --- check.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/check.py b/check.py index 47cb1ea..3dec4e2 100644 --- a/check.py +++ b/check.py @@ -26,7 +26,7 @@ } # poChecker class - does all the main work -class poChecker: +class PoChecker: totalIssues = 0 def __init__( @@ -61,7 +61,7 @@ def process(self): if self.check_source: self.doCheck(entry.msgid) if self.check_translation and entry.msgstr: - self.doCheck(entry.msgid) + self.doCheck(entry.msgstr) self.tool.close() @@ -90,7 +90,7 @@ def suggestCorrectionsFromCustomDic(self, typo, distance_limit=3): return suggested_word - # Checks an issue against the + # Checks an issue against the custom dictionary to decide if it should be ignored def isIssueValid(self, issue): context = issue.context[ issue.offsetInContext : issue.offsetInContext + issue.errorLength @@ -107,7 +107,7 @@ def outputIssue(self, issue): pointer = "^" * issue.errorLength context = issue.context.strip() suggestion = None - self.totalIssues+=1 + self.totalIssues += 1 print(Fore.RED + f"{issue.message.strip()}") print(Fore.YELLOW + f"{context}") @@ -184,12 +184,13 @@ def main(): default_config = jsonschema_default.create_from(schema) config = {**default_config, **config} - checker = poChecker( + checker = PoChecker( args.path, language=args.language, check_source=config["checkSourceString"], check_translation=config["checkTranslationString"], dict=config["customDictionary"], + disabled_rules=config["disabledRules"], verbose=args.verbose, )