From 6340d9ea0b1561b17f0d293c8c34adcda71b1319 Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Mon, 12 Feb 2024 14:02:55 +0100
Subject: [PATCH] CheckList: Add window title translate.

---
 src/View/CheckList/Translate.py | 4 ++++
 src/View/CheckList/Window.py    | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/View/CheckList/Translate.py b/src/View/CheckList/Translate.py
index d046365d..f15b8994 100644
--- a/src/View/CheckList/Translate.py
+++ b/src/View/CheckList/Translate.py
@@ -27,6 +27,10 @@ class CheckListTranslate(PamhyrTranslate):
     def __init__(self):
         super(CheckListTranslate, self).__init__()
 
+        self._dict["Check list"] = _translate(
+            "Checklist", "Check list"
+        )
+
         self._sub_dict["table_headers"] = {
             "name": _translate("CheckList", "Name"),
             "status": _translate("CheckList", "Status"),
diff --git a/src/View/CheckList/Window.py b/src/View/CheckList/Window.py
index 53de756e..54787ba9 100644
--- a/src/View/CheckList/Window.py
+++ b/src/View/CheckList/Window.py
@@ -54,16 +54,18 @@ class CheckListWindow(PamhyrWindow):
     def __init__(self, autorun: bool = True,
                  study=None, config=None,
                  solver=None, parent=None):
+        trad = CheckListTranslate()
+
         self._autorun = autorun
         self._solver = solver
 
-        name = self._pamhyr_name + " - " + study.name
+        name = trad[self._pamhyr_name] + " - " + study.name
 
         super(CheckListWindow, self).__init__(
             title=name,
             study=study,
             config=config,
-            trad=CheckListTranslate(),
+            trad=trad,
             options=[],
             parent=parent
         )
-- 
GitLab