mirror of https://gitlab.com/pamhyr/pamhyr2
LC: Add windows title translate.
parent
e1f5628a4f
commit
a519228856
|
|
@ -54,15 +54,14 @@ class EditLateralContributionWindow(PamhyrWindow):
|
||||||
study=None, config=None,
|
study=None, config=None,
|
||||||
parent=None):
|
parent=None):
|
||||||
self._data = data
|
self._data = data
|
||||||
trad = LCETranslate()
|
|
||||||
|
|
||||||
name = self._pamhyr_name
|
trad = LCETranslate()
|
||||||
|
name = trad[self._pamhyr_name]
|
||||||
if self._data is not None:
|
if self._data is not None:
|
||||||
edge_name = (self._data.edge.name if self._data.edge is not None
|
edge_name = (self._data.edge.name if self._data.edge is not None
|
||||||
else _translate("LateralContribution",
|
else _translate("LateralContribution",
|
||||||
"Not associate"))
|
"Not associate"))
|
||||||
name = (
|
name += (
|
||||||
_translate("Edit lateral contribution", self._pamhyr_name) +
|
|
||||||
f" - {study.name} " +
|
f" - {study.name} " +
|
||||||
f" - {self._data.name} ({self._data.id}) " +
|
f" - {self._data.name} ({self._data.id}) " +
|
||||||
f"({trad.get_dict('long_types')[self._data.lctype]} - " +
|
f"({trad.get_dict('long_types')[self._data.lctype]} - " +
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@ _translate = QCoreApplication.translate
|
||||||
class LCETranslate(LCTranslate):
|
class LCETranslate(LCTranslate):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(LCETranslate, self).__init__()
|
super(LCETranslate, self).__init__()
|
||||||
|
self._dict["Edit lateral contribution"] = _translate(
|
||||||
|
"LateralContribution", "Edit lateral contribution"
|
||||||
|
)
|
||||||
|
|
||||||
self._sub_dict["table_headers"] = {
|
self._sub_dict["table_headers"] = {
|
||||||
"x": _translate("LateralContribution", "X"),
|
"x": _translate("LateralContribution", "X"),
|
||||||
|
|
|
||||||
|
|
@ -68,12 +68,13 @@ class LateralContributionWindow(PamhyrWindow):
|
||||||
_pamhyr_name = "Lateral contribution"
|
_pamhyr_name = "Lateral contribution"
|
||||||
|
|
||||||
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 = LCTranslate()
|
||||||
|
name = trad[self._pamhyr_name] + " - " + study.name
|
||||||
|
|
||||||
super(LateralContributionWindow, self).__init__(
|
super(LateralContributionWindow, self).__init__(
|
||||||
title=name,
|
title=name,
|
||||||
study=study,
|
study=study,
|
||||||
trad=LCTranslate(),
|
trad=trad,
|
||||||
config=config,
|
config=config,
|
||||||
parent=parent
|
parent=parent
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,10 @@ class LCTranslate(PamhyrTranslate):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(LCTranslate, self).__init__()
|
super(LCTranslate, self).__init__()
|
||||||
|
|
||||||
|
self._dict["Lateral contribution"] = _translate(
|
||||||
|
"LateralContribution", "Lateral contribution"
|
||||||
|
)
|
||||||
|
|
||||||
self._sub_dict["long_types"] = {
|
self._sub_dict["long_types"] = {
|
||||||
"ND": _translate("LateralContribution", "Not defined"),
|
"ND": _translate("LateralContribution", "Not defined"),
|
||||||
"LC": _translate("LateralContribution", "Lateral contribution"),
|
"LC": _translate("LateralContribution", "Lateral contribution"),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue