mirror of https://gitlab.com/pamhyr/pamhyr2
BC: Translate window title.
parent
0391775fed
commit
62aaa276a7
|
|
@ -105,12 +105,11 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
||||||
trad = BCETranslate()
|
trad = BCETranslate()
|
||||||
self._long_types = trad.get_dict("long_types")
|
self._long_types = trad.get_dict("long_types")
|
||||||
|
|
||||||
name = self._pamhyr_name
|
name = trad[self._pamhyr_name]
|
||||||
if self._data is not None:
|
if self._data is not None:
|
||||||
node_name = (self._data.node.name if self._data.node is not None
|
node_name = (self._data.node.name if self._data.node is not None
|
||||||
else _translate("BoundaryCondition", "Not associate"))
|
else _translate("BoundaryCondition", "Not associate"))
|
||||||
name = (
|
name += (
|
||||||
_translate("Edit boundary condition", self._pamhyr_name) +
|
|
||||||
f" - {study.name} " +
|
f" - {study.name} " +
|
||||||
f" - {self._data.name} ({self._data.id}) " +
|
f" - {self._data.name} ({self._data.id}) " +
|
||||||
f"({self._long_types[self._data.bctype]} - {node_name})"
|
f"({self._long_types[self._data.bctype]} - {node_name})"
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@ class BCETranslate(BCTranslate):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(BCETranslate, self).__init__()
|
super(BCETranslate, self).__init__()
|
||||||
|
|
||||||
|
self._dict["Edit Boundary Conditions"] = _translate(
|
||||||
|
"BoundaryCondition", "Edit boundary conditions"
|
||||||
|
)
|
||||||
|
|
||||||
self._sub_dict["table_headers"] = {
|
self._sub_dict["table_headers"] = {
|
||||||
"x": _translate("BoundaryCondition", "X"),
|
"x": _translate("BoundaryCondition", "X"),
|
||||||
"y": _translate("BoundaryCondition", "Y"),
|
"y": _translate("BoundaryCondition", "Y"),
|
||||||
|
|
|
||||||
|
|
@ -68,13 +68,17 @@ class BoundaryConditionWindow(PamhyrWindow):
|
||||||
_pamhyr_name = "Boundary conditions"
|
_pamhyr_name = "Boundary conditions"
|
||||||
|
|
||||||
def __init__(self, study=None, config=None, parent=None):
|
def __init__(self, study=None, config=None, parent=None):
|
||||||
name = self._pamhyr_name + " - " + study.name
|
trad = BCTranslate()
|
||||||
|
name = (
|
||||||
|
trad[self._pamhyr_name] +
|
||||||
|
" - " + study.name
|
||||||
|
)
|
||||||
|
|
||||||
super(BoundaryConditionWindow, self).__init__(
|
super(BoundaryConditionWindow, self).__init__(
|
||||||
title=name,
|
title=name,
|
||||||
study=study,
|
study=study,
|
||||||
config=config,
|
config=config,
|
||||||
trad=BCTranslate(),
|
trad=trad,
|
||||||
parent=parent
|
parent=parent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,10 @@ class BCTranslate(PamhyrTranslate):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(BCTranslate, self).__init__()
|
super(BCTranslate, self).__init__()
|
||||||
|
|
||||||
|
self._dict["Boundary conditions"] = _translate(
|
||||||
|
"BoundaryConditions", "Boundary conditions"
|
||||||
|
)
|
||||||
|
|
||||||
self._sub_dict["long_types"] = {
|
self._sub_dict["long_types"] = {
|
||||||
"ND": _translate("BoundaryCondition", "Not defined"),
|
"ND": _translate("BoundaryCondition", "Not defined"),
|
||||||
"PC": _translate("BoundaryCondition", "Ponctual contribution"),
|
"PC": _translate("BoundaryCondition", "Ponctual contribution"),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue