diff --git a/katrain/__main__.py b/katrain/__main__.py index 1ea853f..e3fcf38 100644 --- a/katrain/__main__.py +++ b/katrain/__main__.py @@ -332,7 +332,7 @@ class KaTrainGui(Screen, KaTrainBase): self.controls.timer.paused = True if not self.config_popup: self.config_popup = I18NPopup( - title_key="general settings title", size=[dp(1200), dp(800)], content=ConfigPopup(self) + title_key="general settings title", size=[dp(1200), dp(850)], content=ConfigPopup(self) ).__self__ self.config_popup.content.popup = self.config_popup self.config_popup.open() diff --git a/katrain/core/engine.py b/katrain/core/engine.py index 0ef853b..aba461e 100644 --- a/katrain/core/engine.py +++ b/katrain/core/engine.py @@ -30,7 +30,7 @@ class KataGoEngine: def get_rules(node): return KataGoEngine.RULESETS.get(str(node.ruleset).lower(), "japanese") - def __init__(self, katrain, config, override_command=None): + def __init__(self, katrain, config): self.katrain = katrain self.queries = {} # outstanding query id -> start time and callback self.config = config @@ -43,10 +43,8 @@ class KataGoEngine: self.stderr_thread = None exe = config.get("katago", "").strip() - if override_command: - self.command = override_command - elif exe.startswith('"') and exe.endswith('"'): - self.command = exe.strip('"') + if config.get("altcommand",""): + self.command = config["altcommand"] else: if not exe: if platform == "win": diff --git a/katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo index 6e51bd4..b27b724 100644 Binary files a/katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/cn/LC_MESSAGES/katrain.po b/katrain/i18n/locales/cn/LC_MESSAGES/katrain.po index 1ccceb4..478f96d 100644 --- a/katrain/i18n/locales/cn/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/cn/LC_MESSAGES/katrain.po @@ -607,3 +607,13 @@ msgstr "Default Theme" #. TODO - theme label msgid "theme" msgstr "Colour Theme" + +#. TODO +msgid "engine:altcommand:hint" +msgstr "" +"Full command used to start the engine, for e.g. using plink to connect to a " +"remote engine." + +#. TODO +msgid "engine:altcommand" +msgstr "Override Engine Command" diff --git a/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo index 4a1c9da..7273c16 100644 Binary files a/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/de/LC_MESSAGES/katrain.po b/katrain/i18n/locales/de/LC_MESSAGES/katrain.po index 337431d..0ec100f 100644 --- a/katrain/i18n/locales/de/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/de/LC_MESSAGES/katrain.po @@ -651,3 +651,13 @@ msgstr "Default Theme" #. TODO - theme label msgid "theme" msgstr "Colour Theme" + +#. TODO +msgid "engine:altcommand:hint" +msgstr "" +"Full command used to start the engine, for e.g. using plink to connect to a " +"remote engine. All other model options will be ignored." + +#. TODO +msgid "engine:altcommand" +msgstr "Override Engine Command" diff --git a/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo index 35348fc..b39c496 100644 Binary files a/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/en/LC_MESSAGES/katrain.po b/katrain/i18n/locales/en/LC_MESSAGES/katrain.po index ebcfb7c..f12ee12 100644 --- a/katrain/i18n/locales/en/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/en/LC_MESSAGES/katrain.po @@ -411,6 +411,14 @@ msgstr "Path to KataGo model file" msgid "engine:config" msgstr "Path to KataGo config file" +msgid "engine:altcommand" +msgstr "Override Engine Command" + +msgid "engine:altcommand:hint" +msgstr "" +"Full command used to start the engine, for e.g. using plink to connect to a " +"remote engine. All other model options will be ignored." + msgid "engine:max_visits" msgstr "Maximum number of visits in analysis" diff --git a/katrain/i18n/locales/es/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/es/LC_MESSAGES/katrain.mo index df67053..ed214c1 100644 Binary files a/katrain/i18n/locales/es/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/es/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/es/LC_MESSAGES/katrain.po b/katrain/i18n/locales/es/LC_MESSAGES/katrain.po index f2c5e75..f4f7bde 100644 --- a/katrain/i18n/locales/es/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/es/LC_MESSAGES/katrain.po @@ -647,3 +647,13 @@ msgstr "Default Theme" #. TODO - theme label msgid "theme" msgstr "Colour Theme" + +#. TODO +msgid "engine:altcommand:hint" +msgstr "" +"Full command used to start the engine, for e.g. using plink to connect to a " +"remote engine. All other model options will be ignored." + +#. TODO +msgid "engine:altcommand" +msgstr "Override Engine Command" diff --git a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo index f8bba30..c9788cf 100644 Binary files a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po index 8e9f2e0..1b13684 100644 --- a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po @@ -688,3 +688,13 @@ msgstr "Default Theme" #. TODO - theme label msgid "theme" msgstr "Colour Theme" + +#. TODO +msgid "engine:altcommand:hint" +msgstr "" +"Full command used to start the engine, for e.g. using plink to connect to a " +"remote engine. All other model options will be ignored." + +#. TODO +msgid "engine:altcommand" +msgstr "Override Engine Command" diff --git a/katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo index ae85ba0..39d0cd7 100644 Binary files a/katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/jp/LC_MESSAGES/katrain.po b/katrain/i18n/locales/jp/LC_MESSAGES/katrain.po index 51f74a1..53fb8c3 100644 --- a/katrain/i18n/locales/jp/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/jp/LC_MESSAGES/katrain.po @@ -634,3 +634,13 @@ msgstr "デフォルト" #. TODO - theme label msgid "theme" msgstr "カラーテーマ" + +#. TODO +msgid "engine:altcommand:hint" +msgstr "" +"Full command used to start the engine, for e.g. using plink to connect to a " +"remote engine. All other model options will be ignored." + +#. TODO +msgid "engine:altcommand" +msgstr "Override Engine Command" diff --git a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo index fb5e739..d00fe44 100644 Binary files a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po index f442958..365249d 100644 --- a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po @@ -623,3 +623,13 @@ msgstr "Default Theme" #. TODO - theme label msgid "theme" msgstr "Colour Theme" + +#. TODO +msgid "engine:altcommand:hint" +msgstr "" +"Full command used to start the engine, for e.g. using plink to connect to a " +"remote engine. All other model options will be ignored." + +#. TODO +msgid "engine:altcommand" +msgstr "Override Engine Command" diff --git a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo index 4c3def2..65e1612 100644 Binary files a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.po b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.po index 0415044..951ca3a 100644 --- a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.po @@ -648,3 +648,13 @@ msgstr "Default Theme" #. TODO - theme label msgid "theme" msgstr "Colour Theme" + +#. TODO +msgid "engine:altcommand:hint" +msgstr "" +"Full command used to start the engine, for e.g. using plink to connect to a " +"remote engine. All other model options will be ignored." + +#. TODO +msgid "engine:altcommand" +msgstr "Override Engine Command" diff --git a/katrain/popups.kv b/katrain/popups.kv index da94c31..9f18548 100644 --- a/katrain/popups.kv +++ b/katrain/popups.kv @@ -87,8 +87,8 @@ font_size: DESC_FONT_SIZE * 1.5 GridLayout: cols: 2 - rows: 4 - size_hint: 1,4 + rows: 5 + size_hint: 1,5 spacing: CP_SPACING DescriptionLabel: text: i18n._("engine:katago") @@ -126,6 +126,13 @@ sync_height_frac: 1.0 -font_size: self.height * 0.5 -background_color: [*[c*255/88 for c in BOX_BACKGROUND_COLOR[:3]], 1] # compensate for texture + DescriptionLabel: + text: i18n._("engine:altcommand") + size_hint: 0.33, 1 + AnchorLayout: + LabelledPathInput: + input_property: "engine/altcommand" + hint_text: i18n._("engine:altcommand:hint") BoxLayout: size_hint: 1,1 orientation: 'horizontal'