diff --git a/doc/dev/documentation.org b/doc/dev/documentation.org index 28fad83926138762f693f6c2e408bf75806b86a2..f7285945ad04561cbb8e81531466006c4ca30640 100644 --- a/doc/dev/documentation.org +++ b/doc/dev/documentation.org @@ -1334,7 +1334,7 @@ https://gitlab.irstea.fr/theophile.terraz/pamhyr You can improve or add translation for the project. To contribute to Pamhyr2 translate, you need to use Qt Linguist[fn:qt-linguist]. Open -Qt-linguist and edite the translation ({{{file(.ts)}}}) file, finally, +Qt-linguist and edit the translation ({{{file(.ts)}}}) file, finally, commit the new version of file and make a merge request. If you want add a new language, edit the script diff --git a/src/Model/Geometry/ProfileXYZ.py b/src/Model/Geometry/ProfileXYZ.py index 27b933b513d021f476f8ff599401a3958dda8680..54626bb38cd6471b8c63d03c2cb80c1462307211 100644 --- a/src/Model/Geometry/ProfileXYZ.py +++ b/src/Model/Geometry/ProfileXYZ.py @@ -431,8 +431,9 @@ class ProfileXYZ(Profile, SQLSubModel): area = 0.0 for line in lines: - poly = geometry.Polygon(line) - area += poly.area + if len(line.coords) > 2: + poly = geometry.Polygon(line) + area += poly.area return area return poly.area diff --git a/src/View/ui/InitialConditions.ui b/src/View/ui/InitialConditions.ui index 403a5fe248acde4885b50cf008069e7e96fecf1a..68ed2f9416dc420d01b59fbef0be8a21f0d99e9b 100644 --- a/src/View/ui/InitialConditions.ui +++ b/src/View/ui/InitialConditions.ui @@ -27,14 +27,14 @@ <item> <widget class="QPushButton" name="pushButton_generate_1"> <property name="text"> - <string>Generate from height</string> + <string>Generate height</string> </property> </widget> </item> <item> <widget class="QPushButton" name="pushButton_generate_2"> <property name="text"> - <string>Generate from discharge</string> + <string>Generate discharge</string> </property> </widget> </item> diff --git a/src/lang/fr.ts b/src/lang/fr.ts index 81b4d312e674b1d8031da2c8383e45c2c5e256b3..7ae74e51c7f5229439ca3968eaad2f23358ccdc1 100644 --- a/src/lang/fr.ts +++ b/src/lang/fr.ts @@ -2168,13 +2168,13 @@ </message> <message> <location filename="../View/ui/InitialConditions.ui" line="30"/> - <source>Generate from height</source> - <translation>Générer pour une hauteur donnée</translation> + <source>Generate height</source> + <translation>Générer une hauteur</translation> </message> <message> <location filename="../View/ui/InitialConditions.ui" line="37"/> - <source>Generate from discharge</source> - <translation>Générer pour un débit donné</translation> + <source>Generate discharge</source> + <translation>Générer un débit</translation> </message> <message> <location filename="../View/ui/InitialConditions.ui" line="98"/>