# Translate.py -- Pamhyr # Copyright (C) 2023 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 # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -*- coding: utf-8 -*- from PyQt5.QtCore import QCoreApplication from View.Results.translate import ResultsTranslate _translate = QCoreApplication.translate class CustomPlotTranslate(ResultsTranslate): def __init__(self): super(CustomPlotTranslate, self).__init__() # Value type self._dict['time'] = _translate( "CustomPlot", "Time (sec)" ) self._dict['kp'] = _translate( "CustomPlot", "Kp (m)" ) self._dict['elevation'] = _translate( "CustomPlot", "Elevation (m)" ) self._dict['water_elevation'] = _translate( "CustomPlot", "Water elevation (m)" ) self._dict['discharge'] = _translate( "CustomPlot", "Discharge (m³/s)" ) # Unit corresponding long name (plot axes display) self._dict['0-meter'] = _translate( "CustomPlot", "Elevation (m)" ) self._dict['1-m3s'] = _translate( "CustomPlot", "Discharge (m³/s)" ) # SubDict self._sub_dict["values_x"] = { "kp": self._dict["kp"], "time": self._dict["time"], } self._sub_dict["values_y"] = { "elevation": self._dict["elevation"], "water_elevation": self._dict["water_elevation"], "discharge": self._dict["discharge"], }