mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Pamhyr: Factorize some translate.
This commit is contained in:
1 parent
b3a7e7f465
commit
2e158f4c1b
38 files changed
+274
-239
No files matched your search
@@ -18,24 +18,27 @@
|
||||
|
||||
from PyQt5.QtCore import QCoreApplication
|
||||
|
||||
from View.Tools.PamhyrTranslate import PamhyrTranslate
|
||||
from View.Translate import MainTranslate
|
||||
|
||||
_translate = QCoreApplication.translate
|
||||
|
||||
|
||||
class ResultsTranslate(PamhyrTranslate):
|
||||
class ResultsTranslate(MainTranslate):
|
||||
def __init__(self):
|
||||
super(ResultsTranslate, self).__init__()
|
||||
|
||||
self._dict["Results"] = _translate(
|
||||
"Results", "Results"
|
||||
)
|
||||
self._dict["Results"] = _translate("Results", "Results")
|
||||
|
||||
self._dict['day'] = _translate(
|
||||
"Results", "day"
|
||||
)
|
||||
self._dict['days'] = _translate(
|
||||
"Results", "days"
|
||||
self._dict['day'] = _translate("Results", "day")
|
||||
self._dict['days'] = _translate("Results", "days")
|
||||
|
||||
self._dict['x'] = _translate("Results", "X (m)")
|
||||
|
||||
self._dict['label_bottom'] = _translate("Results", "River bottom")
|
||||
self._dict['label_water'] = _translate("Results", "Water elevation")
|
||||
self._dict['label_water_max'] = _translate(
|
||||
"Results",
|
||||
"Max water elevation"
|
||||
)
|
||||
|
||||
self._sub_dict["table_headers_reach"] = {
|
||||
@@ -43,12 +46,12 @@ class ResultsTranslate(PamhyrTranslate):
|
||||
}
|
||||
|
||||
self._sub_dict["table_headers_profile"] = {
|
||||
"name": _translate("Results", "Name"),
|
||||
"kp": _translate("Results", "KP (m)"),
|
||||
"name": self._dict["name"],
|
||||
"kp": self._dict["unit_kp"],
|
||||
}
|
||||
|
||||
self._sub_dict["table_headers_raw_data"] = {
|
||||
"name": _translate("Results", "Profile"),
|
||||
"water_elevation": _translate("Results", "Water elevation (m)"),
|
||||
"discharge": _translate("Results", "Discharge (m³/s)"),
|
||||
"water_elevation": self._dict["unit_water_elevation"],
|
||||
"discharge": self._dict["unit_discharge"],
|
||||
}
|
||||
Reference in new issue
Block a user