Pamhyr: Centralize ND and NA translate.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-02-21 17:19:50 +01:00
1 parent 2e158f4c1b
commit a4c5d34720
19 files changed
+46 -34

No files matched your search

+1 -1
View File
@@ -108,7 +108,7 @@ class EditBoundaryConditionWindow(PamhyrWindow):
name = trad[self._pamhyr_name]
if self._data is not None:
node_name = (self._data.node.name if self._data.node is not None
else _translate("BoundaryCondition", "Not associate"))
else trad['not_associated'])
name += (
f" - {study.name} " +
f" - {self._data.name} ({self._data.id}) " +
+2 -2
View File
@@ -85,7 +85,7 @@ class ComboBoxDelegate(QItemDelegate):
)
else:
self.editor.addItems(
[_translate("BoundaryCondition", "Not associate")] +
[self._trad["not_associated"]] +
self._data.nodes_names()
)
@@ -145,7 +145,7 @@ class TableModel(PamhyrTableModel):
elif self._headers[column] == "node":
n = self._lst.get(self._tab, row).node
if n is None:
return _translate("BoundaryCondition", "Not associate")
return self._trad["not_associated"]
return n.name
return QVariant()
+1 -1
View File
@@ -47,7 +47,7 @@ class BCTranslate(MainTranslate):
)
self._sub_dict["long_types"] = {
"ND": _translate("BoundaryCondition", "Not defined"),
"ND": self._dict["not_defined"],
"PC": _translate("BoundaryCondition", "Ponctual contribution"),
"TZ": _translate("BoundaryCondition", "Z(t)"),
"TD": _translate("BoundaryCondition", "Q(t)"),