Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Translate.py -- Pamhyr
# 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
# 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 <https://www.gnu.org/licenses/>.
# -*- coding: utf-8 -*-
from PyQt5.QtCore import QCoreApplication
from View.Tools.PamhyrTranslate import PamhyrTranslate
_translate = QCoreApplication.translate
class CommonWordTranslate(PamhyrTranslate):
def __init__(self):
super(CommonWordTranslate, self).__init__()
self._dict["name"] = _translate("CommonWord", "Name")
self._dict["type"] = _translate("CommonWord", "Type")
self._dict["value"] = _translate("CommonWord", "Value")
self._dict["comment"] = _translate("CommonWord", "Comment")
self._dict["description"] = _translate("CommonWord", "Description")
self._dict["time"] = _translate("CommonWord", "Time")
self._dict["date"] = _translate("CommonWord", "Date")
self._dict["reach"] = _translate("CommonWord", "Reach")
self._dict["reaches"] = _translate("CommonWord", "Reaches")
self._dict["cross_section"] = _translate("CommonWord", "Coss-section")
self._dict["main_channel"] = _translate("CommonWord", "Main channel")
self._dict["floodway"] = _translate("CommonWord", "Floodway")
self._dict["not_defined"] = _translate("CommonWord", "Not defined")
self._dict["not_associated"] = _translate(
"CommonWord", "Not associated"
)
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
class UnitTranslate(CommonWordTranslate):
def __init__(self):
super(UnitTranslate, self).__init__()
self._dict["unit_kp"] = _translate("Unit", "KP (m)")
self._dict["unit_width"] = _translate("Unit", "Width (m)")
self._dict["unit_height"] = _translate("Unit", "Height (m)")
self._dict["unit_diameter"] = _translate("Unit", "Diameter (m)")
self._dict["unit_thickness"] = _translate("Unit", "Thickness (m)")
self._dict["unit_elevation"] = _translate("Unit", "Elevation (m)")
self._dict["unit_water_elevation"] = _translate(
"Unit", "Water elevation (m)"
)
self._dict["unit_discharge"] = _translate("Unit", "Discharge (m³/s)")
self._dict["unit_area"] = _translate("Unit", "Area (hectare)"),
self._dict["unit_time_s"] = _translate("Unit", "Time (sec)")
self._dict["unit_time_p"] = _translate("Unit", "Time (JJJ:HH:MM:SS)")
self._dict["unit_date_s"] = _translate("Unit", "Date (sec)")
self._dict["unit_date_iso"] = _translate("Unit", "Date (ISO format)")
class MainTranslate(UnitTranslate):
def __init__(self):
super(MainTranslate, self).__init__()
self._dict["open_debug"] = _translate(
"MainWindow", "Open debug window"
)
self._dict["open_debug_sql"] = _translate(
"MainWindow", "Open SQLite debuging tool ('sqlitebrowser')"
)
self._dict["active_window"] = _translate(
"MainWindow", "Activate this window"
)