diff --git a/src/View/Configure/Solver/Window.py b/src/View/Configure/Solver/Window.py index 893def20f0b4e070cf4970505245e304400312c4..8f38d66fdfe614f6ff351fddffe1aa5cdf3b6fb0 100644 --- a/src/View/Configure/Solver/Window.py +++ b/src/View/Configure/Solver/Window.py @@ -20,6 +20,8 @@ from View.Tools.PamhyrWindow import PamhyrDialog from Solver.Solvers import solver_type_list from Solver.GenericSolver import GenericSolver +from View.Configure.Translate import ConfigureTranslate + from PyQt5.QtWidgets import ( QPushButton, ) @@ -30,15 +32,19 @@ class ConfigureSolverWindow(PamhyrDialog): _pamhyr_name = "Add/Edit Solver" def __init__(self, data=None, config=None, parent=None): + trad = ConfigureTranslate() + if data is not None: - name = f"Edit Solver - {data.name}" + name = trad["edit_solver"] + name += f" - {data.name}" else: - name = "Add a new Solver" + name = trad["add_solver"] super(ConfigureSolverWindow, self).__init__( title=name, config=config, options=[], + trad=trad, parent=parent ) diff --git a/src/View/Configure/Translate.py b/src/View/Configure/Translate.py index 5355d8a590b29d9301cd98cd57a6ce3735871301..de1687e3973b0afece5936567de6ec59c7fa3996 100644 --- a/src/View/Configure/Translate.py +++ b/src/View/Configure/Translate.py @@ -27,8 +27,20 @@ class ConfigureTranslate(PamhyrTranslate): def __init__(self): super(ConfigureTranslate, self).__init__() + self._dict["Configure"] = _translate( + "Configure", "Configure" + ) + self._sub_dict["table_headers"] = { "name": _translate("Configure", "Name"), "type": _translate("Configure", "Type"), "description": _translate("Configure", "Description"), } + + # Solvers + self._dict["edit_solver"] = _translate( + "Configure", "Edit solver" + ) + self._dict["add_solver"] = _translate( + "Configure", "Add a new solver" + ) diff --git a/src/View/Configure/Window.py b/src/View/Configure/Window.py index 14ba04425bbd2fb0307113f5f2c1a093c6f8a6ba..13148b6124a8c07623907eba9b05bc0c5995e0dc 100644 --- a/src/View/Configure/Window.py +++ b/src/View/Configure/Window.py @@ -83,10 +83,12 @@ class ConfigureWindow(PamhyrDialog): if config is None: config = Config() + trad = ConfigureTranslate() + super(ConfigureWindow, self).__init__( - title=self._pamhyr_name, + title=trad[self._pamhyr_name], config=config, - trad=ConfigureTranslate(), + trad=trad, options=[], parent=parent )