From 18c5d9b480a4e6f3483d70bbb8498bd786194949 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr> Date: Mon, 12 Feb 2024 15:08:40 +0100 Subject: [PATCH] Results: Add window title translate. --- .../Results/CustomPlot/CustomPlotValuesSelectionDialog.py | 7 ++++--- src/View/Results/CustomPlot/Translate.py | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/View/Results/CustomPlot/CustomPlotValuesSelectionDialog.py b/src/View/Results/CustomPlot/CustomPlotValuesSelectionDialog.py index 1ffd6732..0ef72c2c 100644 --- a/src/View/Results/CustomPlot/CustomPlotValuesSelectionDialog.py +++ b/src/View/Results/CustomPlot/CustomPlotValuesSelectionDialog.py @@ -1,5 +1,5 @@ # CustomPlotValuesSelectionDialog.py -- Pamhyr -# Copyright (C) 2023 INRAE +# Copyright (C) 2023 - 2024 INRAE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -30,10 +30,11 @@ class CustomPlotValuesSelectionDialog(PamhyrDialog): _pamhyr_name = "Custom Plot Selection" def __init__(self, parent=None): + trad = CustomPlotTranslate() super(CustomPlotValuesSelectionDialog, self).__init__( - title=self._pamhyr_name, + title=trad[self._pamhyr_name], options=[], - trad=CustomPlotTranslate(), + trad=trad, parent=parent ) diff --git a/src/View/Results/CustomPlot/Translate.py b/src/View/Results/CustomPlot/Translate.py index 43841c01..17015781 100644 --- a/src/View/Results/CustomPlot/Translate.py +++ b/src/View/Results/CustomPlot/Translate.py @@ -27,6 +27,10 @@ class CustomPlotTranslate(ResultsTranslate): def __init__(self): super(CustomPlotTranslate, self).__init__() + self._dict["Custom Plot Selection"] = _translate( + "CustomPlot", "Custom Plot Selection" + ) + # Value type self._dict['time'] = _translate( -- GitLab