merge
This commit is contained in:
commit
9fc458f3fb
14 files changed
+27
-23
No files matched your search
@@ -101,14 +101,18 @@ for lang in locales:
|
||||
print("Fixed", pofile[lang], "and converted ->", mofile)
|
||||
|
||||
|
||||
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:
|
||||
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
|
||||
|
||||
for ext in ["py", "kv"]:
|
||||
lc = 0
|
||||
for file in glob.glob(f"katrain/*.{ext}") + glob.glob(f"katrain/**/*.{ext}"):
|
||||
with open(file, "r") as f:
|
||||
for i, line in enumerate(f.readlines()):
|
||||
if line.strip():
|
||||
lc += 1
|
||||
matches = [m.strip() for m in re.findall(r"i18n._\((.*?)\)", line)]
|
||||
for msgid in matches:
|
||||
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
|
||||
print(f"Checked {lc} lines of {ext} code for missing i18n entries.")
|
||||
sys.exit(int(errors))
|
||||
@@ -263,7 +263,7 @@ class NewGamePopup(QuickConfigGui):
|
||||
self.katrain.game.root.set_property("P" + bw, name)
|
||||
self.katrain.update_player(bw, **player_setup.player_type_dump)
|
||||
|
||||
def update_from_current_game(self):
|
||||
def update_from_current_game(self, *args):
|
||||
for bw in "BW":
|
||||
name = self.katrain.game.root.get_property("P" + bw, None)
|
||||
if name:
|
||||
|
||||
Binary file not shown.
@@ -817,5 +817,5 @@ msgstr "Fast playout to game end"
|
||||
#. TODO - Status message
|
||||
msgid "playtoend:status"
|
||||
msgstr ""
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moved "
|
||||
"played.moves played."
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moves "
|
||||
"played."
|
||||
Binary file not shown.
@@ -125,8 +125,8 @@ msgstr "Fast playout to game end"
|
||||
#. Status message
|
||||
msgid "playtoend:status"
|
||||
msgstr ""
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moved "
|
||||
"played.moves played."
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moves "
|
||||
"played."
|
||||
|
||||
#. Keep improving current position analysis when there is nothing else to do
|
||||
msgid "analysis:continuous"
|
||||
|
||||
Binary file not shown.
@@ -824,5 +824,5 @@ msgstr "Fast playout to game end"
|
||||
#. TODO - Status message
|
||||
msgid "playtoend:status"
|
||||
msgstr ""
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moved "
|
||||
"played.moves played."
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moves "
|
||||
"played."
|
||||
Binary file not shown.
@@ -851,5 +851,5 @@ msgstr "Fast playout to game end"
|
||||
#. TODO - Status message
|
||||
msgid "playtoend:status"
|
||||
msgstr ""
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moved "
|
||||
"played.moves played."
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moves "
|
||||
"played."
|
||||
Binary file not shown.
@@ -778,5 +778,5 @@ msgstr "Fast playout to game end"
|
||||
#. TODO - Status message
|
||||
msgid "playtoend:status"
|
||||
msgstr ""
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moved "
|
||||
"played.moves played."
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moves "
|
||||
"played."
|
||||
Binary file not shown.
@@ -814,5 +814,5 @@ msgstr "Fast playout to game end"
|
||||
#. TODO - Status message
|
||||
msgid "playtoend:status"
|
||||
msgstr ""
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moved "
|
||||
"played.moves played."
|
||||
"Playing the game quickly to the end, please wait ... {num_moves} moves "
|
||||
"played."
|
||||
Reference in new issue
Block a user