ko translation fixes, stderr fixes

This commit is contained in:
Sander Land committed 2020-05-31 01:55:55 +02:00
1 parent b69305dfdb
commit 325ab4a37f
6 files changed
+15 -8

No files matched your search

+3 -1
View File
@@ -3,10 +3,12 @@ Sander Land
Many thanks to these additional authors:
Matthew Allred ("Kameone") for design of the v1.1 UI and providing MacOS installation instructions.
"isty2e" for Korean translation.
Additional thanks to:
"Dontbtme" for detailed feedback and early testing of v1.0.
"Seventeen" for explanatory youtube videos and help on the Korean translation.
"Seventeen" for explanatory youtube videos.
+2 -1
View File
@@ -76,7 +76,7 @@ class KaTrainGui(Screen, KaTrainBase):
def log(self, message, level=OUTPUT_INFO):
super().log(message, level)
if level == OUTPUT_KATAGO_STDERR and "ERROR" not in self.controls.status_label.text:
if level == OUTPUT_KATAGO_STDERR and "ERROR" not in self.controls.status.text:
if "starting" in message.lower():
self.controls.set_status(f"KataGo engine starting...")
if message.startswith("Tuning"):
@@ -189,6 +189,7 @@ class KaTrainGui(Screen, KaTrainBase):
traceback.print_exc()
def __call__(self, message, *args):
print(self.engine.katago_process, "poll:", self.engine.katago_process.poll())
if self.game:
if message.endswith("popup"): # gui code needs to run in main kivy thread.
fn = getattr(self, f"_do_{message.replace('-', '_')}")
+5 -2
View File
@@ -64,7 +64,7 @@ class KataGoEngine:
self.katrain.log(f"Starting KataGo with {self.command}", OUTPUT_DEBUG)
self.katago_process = subprocess.Popen(
self.command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True
self.command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
except (FileNotFoundError, PermissionError, OSError) as e:
if not self.config["katago"].strip():
@@ -108,7 +108,10 @@ class KataGoEngine:
try:
line = self.katago_process.stderr.readline()
if line:
self.katrain.log(line.decode().strip(), OUTPUT_KATAGO_STDERR)
try:
self.katrain.log(line.decode().strip(), OUTPUT_KATAGO_STDERR)
except Exception as e:
print("ERROR IN PROCESSING STDERR", e)
except:
return
+1 -1
View File
@@ -158,7 +158,7 @@ class GameNode(SGFNode):
if not self.parent or not single_move: # root
return ""
text = i18n._("move").format(number=self.depth) + ": {single_move.player} {single_move.gtp()}\n"
text = i18n._("move").format(number=self.depth) + f": {single_move.player} {single_move.gtp()}\n"
if self.analysis_ready:
score = self.score
if sgf:
@@ -351,7 +351,7 @@ msgid "engine:katago"
msgstr "KataGo 실행 파일 경로"
msgid "engine:katago:hint"
msgstr "기본 제공 실행 파일을 사용하려면 비워 두십시오."
msgstr "비워 두면 내장된 실행 파일을 사용합니다."
msgid "engine:model"
msgstr "KataGo 신경망 파일 경로"
@@ -369,7 +369,8 @@ msgid "engine:max_time"
msgstr "최대 분석 시간"
msgid "engine:wide_root_noise"
msgstr "Wide root noise (더 다양한 수를 고려)"
"Wide root noise\n"
"(더 다양한 수를 고려)"
msgid "engine:wide_root_noise:hint"
msgstr ""
+1 -1
View File
@@ -34,7 +34,7 @@ a = Analysis(
print("SCRIPTS", len(a.scripts), "BIN", len(a.binaries), "ZIP", len(a.zipfiles), "DATA", len(a.datas))
EXCLUDE_SUFFIX = ["katago"]
EXCLUDE = ["KataGoData", "anim_", "screenshot_", "__pycache__", "locales/haha"]
EXCLUDE = ["KataGoData", "anim_", "screenshot_", "__pycache__"]
a.datas = [
(ff, ft, tp)
for ff, ft, tp in a.datas