From 155ddd631c35e66375702165ffb904f73512529a Mon Sep 17 00:00:00 2001 From: Sander Land Date: Mon, 25 May 2020 23:23:11 +0200 Subject: [PATCH] icon fix, i18n --- katrain/__main__.py | 20 +- katrain/core/common.py | 3 +- katrain/core/engine.py | 7 +- katrain/core/game_node.py | 24 ++- katrain/gui.kv | 159 ++++++++-------- katrain/gui/controlspanel.py | 1 - katrain/gui/graph.py | 2 - katrain/gui/kivyutils.py | 9 +- katrain/gui/style.py | 12 +- .../i18n/locales/en/LC_MESSAGES/katrain.mo | Bin 829 -> 2847 bytes .../i18n/locales/en/LC_MESSAGES/katrain.po | 70 +++++-- .../i18n/locales/ko/LC_MESSAGES/katrain.mo | Bin 908 -> 2945 bytes .../i18n/locales/ko/LC_MESSAGES/katrain.po | 149 +++++++++++---- .../i18n/locales/nl/LC_MESSAGES/katrain.mo | Bin 845 -> 2855 bytes .../i18n/locales/nl/LC_MESSAGES/katrain.po | 180 ++++++++++++++---- 15 files changed, 430 insertions(+), 206 deletions(-) diff --git a/katrain/__main__.py b/katrain/__main__.py index 494fe3c..bd738ed 100644 --- a/katrain/__main__.py +++ b/katrain/__main__.py @@ -1,5 +1,6 @@ from kivy.config import Config # isort:skip -ICON = "img/icon.png" # isort:skip # set icon + +ICON = "img/icon.png" # isort:skip # set icon Config.set("kivy", "window_icon", ICON) # isort:skip # set icon Config.set("input", "mouse", "mouse,multitouch_on_demand") # isort:skip # no red dots on right click @@ -21,15 +22,7 @@ from kivy.uix.screenmanager import Screen from kivymd.app import MDApp from katrain.core.ai import ai_move -from katrain.core.common import ( - LANGUAGE, - OUTPUT_DEBUG, - OUTPUT_ERROR, - OUTPUT_EXTRA_DEBUG, - OUTPUT_INFO, - OUTPUT_KATAGO_STDERR, - find_package_resource,i18n -) +from katrain.core.common import LANGUAGE, OUTPUT_DEBUG, OUTPUT_ERROR, OUTPUT_EXTRA_DEBUG, OUTPUT_INFO, OUTPUT_KATAGO_STDERR, find_package_resource, i18n from katrain.core.engine import KataGoEngine from katrain.core.game import Game, IllegalMoveException, KaTrainSGF from katrain.core.sgf_parser import Move, ParseError @@ -39,8 +32,7 @@ from katrain.gui.graph import ScoreGraph from katrain.gui.kivyutils import * from katrain.gui.popups import ConfigPopup, LoadSGFPopup, NewGamePopup from katrain.gui.style import ENGINE_BUSY_COL, ENGINE_DOWN_COL, ENGINE_READY_COL - - +from katrain.gui.style import * __version__ = "1.1.0" @@ -136,7 +128,7 @@ class KaTrainGui(Screen): # Handle prisoners and next player display prisoners = self.game.prisoner_count top, bot = [w.__self__ for w in self.board_controls.circles] # no weakref - if self.game.next_player == "W": + if self.game.next_player.player == "W": top, bot = bot, top self.board_controls.mid_circles_container.clear_widgets() self.board_controls.mid_circles_container.add_widget(bot) @@ -276,7 +268,7 @@ class KaTrainGui(Screen): try: move_tree = KaTrainSGF.parse(clipboard) except Exception as e: - self.controls.set_status(i18n._("Failed to import from clipboard").format(error=e,contents=clipboard[:50])) + self.controls.set_status(i18n._("Failed to import from clipboard").format(error=e, contents=clipboard[:50])) return move_tree.nodes_in_tree[-1].analyze(self.engine, analyze_fast=False) # speed up result for looking at end of game self._do_new_game(move_tree=move_tree, analyze_fast=True) diff --git a/katrain/core/common.py b/katrain/core/common.py index 31d0c8a..118dcb8 100644 --- a/katrain/core/common.py +++ b/katrain/core/common.py @@ -44,7 +44,7 @@ def find_package_resource(path): with pkg_resources.path(".".join(parts[:-1]), parts[-1]) as path_obj: return str(path_obj) # this will clean up if egg etc, but these don't work anyway except (ModuleNotFoundError, FileNotFoundError) as e: - print(f"File {path} not found, installation possibly broken",file=sys.stderr) + print(f"File {path} not found, installation possibly broken", file=sys.stderr) return f"FILENOTFOUND::{path}" else: return path # absolute path @@ -101,5 +101,6 @@ i18n = Lang(LANGUAGE) class I18NLabel(Label): pass + class I18NTextInput(TextInput): pass diff --git a/katrain/core/engine.py b/katrain/core/engine.py index 2bd2f83..f43ed31 100644 --- a/katrain/core/engine.py +++ b/katrain/core/engine.py @@ -57,10 +57,13 @@ class KataGoEngine: self.katago_process = subprocess.Popen(self.command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) except (FileNotFoundError, PermissionError, OSError) as e: if not self.config["katago"].strip(): - self.katrain.log( i18n._("Starting default Kata failed").format(command=self.comment,error=e), OUTPUT_ERROR, + self.katrain.log( + i18n._("Starting default Kata failed").format(command=self.comment, error=e), OUTPUT_ERROR, ) else: - self.katrain.log( i18n._("Starting Kata failed").format(command=self.comment,error=e) , OUTPUT_ERROR, ) + self.katrain.log( + i18n._("Starting Kata failed").format(command=self.comment, error=e), OUTPUT_ERROR, + ) self.analysis_thread = threading.Thread(target=self._analysis_read_thread, daemon=True).start() self.stderr_thread = threading.Thread(target=self._read_stderr_thread, daemon=True).start() diff --git a/katrain/core/game_node.py b/katrain/core/game_node.py index 9358761..1838f93 100644 --- a/katrain/core/game_node.py +++ b/katrain/core/game_node.py @@ -4,6 +4,7 @@ from typing import Dict, List, Optional, Tuple from katrain.core.common import evaluation_class, var_to_grid, i18n from katrain.core.sgf_parser import Move, SGFNode +from katrain.gui.style import PV_COLOR class GameNode(SGFNode): @@ -40,11 +41,7 @@ class GameNode(SGFNode): if comment: properties["C"] = ["\n".join(properties.get("C", "")) + comment] if self.is_root: - properties["C"] = [ - i18n._("SGF start message") + "\n" - + "\n".join(properties.get("C", "")) - + "\nSGF with review generated by KaTrain." - ] + properties["C"] = [i18n._("SGF start message") + "\n" + "\n".join(properties.get("C", "")) + "\nSGF with review generated by KaTrain."] if self.note.strip(): properties["C"] = ["\n".join(properties.get("C", "")) + f"\nNote: {self.note}"] return properties @@ -117,7 +114,7 @@ class GameNode(SGFNode): def make_pv(self, player, pv, interactive): pvtext = f"{player}{' '.join(pv)}" if interactive: - pvtext = f"[u][ref={pvtext}][color=#334466]{pvtext}[/color][/ref][/u]" + pvtext = f"[u][ref={pvtext}][color={PV_COLOR}]{pvtext}[/color][/ref][/u]" return pvtext def comment(self, sgf=False, teach=False, hints=False, interactive=True): @@ -129,8 +126,8 @@ class GameNode(SGFNode): if self.analysis_ready: score = self.score if sgf: - text += f"Score: {self.format_score(score)}\n" - text += f"Win Rate: {self.format_winrate()}\n" + text += i18n._("Info:score").format(score=self.format_score(score)) + "\n" + text += i18n._("Info:winrate").format(winrate=self.format_winrate()) + "\n" if self.parent and self.parent.analysis_ready: previous_top_move = self.parent.candidate_moves[0] if sgf or hints: @@ -138,19 +135,20 @@ class GameNode(SGFNode): points_lost = self.points_lost if sgf and points_lost > 0.5: text += i18n._("Info:point loss").format(points=points_lost) + "\n" - text += i18n._("Info:top move").format(top_move=previous_top_move['move'],score=self.format_score(previous_top_move['scoreLead'])) +".\n" + text += i18n._("Info:top move").format(top_move=previous_top_move["move"], score=self.format_score(previous_top_move["scoreLead"])) + "\n" else: - text += i18n._("Info:best move")+"\n" + text += i18n._("Info:best move") + "\n" if previous_top_move.get("pv") and (sgf or hints): - text += i18n._("Info:PV") + ": " + self.make_pv(single_move.player,previous_top_move['pv'],interactive) + "\n" + print("PREV", previous_top_move) + text += i18n._("Info:PV").format(pv=self.make_pv(single_move.player, previous_top_move["pv"], interactive)) + "\n" if sgf or hints or teach: policy_ranking = self.parent.policy_ranking currmove_policy_with_ix = [(ix + 1, p) for (p, m), ix in zip(policy_ranking, range(len(policy_ranking))) if m == single_move] if currmove_policy_with_ix: - text += i18n._("Info:policy rank").format(rank=currmove_policy_with_ix[0][0],probability=currmove_policy_with_ix[0][1]) + "\n" + text += i18n._("Info:policy rank").format(rank=currmove_policy_with_ix[0][0], probability=currmove_policy_with_ix[0][1]) + "\n" if not currmove_policy_with_ix or currmove_policy_with_ix[0] != 1 and (sgf or hints): - text += i18n._("Info:policy best").format(move=policy_ranking[0][1].gtp(),probability=policy_ranking[0][0]) +".\n" + text += i18n._("Info:policy best").format(move=policy_ranking[0][1].gtp(), probability=policy_ranking[0][0]) + "\n" if self.auto_undo and sgf: text += i18n._("Info:teaching undo") + "\n" top_pv = self.analysis_ready and self.candidate_moves[0].get("pv") diff --git a/katrain/gui.kv b/katrain/gui.kv index 74da3fa..4197744 100644 --- a/katrain/gui.kv +++ b/katrain/gui.kv @@ -9,11 +9,13 @@ #:set GRAPH_DOT_COLOR [0.85, 0.3, 0.3,1] #-- NEW +#:import RED __main__.RED + + #:set BLACK [0.05,0.05,0.05,1] #:set WHITE [0.95,0.95,0.95,1] #:set GREY [0.5,0.5,0.5,1] #:set GREEN [0.1,0.8,0.1,1] -#:set RED [0.8,0.1,0.1,1] #:set LIGHTBLUE [0.3,0.7,0.9,1] #:set YELLOW [0.8,0.8,0.1,1] @@ -86,6 +88,11 @@ : ripple_duration_in_slow: 0.6 +: + inactive_color: BACKGROUND_COLOR + active_color: BOX_BACKGROUND_COLOR + md_bg_color: self.active_color if self.state=='down' else self.inactive_color + : outline_color: root.color text_color: root.color @@ -109,8 +116,9 @@ : background_normal: '' background_color: (0,0,0,0) - icon_size: self.icon_size or [min(self.size[0],self.size[1]),min(self.size[0],self.size[1])] + image: image Image: + id: image size: root.icon_size pos: [root.pos[i] + (root.size[i] - root.icon_size[i])/2 for i in [0,1]] source: root.icon @@ -228,24 +236,6 @@ valign: 'middle' size: self.texture_size -: - value : value - orientation: 'horizontal' - ClickableLabel: - size_hint: 0.6,1 - id: desc - text: root.label - font_size: self.size[1] * 0.8 - on_press: value.opacity = 1 if value.opacity==0 else 0 - I18NLabel: - size_hint: 0.4,1 - text: root.text - color: root.color - font_size: desc.font_size - id: value - bold: True - - : min_size: min(self.height,self.width) @@ -260,7 +250,7 @@ text: root.text bold: True color: BLACK if root.player=='White' else WHITE - pos: (image.x, image.y+2) + pos: (image.x, image.y) size: image.size font_size: root.min_size * 1.2 / (1 + 1 * len(self.text)) @@ -270,11 +260,10 @@ size: self.parent.height, self.parent.height katrain: app.gui -: - : - size_hint: 0.06, 0.5 + size_hint: 0.06, 0.4 + icon_size: [min(self.size[0],self.size[1]),min(self.size[0],self.size[1])] pos_hint: {'center_y': 0.5} : @@ -293,59 +282,28 @@ SizedMDFlatRectangleButton: id: pass_btn text: i18n._('pass-button-text') - tooltip_text: i18n._('pass-button-tooltip') size_hint: None, 0.5 width: 2*self.height pos_hint: {'x': 0.1,'center_y':0.5} on_left_release: root.katrain("play",None) - canvas.before: - Color: - rgba: RED - Line: - rectangle: (*self.pos,*self.size) - width: 1 BoxLayout: size_hint: None, 1 width: 8 * self.height pos_hint: {'center_x': 0.5,'center_y':0.5} - canvas.before: - Color: - rgba: RED - Line: - rectangle: (*self.pos,*self.size) - width: 1 Label: - size_hint: 0.06, 0.5 + size_hint: 0.075, 0.5 NavIconButton: icon: 'img/flaticon/previous999.png' - on_press: root.katrain('undo',999) - canvas.before: - Color: - rgba: RED - Line: - rectangle: (*self.pos,*self.size) - width: 1 + on_press: print(self.size,self.image.size,self.parent.size,self.icon_size) #root.katrain('undo',999) NavIconButton: icon: 'img/flaticon/previous5.png' on_press: root.katrain('undo',5) NavIconButton: icon: 'img/flaticon/previous.png' on_press: root.katrain('undo') - canvas.before: - Color: - rgba: RED - Line: - rectangle: (*self.pos,*self.size) - width: 1 MDFloatLayout: - size_hint: 0.075, 1 + size_hint: 0.065, 1 id: mid_circles_container - canvas.before: - Color: - rgba: RED - Line: - rectangle: (*self.pos,*self.size) - width: 1 CircleWithText: size_hint: 5/8, 1 pos_hint: {'center_x': 0.5-3/16} @@ -361,12 +319,6 @@ NavIconButton: icon: 'img/flaticon/next.png' on_press: root.katrain('redo') - canvas.before: - Color: - rgba: RED - Line: - rectangle: (*self.pos,*self.size) - width: 1 NavIconButton: icon: 'img/flaticon/next5.png' on_press: root.katrain('redo',5) @@ -387,6 +339,7 @@ : captures: 0 name: 'Player' + outline_color: RED player: 'Black' description: '...' CircleWithText: @@ -543,23 +496,39 @@ opacity: int(root.show_winrate) +: + value : value + orientation: 'horizontal' + I18NLabel: + size_hint: 0.6,1 + id: desc + text: root.label if not root.hidden else '' + font_size: self.size[1] * 0.8 + I18NLabel: + size_hint: 0.4,1 + text: root.text if not root.hidden else '' + color: root.color + font_size: desc.font_size + id: value + bold: True + orientation: 'vertical' background_color: BOX_BACKGROUND_COLOR labels: {'score':score_label,'winrate':winrate_label,'points':pointloss_label} - CensorableLabel: + StatsLabel: id: winrate_label - label: 'Win rate' + label: i18n._('stats:winrate') text: root.winrate color: WINRATE_COLOR - CensorableLabel: + StatsLabel: id: score_label - label: 'Score' + label: i18n._('stats:score') text: root.score color: SCORE_COLOR - CensorableLabel: + StatsLabel: id: pointloss_label - label: 'Points Lost' if root.points_lost is None or root.points_lost > 0 else 'Points gained' + label: i18n._('stats:pointslost') if root.points_lost is None or root.points_lost > 0 else i18n._('stats:pointsgained') text: '{}: {:.1f}'.format(root.player,abs(root.points_lost)) if root.points_lost is not None else '...' color: POINTLOSS_COLOR @@ -635,9 +604,9 @@ CollapsablePanel: height_open: root.graph_box_height closed_label: 'closedlabel:scoregraph' - options: ['score','winrate','points'] - option_colors: [SCORE_COLOR,WINRATE_COLOR,POINTLOSS_COLOR] - option_default_active: [True,False,False] + options: ['score','winrate'] + option_colors: [SCORE_COLOR,WINRATE_COLOR] + option_default_active: [True,False] options_height: root.tab_option_height on_option_state: graph.show_graphs(args[1]) ScoreGraph: @@ -649,6 +618,7 @@ option_colors: [SCORE_COLOR,WINRATE_COLOR,POINTLOSS_COLOR] option_default_active: [True,True,True] options_height: root.tab_option_height + on_option_state: for k, v in args[1].items(): stats.labels[k].hidden = not v StatsBox: id: stats CollapsablePanel: @@ -657,6 +627,11 @@ options: ['info','notes'] option_colors: [RED,GREEN] option_default_active: [True,False] + on_option_state: + info.size_hint_y = int(args[1]['info'])+1e-9 + info.opacity = int(args[1]['info']) + note.size_hint_y = int(args[1]['notes'])+1e-9 + note.opacity = int(args[1]['notes']) options_height: root.tab_option_height MDBoxLayout: orientation: 'vertical' @@ -669,14 +644,13 @@ id: info markup: True on_ref_press: root.katrain.board_gui.show_pv_from_comments(args[1]) - size_hint: 1, None + size_hint: 1, 1 height: self.parent.height - status.height - note.height - 1 I18NTextInput: id: note - size_hint: 1, None + size_hint: 1, 1 on_text: root.katrain.set_note(self.text) - hint_text: 'Your SGF notes for this position here.' - height: min( (len(self._lines)+0.7) * self.line_height, self.parent.height - status.height - 2.7*self.line_height) + hint_text: i18n._('SGF Notes Hint') Label: size_hint_y: 1e-9 # takes up remaining space if info is closed @@ -821,11 +795,37 @@ shortcut: 'Ctrl-N' on_action: root.katrain("new-game-popup") +: + + +: + inactive_color: BACKGROUND_COLOR + active_color: YELLOW + ripple_color: BACKGROUND_COLOR + md_bg_color: self.active_color if self.state=='down' else self.inactive_color + text_color: self.inactive_color if self.state=='down' else self.active_color + size_hint: 0.5,1 + group: 'play_analyze' + allow_no_selection: False + + + OutlineBox: + outline_color: WHITE + size_hint: 0.7,0.7 + pos_hint: {'center_x':0.5,'center_y':0.45} + PlayAnalyzeButton: + text: i18n._('btn:Play') + id: play + PlayAnalyzeButton: + text: i18n._('btn:Analysis') + id: analyze + state: 'down' : board_gui: board_gui controls: controls board_controls: board_controls + play_mode: play_mode analysis_controls: analysis_controls nav_drawer: nav_drawer zen: False @@ -854,11 +854,10 @@ width: 0 if root.zen else self.height * 0.4 opacity: 0 if root.zen else 1 orientation: 'vertical' - MDBoxLayout: + PlayAnalyzeSelect: + id: play_mode size_hint_y: None height: analysis_controls.height - Label: - text: 'BlaBla' ControlsPanel: id: controls MyNavigationDrawer: diff --git a/katrain/gui/controlspanel.py b/katrain/gui/controlspanel.py index f61ac9e..5525c48 100644 --- a/katrain/gui/controlspanel.py +++ b/katrain/gui/controlspanel.py @@ -11,7 +11,6 @@ from katrain.gui.popups import ConfigTeacherPopup, ConfigTimerPopup from katrain.gui.ai_settings import ConfigAIPopupContents - class ControlsPanel(BoxLayout): katrain = ObjectProperty(None) button_controls = ObjectProperty(None) diff --git a/katrain/gui/graph.py b/katrain/gui/graph.py index 09f262d..120a4fb 100644 --- a/katrain/gui/graph.py +++ b/katrain/gui/graph.py @@ -8,7 +8,6 @@ from katrain.gui.kivyutils import BackgroundColor class ScoreGraph(BackgroundColor): show_score = BooleanProperty(True) show_winrate = BooleanProperty(True) - show_pointloss = BooleanProperty(True) nodes = ListProperty([]) score_points = ListProperty([]) @@ -36,7 +35,6 @@ class ScoreGraph(BackgroundColor): def show_graphs(self, keys): self.show_score = keys["score"] self.show_winrate = keys["winrate"] - self.show_pointloss = keys["points"] def update_graph(self, *args): nodes = self.nodes diff --git a/katrain/gui/kivyutils.py b/katrain/gui/kivyutils.py index a0cccff..39dd149 100644 --- a/katrain/gui/kivyutils.py +++ b/katrain/gui/kivyutils.py @@ -78,6 +78,11 @@ class SizedMDFlatButton(RectangularRippleBehavior, SizedMDBaseButton): pass +class SizedMDFlatToggleButton(SizedMDFlatButton, ToggleButtonBehavior): + inactive_color = ListProperty([0.5, 0.5, 0.5, 1]) + active_color = ListProperty([1, 1, 1, 1]) + + class SizedMDFlatRectangleButton(SizedMDFlatButton, OutlineColor): color = ListProperty([1, 1, 1, 1]) @@ -88,7 +93,6 @@ class SizedMDFlatRectangleToggleButton(SizedMDFlatRectangleButton, ToggleButtonB @property def active(self): return self.state == "down" - return self.state == "down" class AutoSizedMDFlatRectangleButton(SizedMDFlatRectangleButton): @@ -109,10 +113,11 @@ class LightLabel(I18NLabel): pass -class CensorableLabel(MDBoxLayout): +class StatsLabel(MDBoxLayout): text = StringProperty("") label = StringProperty("") color = ListProperty([1, 1, 1, 1]) + hidden = BooleanProperty(False) class MyNavigationDrawer(MDNavigationDrawer): # in PR - closes NavDrawer on any outside click diff --git a/katrain/gui/style.py b/katrain/gui/style.py index c036e6c..112e173 100644 --- a/katrain/gui/style.py +++ b/katrain/gui/style.py @@ -1,3 +1,10 @@ +def to_hexcol(kivycol): + return "#" + "".join(f"{round(c * 255):02x}" for c in kivycol[:3]) + + +# basic color definitions +RED = [0.8, 0.1, 0.1, 1] + # eval dots EVAL_COLORS = [ [0.447, 0.129, 0.42, 1], @@ -23,7 +30,10 @@ GHOST_ALPHA = 0.5 TOP_MOVE_ALPHA = 0.3 CHILD_SCALE = 0.95 -# ponder dot +# ponder light ENGINE_DOWN_COL = [0.8, 0, 0, 1] ENGINE_BUSY_COL = [0.9, 0.4, 0.1, 1] ENGINE_READY_COL = [0.117, 0.588, 0, 1] + +# info +PV_COLOR = to_hexcol(RED) diff --git a/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo index ee741db69c434afd6a1cbf10d5bc83f6391c7e34..2cba6dea14d5220de6370dc8a0b523430cfd867d 100644 GIT binary patch literal 2847 zcmb`IO^6&t6vxYaXx#V_6O9Ifc`9Zi?#w2F5++CpakH+;W{2#uDu|)FyJn``ny$91 zdUq$wTs(MCyy?Ms^dx%p0|XI*Ac%q&(Tj>F@g#zWAVK}V>h7K0fFNR+&97h8>sRl+ zdhhiQdw0Ac@b6*#9mJo%fh8fn+&1PNc>D_TJ>ZYvPVj0a{|Vj%`R?sP90Cu4d%=_7 z9`FLl`!RSMxD4J7UaIzAsrVK+f%W%5e*YuzR`3gOKlmMZ3-~K|BX|wG3*5e=ln;Px zpFs9^3cM3M1#(hh_ZqkhybSU=Z-Z?2<4XP-_0Q z{2t`pMY2rBLs`oh?hZ@U#;ZVL5}lH5I^xQ{^LA+2(tbakn{I>wf+sr z_3;zPc76j{?+=jk^B0Jp*a;&n?*UnFKN~%jN;ABq(;f}%ifXl5;FHQNlV!s@5_UdzF|WZy4?R;*8V=dw5q5GMjtq=5{c)vuWR0 z8O{;2Y1g(-&64liqSyDXT<9#7jFj`iyHd=oPCXgxDz(fS9S@1MYK5?n%XGP1aIwu* z`RJ95`y6eNCbn9#*(U3}PFb!J&0$gP!>Uem>6JJOOEMMbElEzC(~jf{0+x|c;)0E= zw}LZw-g@QeNq8DW=Oq#`P|nGo5(_M`6KAED)D8I>FD9xh3*)zJh8t-1omct^}cDq!(rvSkTJ);eXvOZ_@?UPi$c!4IW7{8X9?i{)FqSif^lro93gYg1KR z6LYh3)6FH7J8jc89cvw(IBip}Qr}!0X3%3tr!oWYPEg#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qhy!%+C4}9qLv!6Tt`NMHd3OJm}*v zJ3(ZFX+%&(Y!C<2COp-UaX6WW@x(ZKW?ZX+76aw#PSv_6)1PL;onb$JtXpr$_2l~6 z?QDx&&@SYUo;O&>?QbX6V-YhHoGv+H%`{I%K5Qw^S&#oGOq5)jlzWNefW`7kCJXGSr$5l1DrV^(_{`k`-Bsh?!A;9X+6XOF{>1HzKHM;sU@ H_c@7w17XC% diff --git a/katrain/i18n/locales/en/LC_MESSAGES/katrain.po b/katrain/i18n/locales/en/LC_MESSAGES/katrain.po index 82abeda..2b515a8 100644 --- a/katrain/i18n/locales/en/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/en/LC_MESSAGES/katrain.po @@ -10,10 +10,6 @@ msgstr "" msgid "Roboto" msgstr "Roboto" -msgid "Hello World" -msgstr "Hello World" - -#. msgid "English" msgstr "English" @@ -26,11 +22,6 @@ msgstr "Korean" msgid "pass-button-text" msgstr "Pass" -msgid "pass-button-tooltip" -msgstr "" -"[space]\n" -"Pass" - #. tabs and labels on the right panel msgid "tab:score" msgstr "Score" @@ -65,27 +56,55 @@ msgstr "" "game\n" "end" +#. Select mode +msgid "btn:Play" +msgstr "Play" + +msgid "btn:Analysis" +msgstr "Analysis" + +msgid "stats:winrate" +msgstr "Win Rate" + +msgid "stats:score" +msgstr "Estimated Score" + +msgid "stats:pointslost" +msgstr "Points Lost" + +#. better than expected best move +msgid "stats:pointsgained" +msgstr "Points Gained" + #. SGF and move comment messages msgid "SGF start message" -msgstr "Moves marked 'X' indicate the top move according to KataGo, those with a square are moves that lose less than 0.5 points. +msgstr "" +"Moves marked 'X' indicate the top move according to KataGo, those with a " +"square are moves that lose less than 0.5 points" + +msgid "Info:score" +msgstr "Score: {score}" + +msgid "Info:winrate" +msgstr "Win rate: {winrate}" msgid "Info:point loss" msgstr "Estimated point loss: {points_lost:.1f}" msgid "Info:top move" -msgid "Predicted top move was {top_move} ({score})." +msgstr "Predicted top move was {top_move} ({score})." msgid "Info:best move" -msgstr "Move was predicted best move. +msgstr "Move was predicted best move" msgid "Info:PV" -msgstr "PV" +msgstr "PV: {pv}" msgid "Info:policy rank" msgstr "Move was #{rank} according to policy ({probability:.2%})." msgid "Info:policy best" -msgstr "Top policy move was {move} ({policy_ranking[0][0]:.1%})." +msgstr "Top policy move was {move} ({probability:.1%})." msgid "Info:teaching undo" msgstr "Move was automatically undone in teaching mode." @@ -102,21 +121,34 @@ msgstr "No analysis available" msgid "Analyzing move..." msgstr "Analyzing move..." -#.misc errors and info messages +msgid "SGF Notes Hint" +msgstr "Your SGF notes for this position here." + +#. misc errors and info messages msgid "Copied SGF to clipboard." msgstr "Copied SGF to clipboard." msgid "Failed to import from clipboard" -msgstr "Failed to import game from clipboard: {error}\nClipboard contents: {contents}..." +msgstr "" +"Failed to import game from clipboard: {error}\n" +"Clipboard contents: {contents}..." msgid "Failed to load SGF" msgstr "Failed to load SGF. Parse Error: {error}" msgid "Starting default Kata failed" -msgstr "Starting KataGo with command '{command}' failed with error {error}. If on MacOS, see the manual on how to use brew to install katago first, and add it to your path or 'engine/katago' setting." +msgstr "" +"Starting KataGo with command '{command}' failed with error {error}. If on " +"MacOS, see the manual on how to use brew to install katago first, and add it" +" to your path or 'engine/katago' setting." msgid "Starting Kata failed" -msgstr "Starting kata with command '{command}' failed with error {error}. Please make sure the 'katago' value under 'engine' in settings points to the correct KataGo executable." +msgstr "" +"Starting kata with command '{command}' failed with error {error}. Please " +"make sure the 'katago' value under 'engine' in settings points to the " +"correct KataGo executable." msgid "Engine died unexpectedly" -msgstr "Engine died unexpectedly without sending output, possibly due to out of memory: {e}" +msgstr "" +"Engine died unexpectedly without sending output, possibly due to out of " +"memory: {e}" diff --git a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo index 34194ff99103c4aaed7bf2d93cb23bc3ec67bd01..0a44be4689d986044dcaea8d6482e21eee88cb74 100644 GIT binary patch literal 2945 zcmbW2e{2**6vq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YG{4r(o(^;W88sXc0TcJ`p`e+m?+I=;}8?7K=nvTqr4cWs=aaOEMe2JiH?j5lvwr1Rb#5Sqqn)_V9Av+>u>hE`9luT zc-PUlZ`{i6dzaXy{K4}YN96`LYfHx6(Zdmi$m#Al9ptOibAenu;E;FS(3i$l9lctZ zl&R?yv6gLA8zjyiap3=~MTdXpvT-G6HHBmz%crY84AYx1Q!nf7#?B@)XgnN0Ep8K-x}nZN%*%RK-9 diff --git a/katrain/i18n/locales/nl/LC_MESSAGES/katrain.po b/katrain/i18n/locales/nl/LC_MESSAGES/katrain.po index 4b9a57c..6b60e71 100644 --- a/katrain/i18n/locales/nl/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/nl/LC_MESSAGES/katrain.po @@ -10,9 +10,6 @@ msgstr "" msgid "Roboto" msgstr "Roboto" -msgid "Hello World" -msgstr "Hallo wereld" - msgid "English" msgstr "Engels" @@ -25,53 +22,164 @@ msgstr "Koreaans" msgid "pass-button-text" msgstr "Pas" -msgid "pass-button-tooltip" -msgstr "" -"[spatiebalk]\n" -"Pas" - -#. TODO -msgid "KataGo" -msgstr "KataGo" - -#. TODO -msgid "tab:winrate" -msgstr "Win Rate" - -#. TODO -msgid "tab:points" -msgstr "Point Loss" - -#. TODO -msgid "tab:score" -msgstr "Score" - -#. TODO -msgid "tab:notes" -msgstr "Notes" - #. TODO msgid "tab:info" msgstr "Info" +#. TODO +msgid "Info:PV" +msgstr "PV: {pv}" + +#. TODO +msgid "board-pass" +msgstr "pass" + #. TODO msgid "closedlabel:scoregraph" msgstr "Score Graph" #. TODO -msgid "closedlabel:info¬es" -msgstr "Move Info & Notes" +msgid "Starting default Kata failed" +msgstr "" +"Starting KataGo with command '{command}' failed with error {error}. If on " +"MacOS, see the manual on how to use brew to install katago first, and add it" +" to your path or 'engine/katago' setting." + +#. TODO +msgid "Failed to load SGF" +msgstr "Failed to load SGF. Parse Error: {error}" + +#. TODO +msgid "Info:AI thoughts" +msgstr "AI thought process: {thoughts}" + +#. TODO +msgid "tab:winrate" +msgstr "Win Rate" + +#. TODO +msgid "Info:undo predicted PV" +msgstr "Predicted follow-up: {pv}" + +#. TODO +msgid "tab:notes" +msgstr "Notes" + +#. TODO +msgid "SGF start message" +msgstr "" +"Moves marked 'X' indicate the top move according to KataGo, those with a " +"square are moves that lose less than 0.5 points" + +#. TODO +msgid "Info:teaching undo" +msgstr "Move was automatically undone in teaching mode." + +#. TODO +msgid "Failed to import from clipboard" +msgstr "" +"Failed to import game from clipboard: {error}\n" +"Clipboard contents: {contents}..." + +#. TODO +msgid "Info:policy best" +msgstr "Top policy move was {move} ({probability:.1%})." + +#. TODO +msgid "Info:policy rank" +msgstr "Move was #{rank} according to policy ({probability:.2%})." + +#. TODO +msgid "Analyzing move..." +msgstr "Analyzing move..." + +#. TODO +msgid "Copied SGF to clipboard." +msgstr "Copied SGF to clipboard." + +#. TODO +msgid "Engine died unexpectedly" +msgstr "" +"Engine died unexpectedly without sending output, possibly due to out of " +"memory: {e}" + +#. TODO +msgid "board-game-end" +msgstr "" +"game\n" +"end" + +#. TODO +msgid "Starting Kata failed" +msgstr "" +"Starting kata with command '{command}' failed with error {error}. Please " +"make sure the 'katago' value under 'engine' in settings points to the " +"correct KataGo executable." #. TODO msgid "closedlabel:movestats" msgstr "Move Stats" #. TODO -msgid "board-game-end" -msgstr "" -"einde\n" -"partij" +msgid "Info:top move" +msgstr "Predicted top move was {top_move} ({score})." #. TODO -msgid "board-pass" -msgstr "pas" +msgid "Info:score" +msgstr "Score: {score}" + +#. TODO +msgid "Info:point loss" +msgstr "Estimated point loss: {points_lost:.1f}" + +#. TODO +msgid "No analysis available" +msgstr "No analysis available" + +#. TODO +msgid "tab:score" +msgstr "Score" + +#. TODO +msgid "Info:best move" +msgstr "Move was predicted best move" + +#. TODO +msgid "tab:points" +msgstr "Point Loss" + +#. TODO +msgid "Info:winrate" +msgstr "Win rate: {winrate}" + +#. TODO +msgid "closedlabel:info¬es" +msgstr "Move Info & Notes" + +#. TODO +msgid "btn:Analysis" +msgstr "Analysis" + +#. TODO +msgid "btn:Play" +msgstr "Play" + +#. TODO +msgid "stats:winrate" +msgstr "Win Rate" + +#. TODO +msgid "stats:pointslost" +msgstr "Points Lost" + +#. TODO +msgid "stats:score" +msgstr "Estimated Score" + +#. TODO +msgid "stats:pointsgained" +msgstr "Points Gained" + +#. TODO +msgid "SGF Notes Hint" +msgstr "Your SGF notes for this position here."