From d3422bd7113d18a22dbbc6916a6e87785709d508 Mon Sep 17 00:00:00 2001
From: Jean-Pascal <jean-pascal.aubry@inrae.fr>
Date: Thu, 8 Feb 2024 11:16:53 +0000
Subject: [PATCH] feat: add nub rugofonmultiple structure (fields, translation)
 in nghyd Refs #658

---
 .../calculators/rugofondmultiple/config.json  | 54 +++++++++++++++++++
 src/app/calculators/rugofondmultiple/en.json  | 26 +++++++++
 src/app/calculators/rugofondmultiple/fr.json  | 26 +++++++++
 src/app/config.json                           |  2 +-
 src/locale/messages.en.json                   |  2 +
 src/locale/messages.fr.json                   |  2 +
 6 files changed, 111 insertions(+), 1 deletion(-)
 create mode 100644 src/app/calculators/rugofondmultiple/config.json
 create mode 100644 src/app/calculators/rugofondmultiple/en.json
 create mode 100644 src/app/calculators/rugofondmultiple/fr.json

diff --git a/src/app/calculators/rugofondmultiple/config.json b/src/app/calculators/rugofondmultiple/config.json
new file mode 100644
index 000000000..31d40116e
--- /dev/null
+++ b/src/app/calculators/rugofondmultiple/config.json
@@ -0,0 +1,54 @@
+[
+    {
+        "id": "fs_hydraulique",
+        "type": "fieldset",
+        "fields": [
+            "Q",
+            "Z1"
+        ]
+    },
+    {
+        "id": "fs_geometry_crete",
+        "type": "fieldset",
+        "fields": [
+            "L",
+            "Cd"
+        ]
+    },
+    {
+        "id": "fs_geometry_rampe",
+        "type": "fieldset",
+        "fields": [
+            {
+                "id": "If",
+                "help": "hsl/pente.html"
+            },
+            "d65",
+            "a"
+        ]
+    },
+    {
+        "id": "fs_type",
+        "type": "fieldset",
+        "fields": [
+            {
+                "id": "select_passtype",
+                "type": "select",
+                "property": "rugofondType"
+            },
+            "ZF1",
+            {
+                "id": "ZRR",
+                "allowEmpty": true
+            },
+            {
+                "id": "ZRL",
+                "allowEmpty": true
+            },
+            {
+                "id": "NbT",
+                "allowEmpty": true
+            }
+        ]
+    }
+]
diff --git a/src/app/calculators/rugofondmultiple/en.json b/src/app/calculators/rugofondmultiple/en.json
new file mode 100644
index 000000000..d985c29e9
--- /dev/null
+++ b/src/app/calculators/rugofondmultiple/en.json
@@ -0,0 +1,26 @@
+{
+    "fs_hydraulique": "Hydraulic parameters",
+    "fs_geometry_crete": "Crest geometry",
+    "fs_geometry_rampe": "Ramp geometry",
+    "fs_type": "Ramp type",
+    "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",
+    "a": "Strickler correction factor",
+    "ZF1": "Upstream ramp bottom elevation",
+    "ZRR": "Lower upstream ramp bottom elevation",
+    "ZRL": "Upper upstream ramp bottom elevation",
+    "NbT": "Number of baffles",
+    "L": "Total width of ramp",
+    "Cd": "Discharge coefficient",
+    "d65": "d65",
+
+    "PASSTYPE_0": "Horizontal aprons",
+    "PASSTYPE_1": "Inclined apron"
+}
\ No newline at end of file
diff --git a/src/app/calculators/rugofondmultiple/fr.json b/src/app/calculators/rugofondmultiple/fr.json
new file mode 100644
index 000000000..797c38bb4
--- /dev/null
+++ b/src/app/calculators/rugofondmultiple/fr.json
@@ -0,0 +1,26 @@
+{
+    "fs_hydraulique": "Paramètres hydrauliques",
+    "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",
+    "fs_pass_type": "Type de passe",
+    "macrorugo_container": "Radiers",
+    "fs_macrorugo": "Radier",
+
+    "select_passtype": "Type de passe",
+    "Q": "Débit",
+    "If": "Pente",
+    "a": "Coefficient correcteur du Strickler",
+    "ZF1": "Cote de fond amont rampe",
+    "ZRR": "Cote de fond bas amont rampe",
+    "ZRL": "Cote de fond haut amont rampe",
+    "NbT": "Nombre de ralentisseurs",
+    "L": "Largeur totale de la rampe", 
+    "Cd": "Coefficient de débit",
+    "d65": "d65",
+    
+    "PASSTYPE_0": "Radier horizontal",
+    "PASSTYPE_1": "Radier incliné"
+}
\ No newline at end of file
diff --git a/src/app/config.json b/src/app/config.json
index bf12d9f31..b21ee7df5 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, 38 ]
+            "calculators": [ 11, 17, 27, 37, 38, 39 ]
         },
         {
             "name": "VERIFICATION",
diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index 137f6c6f2..71613dca4 100755
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -518,6 +518,8 @@
     "INFO_PAR_TITRE": "Baffle fishway: setup",
     "INFO_RUGOFOND_TITRE": "Bed roughness fishpasses",
     "INFO_RUGOFOND_TITRE_COURT": "Bed roughness",
+    "INFO_RUGOFONDMULTIPLE_TITRE": "Multiple bed roughness fishpasses",
+    "INFO_RUGOFONDMULTIPLE_TITRE_COURT": "Multiple bed roughness",
     "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 62d4e610b..fd6fbffb0 100755
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -519,6 +519,8 @@
     "INFO_PAR_TITRE": "Passe à ralentisseurs&nbsp;: calage",
     "INFO_RUGOFOND_TITRE": "Passe à rugosité de fond",
     "INFO_RUGOFOND_TITRE_COURT": "Rugofond",
+    "INFO_RUGOFONDMULTIPLE_TITRE": "Passe à rugosité de fond multiple",
+    "INFO_RUGOFONDMULTIPLE_TITRE_COURT": "Rugofond multiple",
     "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