Merge branch 'master' of gitlab-ssh.irstea.fr:theophile.terraz/pamhyr into terraz_dev

adists_release
Theophile Terraz 2024-10-08 10:59:13 +02:00
commit 91e780432d
6 changed files with 67 additions and 20 deletions

View File

@ -69,7 +69,7 @@ class Mage(CommandLineSolver):
lst += [
("mage_min_timestep", "1.0"),
("mage_timestep_tra", "3600"),
("mage_timestep_bin", "0"),
("mage_timestep_bin", "3600"),
# ("mage_timestep_melissa", "0"),
("mage_implicitation", "0.70"),
("mage_continuity_discretization", "S"),
@ -79,11 +79,11 @@ class Mage(CommandLineSolver):
("mage_smooth_coef", "0"),
("mage_cfl_max", "-1."),
("mage_min_height", "0.1"),
("mage_max_niter", "10"),
("mage_max_niter", "99"),
("mage_timestep_reduction_factor", "2"),
("mage_precision_reduction_factor_Z", "1"),
("mage_precision_reduction_factor_Q", "1"),
("mage_niter_max_precision", "99"),
("mage_niter_max_precision", "10"),
("mage_niter_before_switch", "99"),
("mage_max_froude", "1.5"),
("mage_diffluence_node_height_balance", "-1"),

View File

@ -349,6 +349,7 @@ class EditBoundaryConditionWindow(PamhyrWindow):
reach = self._data.reach(self._study.river)[0]
if len(reach.profiles) == 0:
self.message_box(
window_title=self._trad["Warning"],
text=self._trad["title_need_geometry"],
informative_text=self._trad["msg_need_geometry"]
)
@ -388,6 +389,7 @@ class EditBoundaryConditionWindow(PamhyrWindow):
reach = self._data.reach(self._study.river)[0]
if len(reach.profiles) == 0:
self.message_box(
window_title=self._trad["Warning"],
text=self._trad["title_need_geometry"],
informative_text=self._trad["msg_need_geometry"]
)

View File

@ -46,10 +46,12 @@ class BCETranslate(BCTranslate):
}
self._dict["title_need_geometry"] = _translate(
"Geometry", "No geometry"
"BoundaryCondition", "No geometry"
)
self._dict["msg_need_geometry"] = _translate(
"Geometry",
"There is not geometry found for this reach, "
"a geometry is needed to this features"
"BoundaryCondition",
"No geometry found for this reach.\n"
"This feature requires a reach with a geometry."
)
self._dict["Warning"] = _translate("BoundaryCondition",
"Warning")

View File

@ -765,9 +765,11 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
def msg_select_reach(self):
self.message_box(
self._trad["mb_select_reach_title"],
self._trad["mb_select_reach_msg"]
window_title=self._trad["Warning"],
text=self._trad["mb_select_reach_title"],
informative_text=self._trad["mb_select_reach_msg"]
)
self.open_network()
def dialog_reopen_study(self):
dlg = QMessageBox(self)

View File

@ -119,6 +119,9 @@ class MainTranslate(UnitTranslate):
)
# Message box
self._dict["Warning"] = _translate(
"MainWindow", "Warning"
)
self._dict["mb_select_reach_title"] = _translate(
"MainWindow", "Please select a reach"
)

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr_FR" sourcelanguage="en_150">
<!DOCTYPE TS><TS version="2.0" language="fr_FR" sourcelanguage="en_150">
<context>
<name>About</name>
<message>
@ -247,6 +246,23 @@
<source>Boundary Condition Options</source>
<translation>Options des conditions limites</translation>
</message>
<message>
<location filename="../View/BoundaryCondition/Edit/translate.py" line="48"/>
<source>No geometry</source>
<translation>Pas de géométrie</translation>
</message>
<message>
<location filename="../View/BoundaryCondition/Edit/translate.py" line="51"/>
<source>No geometry found for this reach.
This feature requires a reach with a geometry.</source>
<translation>Aucune géométrie n&apos;a été trouvée sur ce bief.
Cette fonctionnalité nécessite un bief muni d&apos;une géométrie.</translation>
</message>
<message>
<location filename="../View/BoundaryCondition/Edit/translate.py" line="56"/>
<source>Warning</source>
<translation>Avertissement</translation>
</message>
</context>
<context>
<name>BoundaryConditions</name>
@ -1151,7 +1167,7 @@
</message>
<message>
<location filename="../View/ui/about.ui" line="94"/>
<source>Copyright © 2022-2024 INRAE</source>
<source>Copyright &#xa9; 2022-2024 INRAE</source>
<translation type="obsolete">Copyright © 2022-2024 INRAE</translation>
</message>
<message>
@ -1159,6 +1175,11 @@
<source>Version: @version @codename</source>
<translation>Version : @version @codename</translation>
</message>
<message encoding="UTF-8">
<location filename="../View/ui/about.ui" line="94"/>
<source>Copyright © 2022-2024 INRAE</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Frictions</name>
@ -1190,7 +1211,7 @@
<message>
<location filename="../View/Frictions/translate.py" line="38"/>
<source>Edit frictions</source>
<translation>Éditer les frotements</translation>
<translation>Éditer les frottements</translation>
</message>
<message>
<location filename="../View/Frictions/translate.py" line="31"/>
@ -1355,6 +1376,18 @@
<source>Shift</source>
<translation>Translater</translation>
</message>
<message>
<location filename="../View/BoundaryCondition/Edit/translate.py" line="48"/>
<source>No geometry</source>
<translation type="obsolete">Aucune géométrie</translation>
</message>
<message>
<location filename="../View/BoundaryCondition/Edit/translate.py" line="51"/>
<source>No geometry found for this reach.
This feature requires a reach with a geometry.</source>
<translation type="obsolete">Aucune géométrie n&apos;a été trouvée sur ce bief.
Cette fonctionnalité nécessite un bief muni d&apos;une géométrie.</translation>
</message>
</context>
<context>
<name>HydraulicStructures</name>
@ -2390,7 +2423,7 @@
<message>
<location filename="../View/ui/MainWindow.ui" line="482"/>
<source>Edit frictions</source>
<translation>Éditer les frotements</translation>
<translation>Éditer les frottements</translation>
</message>
<message>
<location filename="../View/ui/GeometryCrossSection.ui" line="138"/>
@ -2503,7 +2536,7 @@
<translation>Données</translation>
</message>
<message>
<location filename="../View/Translate.py" line="109"/>
<location filename="../View/Translate.py" line="112"/>
<source>Please select a reach</source>
<translation>Veuillez sélectionner un bief</translation>
</message>
@ -2513,30 +2546,35 @@
<translation type="obsolete">L&apos;édition de la géométrie nécessite un bief sélectionné dans le réseau fluvial pour pouvoir travailler dessus</translation>
</message>
<message>
<location filename="../View/Translate.py" line="118"/>
<location filename="../View/Translate.py" line="121"/>
<source>Last open study</source>
<translation>Dernière étude ouverte</translation>
</message>
<message>
<location filename="../View/Translate.py" line="121"/>
<location filename="../View/Translate.py" line="124"/>
<source>Do you want to open again the last open study?</source>
<translation>Voulez-vous rouvrir la dernière étude ?</translation>
</message>
<message>
<location filename="../View/Translate.py" line="112"/>
<location filename="../View/Translate.py" line="115"/>
<source>This edition window need a reach selected into the river network to work on it</source>
<translation>Cette fenêtre d&apos;édition a besoin d&apos;un bief sélectionné dans le réseau pour travailler dessus</translation>
</message>
<message>
<location filename="../View/Translate.py" line="126"/>
<location filename="../View/Translate.py" line="129"/>
<source>Close without saving study</source>
<translation>Fermer sans sauvegarder l&apos;étude</translation>
</message>
<message>
<location filename="../View/Translate.py" line="129"/>
<location filename="../View/Translate.py" line="132"/>
<source>Do you want to save current study before closing it?</source>
<translation>Souhaitez-vous sauvegarder l&apos;étude en cours avant de la fermer ?</translation>
</message>
<message>
<location filename="../View/Translate.py" line="109"/>
<source>Warning</source>
<translation>Avertissement</translation>
</message>
</context>
<context>
<name>MainWindow_reach</name>