mirror of https://gitlab.com/pamhyr/pamhyr2
release for Jerome
parent
7c2d9891d0
commit
10c98bb96e
|
|
@ -55,7 +55,7 @@ class AboutWindow(PamhyrDialog):
|
|||
|
||||
label = self.get_label_text("label_version")
|
||||
label = label.replace("@version", version)
|
||||
label = label.replace("@codename", "(Adis-TS)")
|
||||
label = label.replace("@codename", "(Le Coz)")
|
||||
self.set_label_text("label_version", label)
|
||||
|
||||
# Authors
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ class LCTranslate(MainTranslate):
|
|||
self._dict["y"] = _translate("Geometry", "Y (m)")
|
||||
self._dict["z"] = _translate("Geometry", "Z (m)")
|
||||
self._dict["file_lat"] = _translate(
|
||||
"LateralContribution", "Shapefile (*.LAT *.lat)")
|
||||
"LateralContribution",
|
||||
"Mage lateral contributions file (*.LAT *.lat)")
|
||||
self._dict["file_all"] = _translate(
|
||||
"LateralContribution", "All files (*)")
|
||||
|
||||
|
|
|
|||
|
|
@ -194,10 +194,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
|||
title = "(dbg) " if self.conf.debug else ""
|
||||
|
||||
if self._study is not None:
|
||||
title += f"Pamhyr2 - {self._study.name}"
|
||||
title += f"Pamhyr2 (Le Coz) - {self._study.name}"
|
||||
self.setWindowTitle(title)
|
||||
else:
|
||||
title += "Pamhyr2"
|
||||
title += "Pamhyr2 (Le Coz)"
|
||||
self.setWindowTitle(title)
|
||||
|
||||
def setup_tab(self):
|
||||
|
|
|
|||
|
|
@ -738,20 +738,29 @@ class ResultsWindow(PamhyrWindow):
|
|||
first_line.append(f"Profile: {pname}")
|
||||
val_dict = self._export_time(profile_id, y, solver_id)
|
||||
|
||||
with open(filename, 'w', newline='') as csvfile:
|
||||
writer = csv.writer(csvfile, delimiter=',',
|
||||
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
||||
dict_x = self._trad.get_dict("values_x")
|
||||
header = []
|
||||
writer.writerow(first_line)
|
||||
for text in val_dict.keys():
|
||||
header.append(text)
|
||||
writer.writerow(header)
|
||||
for row in range(len(val_dict[dict_x[x]])):
|
||||
line = []
|
||||
for var in val_dict.keys():
|
||||
line.append(val_dict[var][row])
|
||||
writer.writerow(line)
|
||||
try:
|
||||
with open(filename, 'w', newline='') as csvfile:
|
||||
writer = csv.writer(csvfile, delimiter=',',
|
||||
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
||||
dict_x = self._trad.get_dict("values_x")
|
||||
header = []
|
||||
writer.writerow(first_line)
|
||||
for text in val_dict.keys():
|
||||
header.append(text)
|
||||
writer.writerow(header)
|
||||
for row in range(len(val_dict[dict_x[x]])):
|
||||
line = []
|
||||
for var in val_dict.keys():
|
||||
line.append(val_dict[var][row])
|
||||
writer.writerow(line)
|
||||
self._timer.stop()
|
||||
except Exception as e:
|
||||
self.message_box(
|
||||
window_title=self._trad["Warning"],
|
||||
text=self._trad["mb_write_error"],
|
||||
informative_text=self._trad["mb_close_file"]
|
||||
)
|
||||
logger_exception(e)
|
||||
|
||||
def export_all(self, reach, directory, timestamps):
|
||||
name = reach.name
|
||||
|
|
@ -764,17 +773,25 @@ class ResultsWindow(PamhyrWindow):
|
|||
f"reach_{name}.csv"
|
||||
)
|
||||
|
||||
with open(file_name, 'w', newline='') as csvfile:
|
||||
writer = csv.writer(csvfile, delimiter=',',
|
||||
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
||||
ts = timestamps[0]
|
||||
writer.writerow(self._table["raw_data"]._headers)
|
||||
for row in range(self._table["raw_data"].rowCount()):
|
||||
line = []
|
||||
for column in range(self._table["raw_data"].columnCount()):
|
||||
index = self._table["raw_data"].index(row, column)
|
||||
line.append(self._table["raw_data"].data(index))
|
||||
writer.writerow(line)
|
||||
try:
|
||||
with open(file_name, 'w', newline='') as csvfile:
|
||||
writer = csv.writer(csvfile, delimiter=',',
|
||||
quotechar='|', quoting=csv.QUOTE_MINIMAL)
|
||||
ts = timestamps[0]
|
||||
writer.writerow(self._table["raw_data"]._headers)
|
||||
for row in range(self._table["raw_data"].rowCount()):
|
||||
line = []
|
||||
for column in range(self._table["raw_data"].columnCount()):
|
||||
index = self._table["raw_data"].index(row, column)
|
||||
line.append(self._table["raw_data"].data(index))
|
||||
writer.writerow(line)
|
||||
except Exception as e:
|
||||
self.message_box(
|
||||
window_title=self._trad["Warning"],
|
||||
text=self._trad["mb_write_errore"],
|
||||
informative_text=self._trad["mb_close_file"]
|
||||
)
|
||||
logger_exception(e)
|
||||
|
||||
def export_current(self):
|
||||
self.file_dialog(
|
||||
|
|
|
|||
|
|
@ -59,6 +59,13 @@ class ResultsTranslate(MainTranslate):
|
|||
self._dict["ImageCoordinates"] = _translate(
|
||||
"Results", "Image coordinates"
|
||||
)
|
||||
self._dict["mb_write_error"] = _translate(
|
||||
"Results", "An error occured when writing to file"
|
||||
)
|
||||
self._dict["mb_close_file"] = _translate(
|
||||
"Results",
|
||||
"If the file is in use, close it and try again"
|
||||
)
|
||||
|
||||
self._sub_dict["table_headers_reach"] = {
|
||||
"name": _translate("Results", "Reach name"),
|
||||
|
|
|
|||
130
src/lang/fr.ts
130
src/lang/fr.ts
|
|
@ -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>
|
||||
|
|
@ -736,12 +735,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Dernière modification :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="37"/>
|
||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="27"/>
|
||||
<source>X axis:</source>
|
||||
<translation>Axe X :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="48"/>
|
||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="38"/>
|
||||
<source>Y axis:</source>
|
||||
<translation>Axe Y :</translation>
|
||||
</message>
|
||||
|
|
@ -751,32 +750,32 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Débit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="168"/>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="128"/>
|
||||
<source>First cross-section</source>
|
||||
<translation>Première section en travers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="189"/>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="149"/>
|
||||
<source>Last cross-section</source>
|
||||
<translation>Dernière section en travers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="133"/>
|
||||
<source>First guideline</source>
|
||||
<translation>Première ligne directrice</translation>
|
||||
<translation type="obsolete">Première ligne directrice</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="114"/>
|
||||
<source>Guideline used for distance computation</source>
|
||||
<translation>Lignes directrices pour le calcul des distances</translation>
|
||||
<translation type="obsolete">Lignes directrices pour le calcul des distances</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="79"/>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="69"/>
|
||||
<source>Spline</source>
|
||||
<translation>Spline</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="89"/>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="79"/>
|
||||
<source>Linear</source>
|
||||
<translation>Linéaire</translation>
|
||||
</message>
|
||||
|
|
@ -806,7 +805,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Ligne</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="157"/>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="117"/>
|
||||
<source>Limits</source>
|
||||
<translation>Limites</translation>
|
||||
</message>
|
||||
|
|
@ -816,12 +815,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Options</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="36"/>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="26"/>
|
||||
<source>Space step (m)</source>
|
||||
<translation>Pas d'espace (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="70"/>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="60"/>
|
||||
<source>Type of interpolation:</source>
|
||||
<translation>Type d'interpolation :</translation>
|
||||
</message>
|
||||
|
|
@ -856,7 +855,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Valeur à l'origine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="30"/>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="20"/>
|
||||
<source>Parameters</source>
|
||||
<translation>Paramètres</translation>
|
||||
</message>
|
||||
|
|
@ -868,7 +867,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<message>
|
||||
<location filename="../View/ui/MeshingOptions.ui" line="123"/>
|
||||
<source>Second guideline</source>
|
||||
<translation>Seconde ligne directrice</translation>
|
||||
<translation type="obsolete">Seconde ligne directrice</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/GeometryReachShift.ui" line="35"/>
|
||||
|
|
@ -908,12 +907,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<message>
|
||||
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="25"/>
|
||||
<source>Upstream height (m)</source>
|
||||
<translation>Cote à l'amont (m)</translation>
|
||||
<translation type="obsolete">Cote à l'amont (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="73"/>
|
||||
<source>Downstream height (m)</source>
|
||||
<translation>Cote à l'aval (m)</translation>
|
||||
<translation type="obsolete">Cote à l'aval (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="107"/>
|
||||
|
|
@ -956,7 +955,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Débit (m³/s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="59"/>
|
||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="49"/>
|
||||
<source>Pollutant:</source>
|
||||
<translation>Polluant:</translation>
|
||||
</message>
|
||||
|
|
@ -1005,6 +1004,21 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<source>Image coordinates</source>
|
||||
<translation type="obsolete">Coordonnées de l'image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/CustomExportAdisDialog.ui" line="70"/>
|
||||
<source>TextLabel</source>
|
||||
<translation>TextLabel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="25"/>
|
||||
<source>Upstream elevation (m)</source>
|
||||
<translation>Cote amont</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/InitialConditions_Dialog_Generator_Height.ui" line="73"/>
|
||||
<source>Downstream elevation (m)</source>
|
||||
<translation>Cote aval</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Documentation</name>
|
||||
|
|
@ -1297,19 +1311,24 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/about.ui" line="94"/>
|
||||
<source>Copyright © 2022-2025 INRAE</source>
|
||||
<source>Copyright © 2022-2025 INRAE</source>
|
||||
<translation type="obsolete">Copyright © 2022-2025 INRAE</translation>
|
||||
</message>
|
||||
<message encoding="UTF-8">
|
||||
<location filename="../View/ui/about.ui" line="94"/>
|
||||
<source>Copyright © 2022-2025 INRAE</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Frictions</name>
|
||||
<message>
|
||||
<location filename="../View/Frictions/translate.py" line="45"/>
|
||||
<location filename="../View/Frictions/translate.py" line="49"/>
|
||||
<source>Start (m)</source>
|
||||
<translation>PK de départ (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Frictions/translate.py" line="46"/>
|
||||
<location filename="../View/Frictions/translate.py" line="50"/>
|
||||
<source>End (m)</source>
|
||||
<translation>PK de fin (m)</translation>
|
||||
</message>
|
||||
|
|
@ -1329,10 +1348,20 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Strickler ($m^{1/3}/s$)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Frictions/translate.py" line="47"/>
|
||||
<location filename="../View/Frictions/translate.py" line="51"/>
|
||||
<source>Coefficient</source>
|
||||
<translation>Coefficient</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Frictions/translate.py" line="41"/>
|
||||
<source>Mage initial frictions file (*.RUG *.rug)</source>
|
||||
<translation>Fichier de frottements Mage (*.RUG *.rug)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Frictions/translate.py" line="43"/>
|
||||
<source>All files (*)</source>
|
||||
<translation>Tous les fichiers (*)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GeoTIFF</name>
|
||||
|
|
@ -1577,12 +1606,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Évaporation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/LateralContribution/translate.py" line="60"/>
|
||||
<location filename="../View/LateralContribution/translate.py" line="65"/>
|
||||
<source>Start (m)</source>
|
||||
<translation>PK de départ (m)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/LateralContribution/translate.py" line="61"/>
|
||||
<location filename="../View/LateralContribution/translate.py" line="66"/>
|
||||
<source>End (m)</source>
|
||||
<translation>PK de fin (m)</translation>
|
||||
</message>
|
||||
|
|
@ -1601,6 +1630,21 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<source>End rk (m)</source>
|
||||
<translation>Pk fin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/LateralContribution/translate.py" line="55"/>
|
||||
<source>Shapefile (*.LAT *.lat)</source>
|
||||
<translation type="obsolete">Shapefile (*.LAT *.lat)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/LateralContribution/translate.py" line="58"/>
|
||||
<source>All files (*)</source>
|
||||
<translation>Tous les fichiers (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/LateralContribution/translate.py" line="55"/>
|
||||
<source>Mage lateral contributions file (*.LAT *.lat)</source>
|
||||
<translation>Fichiers d'apports latéraux Mage (*.LAT *.lat)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>LateralContributionAdisTS</name>
|
||||
|
|
@ -2113,7 +2157,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Suspension</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/LateralContributions.ui" line="117"/>
|
||||
<location filename="../View/ui/LateralContributions.ui" line="118"/>
|
||||
<source>Add a new boundary condition or lateral source</source>
|
||||
<translation>Ajouter une condition aux limites ou un apport latéral</translation>
|
||||
</message>
|
||||
|
|
@ -2123,7 +2167,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Supprimer les lignes selectionnées</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/LateralContributions.ui" line="147"/>
|
||||
<location filename="../View/ui/LateralContributions.ui" line="148"/>
|
||||
<source>Edit boundary condition or lateral source</source>
|
||||
<translation>Éditer une condition aux limites ou un apport latéral</translation>
|
||||
</message>
|
||||
|
|
@ -2208,7 +2252,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>supprimer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/ui/Frictions.ui" line="104"/>
|
||||
<location filename="../View/ui/Frictions.ui" line="105"/>
|
||||
<source>Edit Strickler coefficients</source>
|
||||
<translation>Éditer les coefficients de Strickler</translation>
|
||||
</message>
|
||||
|
|
@ -3172,7 +3216,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Lecture des résultats</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="154"/>
|
||||
<location filename="../View/Results/translate.py" line="161"/>
|
||||
<source>Water elevation</source>
|
||||
<translation>Cote de l'eau</translation>
|
||||
</message>
|
||||
|
|
@ -3182,12 +3226,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Cote maximum de l'eau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="64"/>
|
||||
<location filename="../View/Results/translate.py" line="71"/>
|
||||
<source>Reach name</source>
|
||||
<translation>Nom du bief</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="160"/>
|
||||
<location filename="../View/Results/translate.py" line="167"/>
|
||||
<source>Profile</source>
|
||||
<translation>Profil</translation>
|
||||
</message>
|
||||
|
|
@ -3242,12 +3286,12 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation>Masse min</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="68"/>
|
||||
<location filename="../View/Results/translate.py" line="75"/>
|
||||
<source>Variables names</source>
|
||||
<translation>Noms des variables</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="81"/>
|
||||
<location filename="../View/Results/translate.py" line="88"/>
|
||||
<source>Pollutant name</source>
|
||||
<translation>Nom des polluants</translation>
|
||||
</message>
|
||||
|
|
@ -3257,7 +3301,7 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<translation type="obsolete">enveloppe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="72"/>
|
||||
<location filename="../View/Results/translate.py" line="79"/>
|
||||
<source>Profile name</source>
|
||||
<translation>Nom du profil</translation>
|
||||
</message>
|
||||
|
|
@ -3286,6 +3330,26 @@ Cette fonctionnalité nécessite un bief muni d'une géométrie.</translati
|
|||
<source>All files (*)</source>
|
||||
<translation>Tous les fichiers (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="62"/>
|
||||
<source>An error occured when writing to file</source>
|
||||
<translation>Une erreur s'est produite lors de l'écriture dans le fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="65"/>
|
||||
<source>If the file is open in another application, close it and try again</source>
|
||||
<translation type="obsolete">Si le fichier est ouvert dans une autre application, fermez-la et recommencez</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="65"/>
|
||||
<source>If the file is open in another application, close it and try again</source>
|
||||
<translation type="obsolete">Si le fichier est ouvert dans une autre application, fermez-la et recommencez</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../View/Results/translate.py" line="65"/>
|
||||
<source>If the file is in use, close it and try again</source>
|
||||
<translation>Si le fichier est en cours d'utilisation, fermez-le et recommencez</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SedimentLayers</name>
|
||||
|
|
|
|||
Loading…
Reference in New Issue