From fb6f0507b93a35f6584ba695ba4761ed9c06604d Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Mon, 29 Jan 2024 17:02:54 +0000
Subject: [PATCH 01/12] feat: add rugofond module and configure fields Refs
 #657

---
 jalhyd_branch                            |  2 +-
 src/app/calculators/rugofond/config.json | 58 ++++++++++++++++++++++++
 src/app/calculators/rugofond/en.json     | 42 +++++++++++++++++
 src/app/calculators/rugofond/fr.json     | 42 +++++++++++++++++
 src/app/config.json                      |  2 +-
 src/locale/messages.en.json              |  1 +
 src/locale/messages.fr.json              |  2 +
 7 files changed, 147 insertions(+), 2 deletions(-)
 create mode 100644 src/app/calculators/rugofond/config.json
 create mode 100644 src/app/calculators/rugofond/en.json
 create mode 100644 src/app/calculators/rugofond/fr.json

diff --git a/jalhyd_branch b/jalhyd_branch
index 94a6cacfd..aa60e2b3f 100644
--- a/jalhyd_branch
+++ b/jalhyd_branch
@@ -1 +1 @@
-325-courbe-de-remous-calculer-une-courbe-de-remous-de-passe-a-macro-rugosites
+340-ajout-de-la-passe-a-rugosite-de-fond
diff --git a/src/app/calculators/rugofond/config.json b/src/app/calculators/rugofond/config.json
new file mode 100644
index 000000000..3acfae33b
--- /dev/null
+++ b/src/app/calculators/rugofond/config.json
@@ -0,0 +1,58 @@
+[
+    {
+        "id": "fs_hydraulique",
+        "type": "fieldset",
+        "fields": [
+            "Z1",
+            "Q"
+        ]
+    },
+    {
+        "id": "fs_geometry",
+        "type": "fieldset",
+        "fields": [
+            "L",
+            "Cd",
+            "d65",
+            {
+                "id": "If",
+                "help": "hsl/pente.html"
+            },
+            {
+                "id": "P",
+                "allowEmpty": true
+            },
+            {
+                "id": "ZD1",
+                "allowEmpty": true
+            },
+            {
+                "id": "ZR1",
+                "allowEmpty": true
+            },
+            {
+                "id": "ZD2",
+                "allowEmpty": true
+            },
+            {
+                "id": "ZR2",
+                "allowEmpty": true
+            },
+            {
+                "id": "Ks",
+                "help": "pam/macrorugo.html#rugosite-de-fond"
+            }
+        ]
+    },
+    {
+        "id": "fs_type",
+        "type": "fieldset",
+        "fields": [
+            "ZF1",
+            {
+                "id": "Nb",
+                "allowEmpty": true
+            }
+        ]
+    }
+]
diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
new file mode 100644
index 000000000..1048d75f9
--- /dev/null
+++ b/src/app/calculators/rugofond/en.json
@@ -0,0 +1,42 @@
+{
+    "fs_hydraulique": "Hydraulic parameters",
+    "fs_geometry": "Pass geometry",
+    "fs_pass": "Fish pass parameters",
+    "fs_bloc": "Blocks parameters",
+    "fs_pass_type": "Pass type",
+    "macrorugo_container": "Aprons",
+    "fs_macrorugo": "Apron",
+
+    "select_passtype": "Pass type",
+    "Q": "Flow",
+    "If": "Slope",
+    "Ks": "Bottom roughness",
+    "C": "Block concentration",
+    "PBD": "Diameter",
+    "PBH": "Height",
+    "Cd0": "Shape (1 for round, 2 for square)",
+    "ZRL": "Upper upstream ramp bottom elevation",
+    "ZRR": "Lower upstream ramp bottom elevation",
+    "BR": "Total width",
+    "ZF1": "Upstream ramp bottom elevation",
+    "B": "Width",
+    "Y": "Water depth",
+    "xCenter": "Mid-apron abscissa",
+    "ZD1": "Upstream spilling elevation",
+    "ZR1": "Upstream apron elevation",
+    "ZD2": "Downstream spilling elevation",
+    "ZR2": "Downstream apron elevation",
+    "S": "Slope",
+    "P": "Space between baffles",
+    "Nb": "Number of baffles",
+    "L": "Total width of baffle / pattern (superactive)",
+    "a": "Height of the pattern / height and thickness of the chevron (chevrons)",
+    "N": "Number of patterns",
+    "M": "Number of longitudinal strips",
+    "Cd": "Discharge coefficient",
+    "d65": "d65",
+    
+
+    "PASSTYPE_0": "Multiple aprons",
+    "PASSTYPE_1": "Inclined apron"
+}
\ No newline at end of file
diff --git a/src/app/calculators/rugofond/fr.json b/src/app/calculators/rugofond/fr.json
new file mode 100644
index 000000000..9ff740907
--- /dev/null
+++ b/src/app/calculators/rugofond/fr.json
@@ -0,0 +1,42 @@
+{
+    "fs_hydraulique": "Paramètres hydrauliques",
+    "fs_geometry": "Géométrie de la passe",
+    "fs_type": "Type de rampe",
+    "fs_pass": "Paramètres de la passe",
+    "fs_bloc": "Paramètres des blocs",
+    "fs_pass_type": "Type de passe",
+    "macrorugo_container": "Radiers",
+    "fs_macrorugo": "Radier",
+
+    "select_passtype": "Type de passe",
+    "Q": "Débit",
+    "If": "Pente",
+    "Ks": "Rugosité de fond",
+    "C": "Concentration de blocs",
+    "PBD": "Diamètre",
+    "PBH": "Hauteur",
+    "Cd0": "Forme (1 pour rond, 2 pour carré)",
+    "ZRL": "Cote de fond haut amont rampe",
+    "ZRR": "Cote de fond bas amont rampe",
+    "BR": "Largeur totale",
+    "ZF1": "Cote de fond amont rampe",
+    "B": "Largeur",
+    "Y": "Profondeur",
+    "xCenter": "Abscisse du milieu du radier",
+    "ZD1": "Cote de déversement à l'amont",
+    "ZR1": "Cote de radier à l'amont",
+    "ZD2": "Cote de déversement à l'aval",
+    "ZR2": "Cote de radier à l'aval",
+    "S": "Pente",
+    "P": "Espacement entre les ralentisseurs",
+    "Nb": "Nombre de ralentisseurs",
+    "L": "Largeur totale du ralentisseur  / du motif (suractifs)",
+    "a": "Hauteur du motif / hauteur et épaisseur du chevron (chevrons)",
+    "N": "Nombre de motifs",
+    "M": "Nombre de bandes longitudinales",
+    "Cd": "Coefficient de débit",
+    "d65": "d65",
+    
+    "PASSTYPE_0": "Radiers multiples",
+    "PASSTYPE_1": "Radier incliné"
+}
\ No newline at end of file
diff --git a/src/app/config.json b/src/app/config.json
index e3ac99d86..bf12d9f31 100644
--- a/src/app/config.json
+++ b/src/app/config.json
@@ -31,7 +31,7 @@
                 "path": "passe-naturelle.jpg",
                 "credits": "S. Richard / OFB"
             },
-            "calculators": [ 11, 17, 27, 37 ]
+            "calculators": [ 11, 17, 27, 37, 38 ]
         },
         {
             "name": "VERIFICATION",
diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index b6d2282fa..fac0b022e 100755
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -512,6 +512,7 @@
     "INFO_PARALLELSTRUCTURE_TITRE_COURT": "// structures",
     "INFO_PARALLELSTRUCTURE_TITRE": "Parallel structures",
     "INFO_PAR_TITRE": "Baffle fishway: setup",
+    "INFO_RUGOFOND_TITRE": "toto",
     "INFO_PAR_DESCRIPTION": "planes Denil Fatou superactive mixte chevrons canoe",
     "INFO_PAR_TITRE_COURT": "HF: setup",
     "INFO_PARSIMULATION_TITRE": "Baffle fishway: simulation",
diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json
index 88331c2bb..1290374dd 100755
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -513,6 +513,8 @@
     "INFO_PARALLELSTRUCTURE_TITRE_COURT": "Ouvrages",
     "INFO_PARALLELSTRUCTURE_TITRE": "Lois d'ouvrages",
     "INFO_PAR_TITRE": "Passe à ralentisseurs&nbsp;: calage",
+    "INFO_RUGOFOND_TITRE": "Passe à rugosité de fond",
+    "INFO_RUGOFOND_TITRE_COURT": "Rugofond",
     "INFO_PAR_DESCRIPTION": "plans Denil Fatou fonds suractifs mixte chevrons canoë",
     "INFO_PAR_TITRE_COURT": "PAR&nbsp;: calage",
     "INFO_PARSIMULATION_TITRE": "Passe à ralentisseurs&nbsp;: simulation",
-- 
GitLab


From 9d37d055c41498e094c7980d883b89aa727b472b Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Tue, 30 Jan 2024 15:54:46 +0000
Subject: [PATCH 02/12] feat: refactor config.json module and translation error
 message Refs #657

---
 src/app/calculators/rugofond/config.json | 41 ++++++++++--------------
 src/app/calculators/rugofond/en.json     | 19 +++--------
 src/app/calculators/rugofond/fr.json     | 25 +++------------
 src/locale/messages.en.json              |  1 +
 src/locale/messages.fr.json              |  1 +
 5 files changed, 27 insertions(+), 60 deletions(-)

diff --git a/src/app/calculators/rugofond/config.json b/src/app/calculators/rugofond/config.json
index 3acfae33b..66eace589 100644
--- a/src/app/calculators/rugofond/config.json
+++ b/src/app/calculators/rugofond/config.json
@@ -3,8 +3,8 @@
         "id": "fs_hydraulique",
         "type": "fieldset",
         "fields": [
-            "Z1",
-            "Q"
+            "Q",
+            "Z1"
         ]
     },
     {
@@ -12,32 +12,12 @@
         "type": "fieldset",
         "fields": [
             "L",
-            "Cd",
-            "d65",
             {
                 "id": "If",
                 "help": "hsl/pente.html"
             },
-            {
-                "id": "P",
-                "allowEmpty": true
-            },
-            {
-                "id": "ZD1",
-                "allowEmpty": true
-            },
-            {
-                "id": "ZR1",
-                "allowEmpty": true
-            },
-            {
-                "id": "ZD2",
-                "allowEmpty": true
-            },
-            {
-                "id": "ZR2",
-                "allowEmpty": true
-            },
+            "Cdt",
+            "d65",
             {
                 "id": "Ks",
                 "help": "pam/macrorugo.html#rugosite-de-fond"
@@ -48,7 +28,20 @@
         "id": "fs_type",
         "type": "fieldset",
         "fields": [
+            {
+                "id": "select_passtype",
+                "type": "select",
+                "property": "inclinedApron"
+            },
             "ZF1",
+            {
+                "id": "ZD1",
+                "allowEmpty": true
+            },
+            {
+                "id": "ZR1",
+                "allowEmpty": true
+            },
             {
                 "id": "Nb",
                 "allowEmpty": true
diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
index 1048d75f9..b0f5ca0ff 100644
--- a/src/app/calculators/rugofond/en.json
+++ b/src/app/calculators/rugofond/en.json
@@ -17,23 +17,12 @@
     "Cd0": "Shape (1 for round, 2 for square)",
     "ZRL": "Upper upstream ramp bottom elevation",
     "ZRR": "Lower upstream ramp bottom elevation",
-    "BR": "Total width",
     "ZF1": "Upstream ramp bottom elevation",
-    "B": "Width",
-    "Y": "Water depth",
-    "xCenter": "Mid-apron abscissa",
-    "ZD1": "Upstream spilling elevation",
-    "ZR1": "Upstream apron elevation",
-    "ZD2": "Downstream spilling elevation",
-    "ZR2": "Downstream apron elevation",
-    "S": "Slope",
-    "P": "Space between baffles",
+    "ZD1": "Lower upstream ramp bottom elevation",
+    "ZR1": "Upper upstream ramp bottom elevation",
     "Nb": "Number of baffles",
-    "L": "Total width of baffle / pattern (superactive)",
-    "a": "Height of the pattern / height and thickness of the chevron (chevrons)",
-    "N": "Number of patterns",
-    "M": "Number of longitudinal strips",
-    "Cd": "Discharge coefficient",
+    "L": "Total width of ramp",
+    "Cdt": "Discharge coefficient",
     "d65": "d65",
     
 
diff --git a/src/app/calculators/rugofond/fr.json b/src/app/calculators/rugofond/fr.json
index 9ff740907..afefbc1a9 100644
--- a/src/app/calculators/rugofond/fr.json
+++ b/src/app/calculators/rugofond/fr.json
@@ -12,29 +12,12 @@
     "Q": "Débit",
     "If": "Pente",
     "Ks": "Rugosité de fond",
-    "C": "Concentration de blocs",
-    "PBD": "Diamètre",
-    "PBH": "Hauteur",
-    "Cd0": "Forme (1 pour rond, 2 pour carré)",
-    "ZRL": "Cote de fond haut amont rampe",
-    "ZRR": "Cote de fond bas amont rampe",
-    "BR": "Largeur totale",
     "ZF1": "Cote de fond amont rampe",
-    "B": "Largeur",
-    "Y": "Profondeur",
-    "xCenter": "Abscisse du milieu du radier",
-    "ZD1": "Cote de déversement à l'amont",
-    "ZR1": "Cote de radier à l'amont",
-    "ZD2": "Cote de déversement à l'aval",
-    "ZR2": "Cote de radier à l'aval",
-    "S": "Pente",
-    "P": "Espacement entre les ralentisseurs",
+    "ZD1": "Cote de fond bas amont rampe",
+    "ZR1": "Cote de fond haut amont rampe",
     "Nb": "Nombre de ralentisseurs",
-    "L": "Largeur totale du ralentisseur  / du motif (suractifs)",
-    "a": "Hauteur du motif / hauteur et épaisseur du chevron (chevrons)",
-    "N": "Nombre de motifs",
-    "M": "Nombre de bandes longitudinales",
-    "Cd": "Coefficient de débit",
+    "L": "Largeur totale de la rampe", 
+    "Cdt": "Coefficient de débit",
     "d65": "d65",
     
     "PASSTYPE_0": "Radiers multiples",
diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index fac0b022e..1c95af5ac 100755
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -82,6 +82,7 @@
     "ERROR_STRUCTURE_Q_TROP_ELEVE": "The flow passing through the other devices is too high: the requested parameter is not calculable.",
     "ERROR_STRUCTURE_ZDV_PAS_CALCULABLE": "Parameter \"Crest elevation\" cannot be calculated with this discharge law",
     "ERROR_STRUCTURE_Z_EGAUX_Q_NON_NUL": "Upstream and downstream elevations are equal but flow is not null",
+    "ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "than the upstream bottom elevation of the ramp",
     "INFO_CALCULATOR_CALC_NAME": "Calculator name",
     "INFO_CALCULATOR_CALCULER": "Compute",
     "INFO_CALCULATOR_CLONE": "Duplicate",
diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json
index 1290374dd..f98183ab4 100755
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -82,6 +82,7 @@
     "ERROR_STRUCTURE_Q_TROP_ELEVE": "Le débit passant par les autres ouvrages est trop élevé&nbsp;: le paramètre demandé n'est pas calculable.",
     "ERROR_STRUCTURE_ZDV_PAS_CALCULABLE": "Le paramètre \"Cote de radier\" ne peut pas être calculé avec cette loi de débit",
     "ERROR_STRUCTURE_Z_EGAUX_Q_NON_NUL": "Les cotes amont aval sont égales et le débit n'est pas nul",
+    "ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "la cote amont est plus basse que la cote de fond amont de la rampe",
     "INFO_CALCULATOR_CALC_NAME": "Nom du module de calcul",
     "INFO_CALCULATOR_CALCULER": "Calculer",
     "INFO_CALCULATOR_CLONE": "Dupliquer",
-- 
GitLab


From bbaa6086f1c90d912e9765ce9b66ba18379978df Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Wed, 31 Jan 2024 10:14:47 +0000
Subject: [PATCH 03/12] fix: replace discharge coefficient symbol by the 
 symbol present in Jalhyd to display the  discharge coefficient field

---
 src/app/calculators/rugofond/config.json | 2 +-
 src/app/calculators/rugofond/en.json     | 2 +-
 src/app/calculators/rugofond/fr.json     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/app/calculators/rugofond/config.json b/src/app/calculators/rugofond/config.json
index 66eace589..ecccb07ad 100644
--- a/src/app/calculators/rugofond/config.json
+++ b/src/app/calculators/rugofond/config.json
@@ -16,7 +16,7 @@
                 "id": "If",
                 "help": "hsl/pente.html"
             },
-            "Cdt",
+            "CdT",
             "d65",
             {
                 "id": "Ks",
diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
index b0f5ca0ff..7902781f7 100644
--- a/src/app/calculators/rugofond/en.json
+++ b/src/app/calculators/rugofond/en.json
@@ -22,7 +22,7 @@
     "ZR1": "Upper upstream ramp bottom elevation",
     "Nb": "Number of baffles",
     "L": "Total width of ramp",
-    "Cdt": "Discharge coefficient",
+    "CdT": "Discharge coefficient",
     "d65": "d65",
     
 
diff --git a/src/app/calculators/rugofond/fr.json b/src/app/calculators/rugofond/fr.json
index afefbc1a9..e289f7737 100644
--- a/src/app/calculators/rugofond/fr.json
+++ b/src/app/calculators/rugofond/fr.json
@@ -17,7 +17,7 @@
     "ZR1": "Cote de fond haut amont rampe",
     "Nb": "Nombre de ralentisseurs",
     "L": "Largeur totale de la rampe", 
-    "Cdt": "Coefficient de débit",
+    "CdT": "Coefficient de débit",
     "d65": "d65",
     
     "PASSTYPE_0": "Radiers multiples",
-- 
GitLab


From 0aa79ee46c7c680806cae98490570f37733b0934 Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Thu, 1 Feb 2024 16:32:43 +0000
Subject: [PATCH 04/12] feat: add translated error message Refs #657

---
 src/locale/messages.en.json | 2 ++
 src/locale/messages.fr.json | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index 1c95af5ac..a5defee46 100755
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -83,6 +83,8 @@
     "ERROR_STRUCTURE_ZDV_PAS_CALCULABLE": "Parameter \"Crest elevation\" cannot be calculated with this discharge law",
     "ERROR_STRUCTURE_Z_EGAUX_Q_NON_NUL": "Upstream and downstream elevations are equal but flow is not null",
     "ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "than the upstream bottom elevation of the ramp",
+    "ERROR_COEF_DEBIT_NULL": "Calculation is impossible when discharge coefficient is null",
+    "ERROR_D65_NULL": "Calculation is impossible when d65 is null",
     "INFO_CALCULATOR_CALC_NAME": "Calculator name",
     "INFO_CALCULATOR_CALCULER": "Compute",
     "INFO_CALCULATOR_CLONE": "Duplicate",
diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json
index f98183ab4..7c000f250 100755
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -83,6 +83,8 @@
     "ERROR_STRUCTURE_ZDV_PAS_CALCULABLE": "Le paramètre \"Cote de radier\" ne peut pas être calculé avec cette loi de débit",
     "ERROR_STRUCTURE_Z_EGAUX_Q_NON_NUL": "Les cotes amont aval sont égales et le débit n'est pas nul",
     "ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "la cote amont est plus basse que la cote de fond amont de la rampe",
+    "ERROR_COEF_DEBIT_NULL": "Le calcul impossible à cause d'un coefficient de débit nul",
+    "ERROR_D65_NULL": "Le calcul impossible à cause d'un d65 nul",
     "INFO_CALCULATOR_CALC_NAME": "Nom du module de calcul",
     "INFO_CALCULATOR_CALCULER": "Calculer",
     "INFO_CALCULATOR_CLONE": "Dupliquer",
-- 
GitLab


From 6943688cd7a48dc9086a78e48a3231b0363a87f2 Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Fri, 2 Feb 2024 08:57:17 +0000
Subject: [PATCH 05/12] fix: align english translations with french translation
 to validate checktranslation script Refs #657

---
 src/app/calculators/rugofond/en.json | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
index 7902781f7..b48fe40ee 100644
--- a/src/app/calculators/rugofond/en.json
+++ b/src/app/calculators/rugofond/en.json
@@ -1,6 +1,7 @@
 {
     "fs_hydraulique": "Hydraulic parameters",
     "fs_geometry": "Pass geometry",
+    "fs_type": "Ramp type",
     "fs_pass": "Fish pass parameters",
     "fs_bloc": "Blocks parameters",
     "fs_pass_type": "Pass type",
@@ -11,12 +12,6 @@
     "Q": "Flow",
     "If": "Slope",
     "Ks": "Bottom roughness",
-    "C": "Block concentration",
-    "PBD": "Diameter",
-    "PBH": "Height",
-    "Cd0": "Shape (1 for round, 2 for square)",
-    "ZRL": "Upper upstream ramp bottom elevation",
-    "ZRR": "Lower upstream ramp bottom elevation",
     "ZF1": "Upstream ramp bottom elevation",
     "ZD1": "Lower upstream ramp bottom elevation",
     "ZR1": "Upper upstream ramp bottom elevation",
@@ -24,7 +19,6 @@
     "L": "Total width of ramp",
     "CdT": "Discharge coefficient",
     "d65": "d65",
-    
 
     "PASSTYPE_0": "Multiple aprons",
     "PASSTYPE_1": "Inclined apron"
-- 
GitLab


From bdcda1dbd1017d3ca5764aa1733ff995df43c295 Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Fri, 2 Feb 2024 10:19:13 +0000
Subject: [PATCH 06/12] feat: add  translattion  of error message when Z1 = ZF1
 Refs #657

---
 src/locale/messages.en.json | 3 ++-
 src/locale/messages.fr.json | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index a5defee46..b6bda9aaa 100755
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -82,7 +82,8 @@
     "ERROR_STRUCTURE_Q_TROP_ELEVE": "The flow passing through the other devices is too high: the requested parameter is not calculable.",
     "ERROR_STRUCTURE_ZDV_PAS_CALCULABLE": "Parameter \"Crest elevation\" cannot be calculated with this discharge law",
     "ERROR_STRUCTURE_Z_EGAUX_Q_NON_NUL": "Upstream and downstream elevations are equal but flow is not null",
-    "ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "than the upstream bottom elevation of the ramp",
+    "ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "Upstream elevation is lower than the upstream bottom elevation of the ramp",
+    "ERROR_ELEVATION_Z1_EQUAL_TO_ZF1": "Upstream elevation is equal to the upstream bottom elevation of the ramp",
     "ERROR_COEF_DEBIT_NULL": "Calculation is impossible when discharge coefficient is null",
     "ERROR_D65_NULL": "Calculation is impossible when d65 is null",
     "INFO_CALCULATOR_CALC_NAME": "Calculator name",
diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json
index 7c000f250..62d4e610b 100755
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -82,7 +82,8 @@
     "ERROR_STRUCTURE_Q_TROP_ELEVE": "Le débit passant par les autres ouvrages est trop élevé&nbsp;: le paramètre demandé n'est pas calculable.",
     "ERROR_STRUCTURE_ZDV_PAS_CALCULABLE": "Le paramètre \"Cote de radier\" ne peut pas être calculé avec cette loi de débit",
     "ERROR_STRUCTURE_Z_EGAUX_Q_NON_NUL": "Les cotes amont aval sont égales et le débit n'est pas nul",
-    "ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "la cote amont est plus basse que la cote de fond amont de la rampe",
+    "ERROR_ELEVATION_Z1_LOWER_THAN_ZF1": "La cote amont est plus basse que la cote de fond amont de la rampe",
+    "ERROR_ELEVATION_Z1_EQUAL_TO_ZF1": "La cote de l'eau amont est égale à la cote de fond amont de la rampe",
     "ERROR_COEF_DEBIT_NULL": "Le calcul impossible à cause d'un coefficient de débit nul",
     "ERROR_D65_NULL": "Le calcul impossible à cause d'un d65 nul",
     "INFO_CALCULATOR_CALC_NAME": "Nom du module de calcul",
-- 
GitLab


From f4f9150dff61f74791636e18be1a9bdb4a0329a3 Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Fri, 2 Feb 2024 15:39:14 +0000
Subject: [PATCH 07/12] feat: add crest type select in rugofond config.json
 Refs #657

---
 src/app/calculators/rugofond/config.json | 2 +-
 src/app/calculators/rugofond/en.json     | 2 +-
 src/app/calculators/rugofond/fr.json     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/app/calculators/rugofond/config.json b/src/app/calculators/rugofond/config.json
index ecccb07ad..e75940758 100644
--- a/src/app/calculators/rugofond/config.json
+++ b/src/app/calculators/rugofond/config.json
@@ -31,7 +31,7 @@
             {
                 "id": "select_passtype",
                 "type": "select",
-                "property": "inclinedApron"
+                "property": "crestType"
             },
             "ZF1",
             {
diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
index b48fe40ee..c986c8f6e 100644
--- a/src/app/calculators/rugofond/en.json
+++ b/src/app/calculators/rugofond/en.json
@@ -20,6 +20,6 @@
     "CdT": "Discharge coefficient",
     "d65": "d65",
 
-    "PASSTYPE_0": "Multiple aprons",
+    "PASSTYPE_0": "Horizontal aprons",
     "PASSTYPE_1": "Inclined apron"
 }
\ No newline at end of file
diff --git a/src/app/calculators/rugofond/fr.json b/src/app/calculators/rugofond/fr.json
index e289f7737..68680d054 100644
--- a/src/app/calculators/rugofond/fr.json
+++ b/src/app/calculators/rugofond/fr.json
@@ -20,6 +20,6 @@
     "CdT": "Coefficient de débit",
     "d65": "d65",
     
-    "PASSTYPE_0": "Radiers multiples",
+    "PASSTYPE_0": "Radier hotizontal",
     "PASSTYPE_1": "Radier incliné"
 }
\ No newline at end of file
-- 
GitLab


From 4fb50527f87d6f013825c14f0670b286c45cfffb Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Mon, 5 Feb 2024 15:16:09 +0000
Subject: [PATCH 08/12] feat: replaceKs Field by Stickler correction factor
 Refs #657

---
 src/app/calculators/rugofond/config.json | 5 +----
 src/app/calculators/rugofond/en.json     | 2 +-
 src/app/calculators/rugofond/fr.json     | 4 ++--
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/app/calculators/rugofond/config.json b/src/app/calculators/rugofond/config.json
index e75940758..38289c769 100644
--- a/src/app/calculators/rugofond/config.json
+++ b/src/app/calculators/rugofond/config.json
@@ -18,10 +18,7 @@
             },
             "CdT",
             "d65",
-            {
-                "id": "Ks",
-                "help": "pam/macrorugo.html#rugosite-de-fond"
-            }
+            "a"
         ]
     },
     {
diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
index c986c8f6e..a075a1041 100644
--- a/src/app/calculators/rugofond/en.json
+++ b/src/app/calculators/rugofond/en.json
@@ -11,7 +11,7 @@
     "select_passtype": "Pass type",
     "Q": "Flow",
     "If": "Slope",
-    "Ks": "Bottom roughness",
+    "a": "Stickler correction factor",
     "ZF1": "Upstream ramp bottom elevation",
     "ZD1": "Lower upstream ramp bottom elevation",
     "ZR1": "Upper upstream ramp bottom elevation",
diff --git a/src/app/calculators/rugofond/fr.json b/src/app/calculators/rugofond/fr.json
index 68680d054..f6883198c 100644
--- a/src/app/calculators/rugofond/fr.json
+++ b/src/app/calculators/rugofond/fr.json
@@ -11,7 +11,7 @@
     "select_passtype": "Type de passe",
     "Q": "Débit",
     "If": "Pente",
-    "Ks": "Rugosité de fond",
+    "a": "Coefficient correcteur du Strickler",
     "ZF1": "Cote de fond amont rampe",
     "ZD1": "Cote de fond bas amont rampe",
     "ZR1": "Cote de fond haut amont rampe",
@@ -20,6 +20,6 @@
     "CdT": "Coefficient de débit",
     "d65": "d65",
     
-    "PASSTYPE_0": "Radier hotizontal",
+    "PASSTYPE_0": "Radier horizontal",
     "PASSTYPE_1": "Radier incliné"
 }
\ No newline at end of file
-- 
GitLab


From e52682cb1bcf6e9e7bc55a54975282b829c01ea5 Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Tue, 6 Feb 2024 11:21:25 +0000
Subject: [PATCH 09/12] fix: reorganize fields and add crest geometry and ramp
 geometry Refs #657

---
 src/app/calculators/rugofond/config.json | 10 ++++++++--
 src/app/calculators/rugofond/en.json     |  3 ++-
 src/app/calculators/rugofond/fr.json     |  3 ++-
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/app/calculators/rugofond/config.json b/src/app/calculators/rugofond/config.json
index 38289c769..884b56133 100644
--- a/src/app/calculators/rugofond/config.json
+++ b/src/app/calculators/rugofond/config.json
@@ -8,15 +8,21 @@
         ]
     },
     {
-        "id": "fs_geometry",
+        "id": "fs_geometry_crete",
         "type": "fieldset",
         "fields": [
             "L",
+            "CdT"
+        ]
+    },
+    {
+        "id": "fs_geometry_rampe",
+        "type": "fieldset",
+        "fields": [
             {
                 "id": "If",
                 "help": "hsl/pente.html"
             },
-            "CdT",
             "d65",
             "a"
         ]
diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
index a075a1041..02f50730f 100644
--- a/src/app/calculators/rugofond/en.json
+++ b/src/app/calculators/rugofond/en.json
@@ -1,6 +1,7 @@
 {
     "fs_hydraulique": "Hydraulic parameters",
-    "fs_geometry": "Pass geometry",
+    "fs_geometry_crete": "Crest geometry",
+    "fs_geometry_rampe": "Ramp geometry",
     "fs_type": "Ramp type",
     "fs_pass": "Fish pass parameters",
     "fs_bloc": "Blocks parameters",
diff --git a/src/app/calculators/rugofond/fr.json b/src/app/calculators/rugofond/fr.json
index f6883198c..8e91405be 100644
--- a/src/app/calculators/rugofond/fr.json
+++ b/src/app/calculators/rugofond/fr.json
@@ -1,6 +1,7 @@
 {
     "fs_hydraulique": "Paramètres hydrauliques",
-    "fs_geometry": "Géométrie de la passe",
+    "fs_geometry_crete": "Géométrie de la crête",
+    "fs_geometry_rampe": "Géométrie de la rampe",
     "fs_type": "Type de rampe",
     "fs_pass": "Paramètres de la passe",
     "fs_bloc": "Paramètres des blocs",
-- 
GitLab


From 83abbc35ab0513bc3d5bca582f248930426e64ff Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Tue, 6 Feb 2024 16:13:34 +0000
Subject: [PATCH 10/12] fix: add English translation for rugoFond titles Refs
 #657

---
 src/app/calculators/rugofond/en.json | 2 +-
 src/locale/messages.en.json          | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
index 02f50730f..bd93e72e6 100644
--- a/src/app/calculators/rugofond/en.json
+++ b/src/app/calculators/rugofond/en.json
@@ -12,7 +12,7 @@
     "select_passtype": "Pass type",
     "Q": "Flow",
     "If": "Slope",
-    "a": "Stickler correction factor",
+    "a": "Strickler correction factor",
     "ZF1": "Upstream ramp bottom elevation",
     "ZD1": "Lower upstream ramp bottom elevation",
     "ZR1": "Upper upstream ramp bottom elevation",
diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index b6bda9aaa..137f6c6f2 100755
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -516,7 +516,8 @@
     "INFO_PARALLELSTRUCTURE_TITRE_COURT": "// structures",
     "INFO_PARALLELSTRUCTURE_TITRE": "Parallel structures",
     "INFO_PAR_TITRE": "Baffle fishway: setup",
-    "INFO_RUGOFOND_TITRE": "toto",
+    "INFO_RUGOFOND_TITRE": "Bed roughness fishpasses",
+    "INFO_RUGOFOND_TITRE_COURT": "Bed roughness",
     "INFO_PAR_DESCRIPTION": "planes Denil Fatou superactive mixte chevrons canoe",
     "INFO_PAR_TITRE_COURT": "HF: setup",
     "INFO_PARSIMULATION_TITRE": "Baffle fishway: simulation",
-- 
GitLab


From b813f8429734297116809813739130a8e2cf5ba3 Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Wed, 7 Feb 2024 08:58:02 +0000
Subject: [PATCH 11/12] fix: remove select pass type in rugoFond config.json
 Refs #657

---
 src/app/calculators/rugofond/config.json | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/app/calculators/rugofond/config.json b/src/app/calculators/rugofond/config.json
index 884b56133..5ddd036d6 100644
--- a/src/app/calculators/rugofond/config.json
+++ b/src/app/calculators/rugofond/config.json
@@ -31,11 +31,6 @@
         "id": "fs_type",
         "type": "fieldset",
         "fields": [
-            {
-                "id": "select_passtype",
-                "type": "select",
-                "property": "crestType"
-            },
             "ZF1",
             {
                 "id": "ZD1",
-- 
GitLab


From e484a018134ec5db2c0128932946f29c67274037 Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Wed, 7 Feb 2024 10:53:24 +0000
Subject: [PATCH 12/12] fix: replace "Cdt" by "Cd" in Rugofond config.json Refs
 #657

---
 src/app/calculators/rugofond/config.json | 2 +-
 src/app/calculators/rugofond/en.json     | 2 +-
 src/app/calculators/rugofond/fr.json     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/app/calculators/rugofond/config.json b/src/app/calculators/rugofond/config.json
index 5ddd036d6..e9b92f7f7 100644
--- a/src/app/calculators/rugofond/config.json
+++ b/src/app/calculators/rugofond/config.json
@@ -12,7 +12,7 @@
         "type": "fieldset",
         "fields": [
             "L",
-            "CdT"
+            "Cd"
         ]
     },
     {
diff --git a/src/app/calculators/rugofond/en.json b/src/app/calculators/rugofond/en.json
index bd93e72e6..4d57cf8c6 100644
--- a/src/app/calculators/rugofond/en.json
+++ b/src/app/calculators/rugofond/en.json
@@ -18,7 +18,7 @@
     "ZR1": "Upper upstream ramp bottom elevation",
     "Nb": "Number of baffles",
     "L": "Total width of ramp",
-    "CdT": "Discharge coefficient",
+    "Cd": "Discharge coefficient",
     "d65": "d65",
 
     "PASSTYPE_0": "Horizontal aprons",
diff --git a/src/app/calculators/rugofond/fr.json b/src/app/calculators/rugofond/fr.json
index 8e91405be..371572308 100644
--- a/src/app/calculators/rugofond/fr.json
+++ b/src/app/calculators/rugofond/fr.json
@@ -18,7 +18,7 @@
     "ZR1": "Cote de fond haut amont rampe",
     "Nb": "Nombre de ralentisseurs",
     "L": "Largeur totale de la rampe", 
-    "CdT": "Coefficient de débit",
+    "Cd": "Coefficient de débit",
     "d65": "d65",
     
     "PASSTYPE_0": "Radier horizontal",
-- 
GitLab