insert mode
This commit is contained in:
1 parent
f85399ad57
commit
da42fc4e0f
33 files changed
+256
-172
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import copy
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import copy
|
||||
from collections import defaultdict
|
||||
|
||||
import polib
|
||||
@@ -100,4 +101,13 @@ for lang in locales:
|
||||
print("Fixed", pofile[lang], "and converted ->", mofile)
|
||||
|
||||
|
||||
for file in glob.glob("katrain/**/*.py") + glob.glob("katrain/**/*.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
|
||||
print(f"Missing {msgid} used in code at \t{file}:{i} \t'{line.strip()}'")
|
||||
errors += 1
|
||||
|
||||
sys.exit(int(errors))
|
||||
Reference in new issue
Block a user