tsumego solver 5000 is go

This commit is contained in:
Sander Land committed 2020-12-03 22:09:46 +01:00
1 parent da42fc4e0f
commit 0ade2524ce
27 files changed
+252 -83

No files matched your search

+3 -2
View File
@@ -101,12 +101,13 @@ for lang in locales:
print("Fixed", pofile[lang], "and converted ->", mofile)
for file in glob.glob("katrain/**/*.py") + glob.glob("katrain/**/*.kv"):
for file in glob.glob("**/*.py") + glob.glob("**/*.kv"):
with open(file, "r") as f:
for i, line in enumerate(f.readlines()):
matches = [m.strip() for m in re.findall(r"i18n._\((.*?)\)", line)]
for msgid in matches:
if msgid[0] in ['"', "'"] and msgid.strip("\"'") not in strings_to_langs: # not code
stripped_msgid = msgid.strip("\"'")
if stripped_msgid and msgid[0] in ['"', "'"] and stripped_msgid not in strings_to_langs: # not code
print(f"Missing {msgid} used in code at \t{file}:{i} \t'{line.strip()}'")
errors += 1