tsumego solver 5000 is go
This commit is contained in:
1 parent
da42fc4e0f
commit
0ade2524ce
27 files changed
+252
-83
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user