mirror of https://gitlab.com/pamhyr/pamhyr2
Geometry: Add windows title translate.
parent
77de17d7e3
commit
0fc5bd3c10
|
|
@ -38,7 +38,7 @@ class MeshingDialog(PamhyrDialog):
|
||||||
|
|
||||||
def __init__(self, reach, trad=None, parent=None):
|
def __init__(self, reach, trad=None, parent=None):
|
||||||
super(MeshingDialog, self).__init__(
|
super(MeshingDialog, self).__init__(
|
||||||
title=self._pamhyr_name,
|
title=trad[self._pamhyr_name],
|
||||||
trad=trad,
|
trad=trad,
|
||||||
options=[],
|
options=[],
|
||||||
parent=parent
|
parent=parent
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,10 @@ class GeometryProfileTranslate(GeometryTranslate):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(GeometryProfileTranslate, self).__init__()
|
super(GeometryProfileTranslate, self).__init__()
|
||||||
|
|
||||||
|
self._dict["Geometry cross-section"] = _translate(
|
||||||
|
"Geometry", "Geometry cross-section"
|
||||||
|
)
|
||||||
|
|
||||||
self._sub_dict["table_headers"] = {
|
self._sub_dict["table_headers"] = {
|
||||||
"x": _translate("Geometry", "X (m)"),
|
"x": _translate("Geometry", "X (m)"),
|
||||||
"y": _translate("Geometry", "Y (m)"),
|
"y": _translate("Geometry", "Y (m)"),
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,17 @@ class ProfileWindow(PamhyrWindow):
|
||||||
def __init__(self, profile=None, study=None, config=None, parent=None):
|
def __init__(self, profile=None, study=None, config=None, parent=None):
|
||||||
self._profile = profile
|
self._profile = profile
|
||||||
|
|
||||||
name = f"{self._pamhyr_name} - {self._profile.name} {self._profile.kp}"
|
trad = GeometryProfileTranslate()
|
||||||
|
name = (
|
||||||
|
trad[self._pamhyr_name] +
|
||||||
|
f" - {self._profile.name} {self._profile.kp}"
|
||||||
|
)
|
||||||
|
|
||||||
super(ProfileWindow, self).__init__(
|
super(ProfileWindow, self).__init__(
|
||||||
title=name,
|
title=name,
|
||||||
study=study,
|
study=study,
|
||||||
config=config,
|
config=config,
|
||||||
trad=GeometryProfileTranslate(),
|
trad=trad,
|
||||||
parent=parent
|
parent=parent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@ class GeometryTranslate(PamhyrTranslate):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(GeometryTranslate, self).__init__()
|
super(GeometryTranslate, self).__init__()
|
||||||
|
|
||||||
|
self._dict["Geometry"] = _translate(
|
||||||
|
"Geometry", "Geometry"
|
||||||
|
)
|
||||||
|
|
||||||
self._dict["open_file"] = _translate("Geometry", "Open a file")
|
self._dict["open_file"] = _translate("Geometry", "Open a file")
|
||||||
self._dict["file_st"] = _translate(
|
self._dict["file_st"] = _translate(
|
||||||
"Geometry", "File mage geometry (*.ST *.st)")
|
"Geometry", "File mage geometry (*.ST *.st)")
|
||||||
|
|
@ -58,3 +62,7 @@ class GeometryTranslate(PamhyrTranslate):
|
||||||
for k in self._sub_dict["lm_dict"]:
|
for k in self._sub_dict["lm_dict"]:
|
||||||
v = self._sub_dict["lm_dict"][k]
|
v = self._sub_dict["lm_dict"][k]
|
||||||
self._sub_dict["r_lm_dict"][v] = k
|
self._sub_dict["r_lm_dict"][v] = k
|
||||||
|
|
||||||
|
self._dict["Meshing"] = _translate(
|
||||||
|
"Geometry", "Meshing"
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -68,18 +68,19 @@ class GeometryWindow(PamhyrWindow):
|
||||||
_pamhyr_name = "Geometry"
|
_pamhyr_name = "Geometry"
|
||||||
|
|
||||||
def __init__(self, reach=None, study=None, config=None, parent=None):
|
def __init__(self, reach=None, study=None, config=None, parent=None):
|
||||||
|
trad = GeometryTranslate()
|
||||||
if reach is None:
|
if reach is None:
|
||||||
self._reach = study.river.current_reach().reach
|
self._reach = study.river.current_reach().reach
|
||||||
else:
|
else:
|
||||||
self._reach = reach
|
self._reach = reach
|
||||||
|
|
||||||
name = f"{self._pamhyr_name} - {self._reach.name}"
|
name = trad[self._pamhyr_name] + f" - {self._reach.name}"
|
||||||
|
|
||||||
super(GeometryWindow, self).__init__(
|
super(GeometryWindow, self).__init__(
|
||||||
title=name,
|
title=name,
|
||||||
study=study,
|
study=study,
|
||||||
config=config,
|
config=config,
|
||||||
trad=GeometryTranslate(),
|
trad=trad,
|
||||||
parent=parent
|
parent=parent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue