From bad48106b5549cac35954f3924dec09fd6874900 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Tue, 25 Aug 2020 09:40:32 +0200
Subject: [PATCH 1/6] Fix #428 - search engine above calculators list

---
 .../calculator-list.component.html            | 16 ++++++--
 .../calculator-list.component.scss            | 13 +++++++
 .../calculator-list.component.ts              | 39 +++++++++++++++++--
 3 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/src/app/components/calculator-list/calculator-list.component.html b/src/app/components/calculator-list/calculator-list.component.html
index 904c6d994..755776307 100644
--- a/src/app/components/calculator-list/calculator-list.component.html
+++ b/src/app/components/calculator-list/calculator-list.component.html
@@ -1,6 +1,16 @@
+<div id="header-search">
+    <form id="search-modules">
+        <mat-form-field>
+            <mat-icon matPrefix>search</mat-icon>
+            <input type="search" matInput name="searchTerms" [(ngModel)]="searchTerms" (input)="filterItems()"
+                (keydown.escape)="resetSearch()">
+        </mat-form-field>
+    </form>
+</div>
+
 <div class="container" fxLayout="row wrap" fxLayoutAlign="space-evenly stretch" (konami)="onKC()">
 
-    <mat-card class="welcome-card" *ngIf="nbOpenCalculators === 0">
+    <mat-card class="welcome-card" *ngIf="nbOpenCalculators === 0 && searchTerms === ''">
 
         <mat-card-header>
             <mat-card-title>{{ uitextWelcomeTitle }}</mat-card-title>
@@ -16,7 +26,7 @@
 
     </mat-card>
 
-    <mat-card *ngFor="let theme of items" class="compute-nodes-theme">
+    <mat-card *ngFor="let theme of filteredItems" class="compute-nodes-theme">
 
         <mat-card-header>
             <mat-card-title>{{ theme.title }}</mat-card-title>
@@ -44,7 +54,7 @@
 
     </mat-card>
 
-    <mat-card class="examples-card" *ngIf="nbOpenCalculators === 0">
+    <mat-card class="examples-card" *ngIf="nbOpenCalculators === 0 && searchTerms === ''">
 
         <mat-card-header>
             <mat-card-title>{{ uitextExamplesTitle }}</mat-card-title>
diff --git a/src/app/components/calculator-list/calculator-list.component.scss b/src/app/components/calculator-list/calculator-list.component.scss
index 0ad0e0313..665a2b38c 100644
--- a/src/app/components/calculator-list/calculator-list.component.scss
+++ b/src/app/components/calculator-list/calculator-list.component.scss
@@ -60,3 +60,16 @@ a.load-example {
     cursor: pointer;
     padding-top: 1px;
 }
+
+#header-search {
+    width: 100%;
+    text-align: center;
+
+    mat-form-field {
+        width: 280px;
+
+        mat-icon {
+            vertical-align: bottom;
+        }
+    }
+}
diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts
index e3c286fbe..51c7563a5 100644
--- a/src/app/components/calculator-list/calculator-list.component.ts
+++ b/src/app/components/calculator-list/calculator-list.component.ts
@@ -22,8 +22,14 @@ import { ApplicationSetupService } from "../../services/app-setup.service";
     styleUrls: ["./calculator-list.component.scss"]
 })
 export class CalculatorListComponent implements OnInit {
+
     private _items: any[];
 
+    public filteredItems: any[];
+
+    /** what is typed into the search field in the nav bar */
+    public searchTerms: string;
+
     constructor(
         @Inject(forwardRef(() => AppComponent)) private appComponent: AppComponent,
         private router: Router,
@@ -33,6 +39,8 @@ export class CalculatorListComponent implements OnInit {
     ) {
         ServiceFactory.i18nService.addObserver(this);
         ServiceFactory.applicationSetupService.addObserver(this);
+
+        this.searchTerms = "";
     }
 
     /** triggered on init */
@@ -104,6 +112,9 @@ export class CalculatorListComponent implements OnInit {
                 } // else the only remaining calculator was "Structure", the one we don't want
             }
         }
+
+        // at first there is no filter, initialize anyway
+        this.filterItems();
     }
 
     public create(t: CalculatorType) {
@@ -159,8 +170,30 @@ export class CalculatorListComponent implements OnInit {
         return Session.getInstance().getNumberOfNubs();
     }
 
-    public get items() {
-        return this._items;
+    public resetSearch() {
+        this.searchTerms = "";
+        this.filterItems();
+    }
+
+    /**
+     * Returns calculators grouped by themes, filtered by the search
+     * terms entered in the navbar's search field in AppComponent
+     */
+    public filterItems() {
+        if (this.searchTerms === "") {
+            this.filteredItems = this._items;
+        } else {
+            this.filteredItems = JSON.parse(JSON.stringify(this._items));
+            // filter items based on parent component's search field
+            for (const i of this.filteredItems) {
+                i.calculators = i.calculators.filter((c) => {
+                    return (c.label.toLowerCase().includes(this.searchTerms.toLowerCase()));
+                });
+            }
+            this.filteredItems = this.filteredItems.filter((i) => {
+                return (i.calculators.length > 0);
+            });
+        }
     }
 
     /**
@@ -226,7 +259,7 @@ export class CalculatorListComponent implements OnInit {
     }
 
     public onKC() {
-        for (const i of this.items) {
+        for (const i of this._items) {
             const img = [ "assets/images/themes/sp.jpg", "assets/images/themes/autres.jpg" ];
             const idx = Math.floor(Math.random() * 2);
             i.image.path = img[idx];
-- 
GitLab


From 035545b45b57807e30500242bf27955cfef80c4f Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Tue, 25 Aug 2020 15:07:47 +0200
Subject: [PATCH 2/6] Update #428 : better search engine

multiple terms search: all terms must match
added empty descriptions in language files for each module
---
 .../calculator-list.component.html            |  3 ++
 .../calculator-list.component.ts              | 30 ++++++++++++++++++-
 src/app/services/formulaire.service.ts        |  8 +++++
 src/locale/messages.en.json                   | 29 ++++++++++++++++++
 src/locale/messages.fr.json                   | 29 ++++++++++++++++++
 5 files changed, 98 insertions(+), 1 deletion(-)

diff --git a/src/app/components/calculator-list/calculator-list.component.html b/src/app/components/calculator-list/calculator-list.component.html
index 755776307..7a948010e 100644
--- a/src/app/components/calculator-list/calculator-list.component.html
+++ b/src/app/components/calculator-list/calculator-list.component.html
@@ -6,6 +6,9 @@
                 (keydown.escape)="resetSearch()">
         </mat-form-field>
     </form>
+    <div *ngIf="filteredItems.length === 0">
+        {{ uitextSearchNoResult }}
+    </div>
 </div>
 
 <div class="container" fxLayout="row wrap" fxLayoutAlign="space-evenly stretch" (konami)="onKC()">
diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts
index 51c7563a5..1e05c7b1e 100644
--- a/src/app/components/calculator-list/calculator-list.component.ts
+++ b/src/app/components/calculator-list/calculator-list.component.ts
@@ -70,6 +70,7 @@ export class CalculatorListComponent implements OnInit {
                         item.calculators.push({
                             type: calcType,
                             label: ServiceFactory.formulaireService.getLocalisedTitleFromCalculatorType(calcType),
+                            description: ServiceFactory.formulaireService.getLocalisedDescriptionFromCalculatorType(calcType),
                             buttonId: "create-calc-" + calcType
                         });
                         // mark as used
@@ -187,7 +188,7 @@ export class CalculatorListComponent implements OnInit {
             // filter items based on parent component's search field
             for (const i of this.filteredItems) {
                 i.calculators = i.calculators.filter((c) => {
-                    return (c.label.toLowerCase().includes(this.searchTerms.toLowerCase()));
+                    return this.searchMatches(c.label) || this.searchMatches(c.description);
                 });
             }
             this.filteredItems = this.filteredItems.filter((i) => {
@@ -196,6 +197,29 @@ export class CalculatorListComponent implements OnInit {
         }
     }
 
+    /**
+     * Returns true if given str matches this.searchTerms: all terms (separated
+     * by " ") must match, in any order
+     */
+    private searchMatches(str: string): boolean {
+        let ok = false;
+        let terms = this.searchTerms.split(" ");
+        terms = terms.filter(
+            (item, index) => item !== "" && terms.indexOf(item) === index // deduplicate and remove ""
+        );
+        if (terms.length > 1) {
+            // all terms must match
+            ok = terms.every((t) => {
+                return str.toLowerCase().includes(t.toLowerCase());
+            });
+        } else if (terms.length > 0) {
+            ok = (str.toLowerCase().includes(terms[0].toLowerCase()));
+        } else {
+            ok = true;
+        }
+        return ok;
+    }
+
     /**
      * IMPORTANT: keep in sync with app/examples folder contents
      */
@@ -258,6 +282,10 @@ export class CalculatorListComponent implements OnInit {
         return ServiceFactory.i18nService.localizeText("INFO_EXAMPLES_SUBTITLE");
     }
 
+    public get uitextSearchNoResult() {
+        return ServiceFactory.i18nService.localizeText("INFO_SEARCH_NO_RESULT");
+    }
+
     public onKC() {
         for (const i of this._items) {
             const img = [ "assets/images/themes/sp.jpg", "assets/images/themes/autres.jpg" ];
diff --git a/src/app/services/formulaire.service.ts b/src/app/services/formulaire.service.ts
index 89653c92f..d4cdb6ef2 100644
--- a/src/app/services/formulaire.service.ts
+++ b/src/app/services/formulaire.service.ts
@@ -146,6 +146,14 @@ export class FormulaireService extends Observable {
         return this._intlService.localizeText(`INFO_${sCalculator}_TITRE`);
     }
 
+    /**
+     * Retourne la description du type de module de calcul, dans la langue en cours
+     */
+    public getLocalisedDescriptionFromCalculatorType(type: CalculatorType) {
+        const sCalculator: string = CalculatorType[type].toUpperCase();
+        return this._intlService.localizeText(`INFO_${sCalculator}_DESCRIPTION`);
+    }
+
     /**
      * Retourne le titre cour du type de module de calcul, dans la langue en cours
      * (pour les titres d'onglets par défaut)
diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index e5991f549..529148f6d 100644
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -82,19 +82,25 @@
     "INFO_CALCULATOR_SAVE": "Save",
     "INFO_CALCULATOR_USED_BY": "Used by",
     "INFO_CALCULATOR_VALEURS": "Values",
+    "INFO_BIEF_DESCRIPTION": "",
     "INFO_BIEF_TITRE_COURT": "Reach",
     "INFO_BIEF_TITRE": "Up/downstream elevations of a reach",
+    "INFO_CLOISONS_DESCRIPTION": "",
     "INFO_CLOISONS_TITRE_COURT": "Cross walls",
     "INFO_CLOISONS_TITRE": "Fish ladder: Cross walls",
     "INFO_CLOSE_DIALOGUE_DEPENDING_MODULES": "The following modules depend on the one you are closing:",
     "INFO_CLOSE_DIALOGUE_TEXT": "Warning ! Parameters and results of this module will be lost.",
     "INFO_CLOSE_DIALOGUE_TITRE": "Closing calculation module",
     "INFO_CONCENTRATIONBLOCS_TITRE": "Blocks concentration",
+    "INFO_CONCENTRATIONBLOCS_DESCRIPTION": "",
     "INFO_CONCENTRATIONBLOCS_TITRE_COURT": "Blocks conc.",
+    "INFO_CONDUITEDISTRIBUTRICE_DESCRIPTION": "",
     "INFO_CONDUITEDISTRIBUTRICE_TITRE_COURT": "Distrib.",
     "INFO_CONDUITEDISTRIBUTRICE_TITRE": "Distributor pipe",
+    "INFO_COURBEREMOUS_DESCRIPTION": "",
     "INFO_COURBEREMOUS_TITRE_COURT": "Backwater",
     "INFO_COURBEREMOUS_TITRE": "Backwater curves",
+    "INFO_DEVER_DESCRIPTION": "",
     "INFO_DEVER_TITRE_COURT": "Free weir",
     "INFO_DEVER_TITRE": "Free flow weir stage-discharge laws",
     "INFO_DIAGRAM_SOLVEUR_FINDS": "finds",
@@ -206,8 +212,10 @@
     "INFO_FIELDSET_MOVE_DOWN": "Move down",
     "INFO_FIELDSET_MOVE_LEFT": "Move left",
     "INFO_FIELDSET_MOVE_RIGHT": "Move right",
+    "INFO_GRILLE_DESCRIPTION": "",
     "INFO_GRILLE_TITRE_COURT": "Grid",
     "INFO_GRILLE_TITRE": "Loss of charge, water grid",
+    "INFO_JET_DESCRIPTION": "",
     "INFO_JET_TITRE_COURT": "Jet",
     "INFO_JET_TITRE": "Jet trajectory and impact",
     "INFO_WALL_ADDED": "1 wall added",
@@ -221,6 +229,7 @@
     "INFO_JET_TITRE_TRAJECTOIRE": "Trajectory",
     "INFO_JET_TITRE_TRAJECTOIRE_ET_COTE_EAU": "Trajectory and water elevation",
     "INFO_JET_FOND": "Bottom",
+    "INFO_LECHAPTCALMON_DESCRIPTION": "",
     "INFO_LECHAPTCALMON_TITRE_COURT": "Lechapt-C.",
     "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon",
     "INFO_LIB_ABSCISSE": "Abscissa (m)",
@@ -375,16 +384,19 @@
     "INFO_LINKED_VALUE_SECTION": "%s (%s, section)",
     "INFO_LOG_HIDE_DETAILS": "hide details",
     "INFO_LOG_SHOW_DETAILS": "show details",
+    "INFO_MACRORUGO_DESCRIPTION": "",
     "INFO_MACRORUGO_TITRE_COURT": "Rock-ramp",
     "INFO_MACRORUGO_TITRE": "Rock-ramp fishpasses",
     "INFO_MENU_DIAGRAM_TITLE": "Modules diagram",
     "INFO_MACRORUGOCOMPOUND_TITRE": "Compound rock-ramp fishpasses",
+    "INFO_MACRORUGOCOMPOUND_DESCRIPTION": "",
     "INFO_MACRORUGOCOMPOUND_TITRE_COURT": "Compound RR",
     "INFO_MACRORUGOCOMPOUND_LINCL": "Lateral inclination (m/m): ",
     "INFO_ONLY_Q_MAY_VARY": "Only flow may vary",
     "INFO_ONLY_Z1_Q_MAY_VARY": "Only upstream elevation and flow may vary",
     "INFO_Z1_Z2_MUST_BE_DEFINED": "Upstream and downstream elevations must be defined",
     "INFO_PENTE_TITRE": "Slope",
+    "INFO_PENTE_DESCRIPTION": "",
     "INFO_PENTE_TITRE_COURT": "Slope",
     "INFO_MENU_EMPTY_SESSION_TITLE": "New session",
     "INFO_MENU_HELP_TITLE": "Help",
@@ -432,23 +444,31 @@
     "INFO_PAB_LOIDEBIT_VANLEVVILLEMONTE": "Regulated notch (Villemonte)",
     "INFO_PAB_LOIDEBIT_WEIRVILLEMONTE": "Notch (Villemonte)",
     "INFO_PARAMETRES_FIXES": "All parameters must be fixed",
+    "INFO_PAB_DESCRIPTION": "",
     "INFO_PAB_TITRE_COURT": "Fish ladder",
     "INFO_PAB_TITRE": "Fish ladder",
     "INFO_PAB_TITRE_PROFIL": "Fish ladder longitudinal profile",
     "INFO_PAB_TABLE": "Fish ladder geometry",
+    "INFO_PABCHUTE_DESCRIPTION": "",
     "INFO_PABCHUTE_TITRE_COURT": "FL: fall",
     "INFO_PABCHUTE_TITRE": "Fish ladder: fall",
+    "INFO_PABDIMENSIONS_DESCRIPTION": "",
     "INFO_PABDIMENSIONS_TITRE_COURT": "FL: dimensions",
     "INFO_PABDIMENSIONS_TITRE": "Fish ladder: dimensions",
+    "INFO_PABNOMBRE_DESCRIPTION": "",
     "INFO_PABNOMBRE_TITRE_COURT": "FL: number",
     "INFO_PABNOMBRE_TITRE": "Fish ladder: number of falls",
+    "INFO_PABPUISSANCE_DESCRIPTION": "",
     "INFO_PABPUISSANCE_TITRE_COURT": "FL: diss. power",
     "INFO_PABPUISSANCE_TITRE": "Fish ladder: dissipated power",
+    "INFO_PARALLELSTRUCTURE_DESCRIPTION": "",
     "INFO_PARALLELSTRUCTURE_TITRE_COURT": "// structures",
     "INFO_PARALLELSTRUCTURE_TITRE": "Parallel structures",
     "INFO_PAR_TITRE": "Humpback fishway: setup",
+    "INFO_PAR_DESCRIPTION": "",
     "INFO_PAR_TITRE_COURT": "HF: setup",
     "INFO_PARSIMULATION_TITRE": "Humpback fishway: simulation",
+    "INFO_PARSIMULATION_DESCRIPTION": "",
     "INFO_PARSIMULATION_TITRE_COURT": "HF: simulation",
     "INFO_PARAMFIELD_AWAITING_CALCULATION": "Awaiting calculation",
     "INFO_PARAMFIELD_BOUNDARY_CONDITIONS": "Boundary conditions",
@@ -492,6 +512,7 @@
     "INFO_QUICKNAV_INPUT": "input",
     "INFO_QUICKNAV_RESULTS": "results",
     "WARNING_PROBLEMS_ENCOUNTERED": "Problems occurred during calculation (info: %info%, warning: %warning%, error: %error%)",
+    "INFO_REGIMEUNIFORME_DESCRIPTION": "",
     "INFO_REGIMEUNIFORME_TITRE_COURT": "Uniform flow",
     "INFO_REGIMEUNIFORME_TITRE": "Uniform flow calculation",
     "INFO_REMOUS_CALCUL_FLUVIAL": "Downstream boundary condition >= Critical elevation: calculation of subcritical part from downstream",
@@ -511,6 +532,8 @@
     "INFO_REPORT_BUG_SUBJECT": "Issue report",
     "INFO_REQUIRES": "requires",
     "INFO_RESULTS_EXPORT_AS_SPREADSHEET": "Export as XLSX",
+    "INFO_SEARCH_NO_RESULT": "No result",
+    "INFO_SECTIONPARAMETREE_DESCRIPTION": "",
     "INFO_SECTIONPARAMETREE_TITRE_COURT": "Param. section",
     "INFO_SECTIONPARAMETREE_TITRE": "Parametric section",
     "INFO_SELECT_MULTIPLE_AND_OTHER": "other",
@@ -533,8 +556,10 @@
     "INFO_SNACKBAR_RESULTS_INVALIDATED": "Results invalidated for",
     "INFO_SNACKBAR_SETTINGS_SAVED": "Settings saved on this device",
     "INFO_SOLVEUR_TITRE": "Multimodule solver",
+    "INFO_SOLVEUR_DESCRIPTION": "",
     "INFO_SOLVEUR_TITRE_COURT": "Solver",
     "INFO_SPP_TITRE": "Sum and product of powers",
+    "INFO_SPP_DESCRIPTION": "",
     "INFO_SPP_TITRE_COURT": "SPP",
     "INFO_THEME_CREDITS": "Credit",
     "INFO_THEME_DEVALAISON_TITRE": "Downstream migration",
@@ -570,8 +595,10 @@
     "INFO_EXAMPLES_TITLE": "Examples",
     "INFO_EXAMPLES_SUBTITLE": "Load standard examples",
     "INFO_YAXB_TITRE": "Linear function",
+    "INFO_YAXB_DESCRIPTION": "",
     "INFO_YAXB_TITRE_COURT": "Linear f.",
     "INFO_TRIGO_TITRE": "Trigonometric function",
+    "INFO_TRIGO_DESCRIPTION": "",
     "INFO_TRIGO_TITRE_COURT": "Trigo. f.",
     "INFO_VERIF_OK": "Crossing criteria are met for all species",
     "INFO_VERIF_VARYING_OK": "Crossing criteria are met for all species and all pass modalities",
@@ -579,8 +606,10 @@
     "INFO_VERIFICATEUR_CUSTOM_SPECIES": "Custom species: %s",
     "INFO_VERIFICATEUR_SPECIES_GROUP": "Species group",
     "INFO_VERIFICATEUR_TITRE": "Fish pass verification",
+    "INFO_VERIFICATEUR_DESCRIPTION": "",
     "INFO_VERIFICATEUR_TITRE_COURT": "Verification",
     "INFO_ESPECE_TITRE": "Fish species characteristics",
+    "INFO_ESPECE_DESCRIPTION": "",
     "INFO_ESPECE_TITRE_COURT": "Species",
     "WARNING_WARNINGS_ABSTRACT": "%nb% warnings occurred during calculation",
     "ERROR_JET_SUBMERGED_NO_SOLUTION": "There is no solution",
diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json
index cae8286ea..f89b6fa41 100644
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -82,19 +82,25 @@
     "INFO_CALCULATOR_SAVE": "Enregistrer",
     "INFO_CALCULATOR_USED_BY": "Utilisé par",
     "INFO_CALCULATOR_VALEURS": "Valeurs",
+    "INFO_BIEF_DESCRIPTION": "",
     "INFO_BIEF_TITRE_COURT": "Bief",
     "INFO_BIEF_TITRE": "Cotes amont/aval d'un bief",
+    "INFO_CLOISONS_DESCRIPTION": "",
     "INFO_CLOISONS_TITRE_COURT": "Cloisons",
     "INFO_CLOISONS_TITRE": "Passe à bassins&nbsp;: Cloisons",
     "INFO_CLOSE_DIALOGUE_DEPENDING_MODULES": "Les modules suivants dépendent de celui que vous êtes en train de fermer&nbsp;:",
     "INFO_CLOSE_DIALOGUE_TEXT": "Attention&nbsp;! Les paramètres et résultats du module de calcul seront perdus.",
     "INFO_CLOSE_DIALOGUE_TITRE": "Fermeture du module de calcul",
     "INFO_CONCENTRATIONBLOCS_TITRE": "Concentration de blocs",
+    "INFO_CONCENTRATIONBLOCS_DESCRIPTION": "",
     "INFO_CONCENTRATIONBLOCS_TITRE_COURT": "Conc. blocs",
+    "INFO_CONDUITEDISTRIBUTRICE_DESCRIPTION": "",
     "INFO_CONDUITEDISTRIBUTRICE_TITRE_COURT": "Conduite distri.",
     "INFO_CONDUITEDISTRIBUTRICE_TITRE": "Conduite distributrice",
+    "INFO_COURBEREMOUS_DESCRIPTION": "",
     "INFO_COURBEREMOUS_TITRE_COURT": "Remous",
     "INFO_COURBEREMOUS_TITRE": "Courbes de remous",
+    "INFO_DEVER_DESCRIPTION": "",
     "INFO_DEVER_TITRE_COURT": "Déver. dénoyés",
     "INFO_DEVER_TITRE": "Lois de déversoirs dénoyés",
     "INFO_DIAGRAM_SOLVEUR_FINDS": "trouve",
@@ -206,8 +212,10 @@
     "INFO_FIELDSET_MOVE_DOWN": "Déplacer vers le bas",
     "INFO_FIELDSET_MOVE_LEFT": "Déplacer vers la gauche",
     "INFO_FIELDSET_MOVE_RIGHT": "Déplacer vers la droite",
+    "INFO_GRILLE_DESCRIPTION": "",
     "INFO_GRILLE_TITRE_COURT": "Grille",
     "INFO_GRILLE_TITRE": "Perte de charge, grille de prise d'eau",
+    "INFO_JET_DESCRIPTION": "",
     "INFO_JET_TITRE_COURT": "Jet",
     "INFO_JET_TITRE": "Trajectoire et impact d'un jet",
     "INFO_WALL_ADDED": "1 cloison ajoutée",
@@ -221,6 +229,7 @@
     "INFO_JET_TITRE_TRAJECTOIRE": "Trajectoire",
     "INFO_JET_TITRE_TRAJECTOIRE_ET_COTE_EAU": "Trajectoire et cote de l'eau",
     "INFO_JET_FOND": "Fond",
+    "INFO_LECHAPTCALMON_DESCRIPTION": "",
     "INFO_LECHAPTCALMON_TITRE_COURT": "Lechapt-C.",
     "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon",
     "INFO_LIB_ABSCISSE": "Abscisse (m)",
@@ -376,16 +385,19 @@
     "INFO_LINKED_VALUE_SECTION": "%s (%s, section)",
     "INFO_LOG_HIDE_DETAILS": "masquer les details",
     "INFO_LOG_SHOW_DETAILS": "montrer les details",
+    "INFO_MACRORUGO_DESCRIPTION": "",
     "INFO_MACRORUGO_TITRE_COURT": "Macro-rugo.",
     "INFO_MACRORUGO_TITRE": "Passe à macro-rugosités",
     "INFO_MENU_DIAGRAM_TITLE": "Diagramme des modules",
     "INFO_MACRORUGOCOMPOUND_TITRE": "Passe à macro-rugosités complexe",
+    "INFO_MACRORUGOCOMPOUND_DESCRIPTION": "",
     "INFO_MACRORUGOCOMPOUND_TITRE_COURT": "M-Rugo complexe",
     "INFO_MACRORUGOCOMPOUND_LINCL": "Dévers latéral (m/m)&nbsp;:",
     "INFO_ONLY_Q_MAY_VARY": "Seul le débit peut varier",
     "INFO_ONLY_Z1_Q_MAY_VARY": "Seuls la cote amont et le débit peuvent varier",
     "INFO_Z1_Z2_MUST_BE_DEFINED": "Les cotes amont et aval doivent être définies",
     "INFO_PENTE_TITRE": "Pente",
+    "INFO_PENTE_DESCRIPTION": "",
     "INFO_PENTE_TITRE_COURT": "Pente",
     "INFO_MENU_EMPTY_SESSION_TITLE": "Nouvelle session",
     "INFO_MENU_HELP_TITLE": "Aide",
@@ -433,23 +445,31 @@
     "INFO_PAB_LOIDEBIT_VANLEVVILLEMONTE": "Échancrure régulée (Villemonte)",
     "INFO_PAB_LOIDEBIT_WEIRVILLEMONTE": "Échancrure (Villemonte)",
     "INFO_PARAMETRES_FIXES": "Tous les paramètres doivent être fixés",
+    "INFO_PAB_DESCRIPTION": "",
     "INFO_PAB_TITRE_COURT": "PAB",
     "INFO_PAB_TITRE": "Passe à bassins",
     "INFO_PAB_TITRE_PROFIL": "Profil en long de la passe",
     "INFO_PAB_TABLE": "Géométrie de la passe",
+    "INFO_PABCHUTE_DESCRIPTION": "",
     "INFO_PABCHUTE_TITRE_COURT": "PAB&nbsp;: chute",
     "INFO_PABCHUTE_TITRE": "Passe à bassins&nbsp;: chute",
+    "INFO_PABDIMENSIONS_DESCRIPTION": "",
     "INFO_PABDIMENSIONS_TITRE_COURT": "PAB&nbsp;: dimensions",
     "INFO_PABDIMENSIONS_TITRE": "Passe à bassins&nbsp;: dimensions",
+    "INFO_PABNOMBRE_DESCRIPTION": "",
     "INFO_PABNOMBRE_TITRE_COURT": "PAB&nbsp;: nombre",
     "INFO_PABNOMBRE_TITRE": "Passe à bassins&nbsp;: nombre de chutes",
+    "INFO_PABPUISSANCE_DESCRIPTION": "",
     "INFO_PABPUISSANCE_TITRE_COURT": "PAB&nbsp;: puissance",
     "INFO_PABPUISSANCE_TITRE": "Passe à bassins&nbsp;: puissance dissipée",
+    "INFO_PARALLELSTRUCTURE_DESCRIPTION": "",
     "INFO_PARALLELSTRUCTURE_TITRE_COURT": "Ouvrages",
     "INFO_PARALLELSTRUCTURE_TITRE": "Lois d'ouvrages",
     "INFO_PAR_TITRE": "Passe à ralentisseurs&nbsp;: calage",
+    "INFO_PAR_DESCRIPTION": "",
     "INFO_PAR_TITRE_COURT": "PAR&nbsp;: calage",
     "INFO_PARSIMULATION_TITRE": "Passe à ralentisseurs&nbsp;: simulation",
+    "INFO_PARSIMULATION_DESCRIPTION": "",
     "INFO_PARSIMULATION_TITRE_COURT": "PAR&nbsp;: simulation",
     "INFO_PARAMFIELD_AWAITING_CALCULATION": "En attente de calcul",
     "INFO_PARAMFIELD_BOUNDARY_CONDITIONS": "Conditions aux limites",
@@ -493,6 +513,7 @@
     "INFO_QUICKNAV_INPUT": "données",
     "INFO_QUICKNAV_RESULTS": "résultats",
     "WARNING_PROBLEMS_ENCOUNTERED": "Des problèmes sont survenus durant le calcul (info&nbsp;: %info%, avertissement&nbsp;: %warning%, erreur&nbsp;: %error%)",
+    "INFO_REGIMEUNIFORME_DESCRIPTION": "",
     "INFO_REGIMEUNIFORME_TITRE_COURT": "R. uniforme",
     "INFO_REGIMEUNIFORME_TITRE": "Régime uniforme",
     "INFO_REMOUS_CALCUL_FLUVIAL": "Condition limite aval >= Hauteur critique&nbsp;: calcul de la partie fluviale à partir de l'aval",
@@ -512,6 +533,8 @@
     "INFO_REPORT_BUG_SUBJECT": "Rapport d'erreur",
     "INFO_REQUIRES": "dépend de",
     "INFO_RESULTS_EXPORT_AS_SPREADSHEET": "Exporter en XLSX",
+    "INFO_SEARCH_NO_RESULT": "Aucun résultat",
+    "INFO_SECTIONPARAMETREE_DESCRIPTION": "",
     "INFO_SECTIONPARAMETREE_TITRE_COURT": "Sec. param.",
     "INFO_SECTIONPARAMETREE_TITRE": "Section paramétrée",
     "INFO_SELECT_MULTIPLE_AND_OTHER": "autre",
@@ -534,8 +557,10 @@
     "INFO_SNACKBAR_RESULTS_INVALIDATED": "Résultats invalidés pour",
     "INFO_SNACKBAR_SETTINGS_SAVED": "Paramètres enregistrés sur cet appareil",
     "INFO_SOLVEUR_TITRE": "Solveur multimodule",
+    "INFO_SOLVEUR_DESCRIPTION": "",
     "INFO_SOLVEUR_TITRE_COURT": "Solveur",
     "INFO_SPP_TITRE": "Somme et produit de puissances",
+    "INFO_SPP_DESCRIPTION": "",
     "INFO_SPP_TITRE_COURT": "SPP",
     "INFO_THEME_CREDITS": "Crédit",
     "INFO_THEME_DEVALAISON_TITRE": "Dévalaison",
@@ -571,8 +596,10 @@
     "INFO_EXAMPLES_TITLE": "Exemples",
     "INFO_EXAMPLES_SUBTITLE": "Charger des exemples types",
     "INFO_YAXB_TITRE": "Fonction affine",
+    "INFO_YAXB_DESCRIPTION": "",
     "INFO_YAXB_TITRE_COURT": "F. affine",
     "INFO_TRIGO_TITRE": "Fonction trigonométrique",
+    "INFO_TRIGO_DESCRIPTION": "",
     "INFO_TRIGO_TITRE_COURT": "F. trigo.",
     "INFO_VERIF_OK": "Les critères de franchissement sont remplis pour toutes les espèces",
     "INFO_VERIF_VARYING_OK": "Les critères de franchissement sont remplis pour toutes les espèces et toutes les modalités de la passe",
@@ -581,8 +608,10 @@
     "INFO_VERIFICATEUR_CUSTOM_SPECIES": "Espèce personnalisée&nbsp;: %s",
     "INFO_VERIFICATEUR_SPECIES_GROUP": "Groupe d'espèces",
     "INFO_VERIFICATEUR_TITRE": "Vérification d'une passe",
+    "INFO_VERIFICATEUR_DESCRIPTION": "",
     "INFO_VERIFICATEUR_TITRE_COURT": "Vérification",
     "INFO_ESPECE_TITRE": "Caractéristiques d'une espèce",
+    "INFO_ESPECE_DESCRIPTION": "",
     "INFO_ESPECE_TITRE_COURT": "Espèce",
     "WARNING_WARNINGS_ABSTRACT": "%nb% avertissements rencontrés lors du calcul",
     "ERROR_JET_SUBMERGED_NO_SOLUTION": "Il n'y a pas de solution",
-- 
GitLab


From 88daccb93eeced6a82a306323bd89348ea6c4bd9 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Mon, 31 Aug 2020 14:36:36 +0200
Subject: [PATCH 3/6] Update #428

toggle search field by clicking a search icon in the nav bar
use flex for search field
---
 src/app/app.component.html                    |  6 ++++-
 src/app/app.component.scss                    |  9 +++++++
 src/app/app.component.ts                      |  6 ++++-
 src/app/app.module.ts                         |  1 +
 .../calculator-list.component.html            | 26 +++++++++----------
 .../calculator-list.component.scss            |  7 ++---
 .../calculator-list.component.ts              | 23 +++++++++++++---
 src/locale/messages.en.json                   |  1 +
 src/locale/messages.fr.json                   |  1 +
 9 files changed, 59 insertions(+), 21 deletions(-)

diff --git a/src/app/app.component.html b/src/app/app.component.html
index 352b05627..50e2060eb 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -47,10 +47,14 @@
       </div>
     </div>
 
-    <button *ngIf="currentRoute != '/list'" mat-icon-button id="new-calculator" routerLink="/list"
+    <button *ngIf="! currentRoute.includes('/list')" mat-icon-button id="new-calculator" routerLink="/list"
       [title]="uitextSidenavNewCalc" (click)="sidenav.close()">
       <mat-icon>add_box</mat-icon>
     </button>
+    <button *ngIf="currentRoute === '/list'" mat-icon-button id="enable-search" routerLink="/list/search"
+        [title]="uitextSearch" (click)="sidenav.close()">
+        <mat-icon>search</mat-icon>
+    </button>
     <a *ngIf="enableHeaderDoc" target="_blank" id="header-doc" [href]="docIndexPath"
       [title]="uitextSidenavHelp" (click)="sidenav.close()">
       <mat-icon>help</mat-icon>
diff --git a/src/app/app.component.scss b/src/app/app.component.scss
index 38eeabc95..aa8b9e502 100644
--- a/src/app/app.component.scss
+++ b/src/app/app.component.scss
@@ -76,6 +76,15 @@ button:focus {
     }
 }
 
+#enable-search {
+    margin-right: .5em;
+
+    mat-icon {
+        font-weight: bold;
+        font-size: 2em;
+    }
+}
+
 #header-doc {
     color: white;
     transform: scale(1.4);
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 01ddce6dd..6cbd0887f 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -327,6 +327,10 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
         return this.intlService.localizeText("INFO_MENU_SELECT_CALC");
     }
 
+    public get uitextSearch() {
+        return this.intlService.localizeText("INFO_MENU_RECHERCHE_MODULES");
+    }
+
     public getCalculatorLabel(t: CalculatorType) {
         return decodeHtml(this.formulaireService.getLocalisedTitleFromCalculatorType(t));
     }
@@ -405,7 +409,7 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
     }
 
     public get enableHeaderDoc(): boolean {
-        return this.currentRoute === "/list" && this._calculators.length === 0;
+        return this.currentRoute.includes("/list") && this._calculators.length === 0;
     }
 
     public get enableSaveSessionMenu(): boolean {
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index ca149bc7e..8ed21e343 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -117,6 +117,7 @@ import {
 import { ImmediateErrorStateMatcher } from "./formulaire/immediate-error-state-matcher";
 
 const appRoutes: Routes = [
+    { path: "list/search", component: CalculatorListComponent },
     { path: "list", component: CalculatorListComponent },
     { path: "calculator/:uid", component: GenericCalculatorComponent },
     { path: "setup", component: ApplicationSetupComponent },
diff --git a/src/app/components/calculator-list/calculator-list.component.html b/src/app/components/calculator-list/calculator-list.component.html
index 7a948010e..2cdafcee5 100644
--- a/src/app/components/calculator-list/calculator-list.component.html
+++ b/src/app/components/calculator-list/calculator-list.component.html
@@ -1,18 +1,18 @@
-<div id="header-search">
-    <form id="search-modules">
-        <mat-form-field>
-            <mat-icon matPrefix>search</mat-icon>
-            <input type="search" matInput name="searchTerms" [(ngModel)]="searchTerms" (input)="filterItems()"
-                (keydown.escape)="resetSearch()">
-        </mat-form-field>
-    </form>
-    <div *ngIf="filteredItems.length === 0">
-        {{ uitextSearchNoResult }}
-    </div>
-</div>
-
 <div class="container" fxLayout="row wrap" fxLayoutAlign="space-evenly stretch" (konami)="onKC()">
 
+    <div id="header-search" *ngIf="enableSearch">
+        <form id="search-modules">
+            <mat-form-field>
+                <mat-icon matPrefix>search</mat-icon>
+                <input type="search" matInput name="searchTerms" [(ngModel)]="searchTerms" (input)="filterItems()"
+                    (keydown.escape)="resetSearch()" autofocus #searchField>
+            </mat-form-field>
+        </form>
+        <div *ngIf="filteredItems.length === 0">
+            {{ uitextSearchNoResult }}
+        </div>
+    </div>
+
     <mat-card class="welcome-card" *ngIf="nbOpenCalculators === 0 && searchTerms === ''">
 
         <mat-card-header>
diff --git a/src/app/components/calculator-list/calculator-list.component.scss b/src/app/components/calculator-list/calculator-list.component.scss
index 665a2b38c..5be9933b4 100644
--- a/src/app/components/calculator-list/calculator-list.component.scss
+++ b/src/app/components/calculator-list/calculator-list.component.scss
@@ -62,11 +62,12 @@ a.load-example {
 }
 
 #header-search {
-    width: 100%;
-    text-align: center;
+    flex: 0 1 100%;
+    padding: 0 4em;
+    min-width: 420px;
 
     mat-form-field {
-        width: 280px;
+        width: 100%;
 
         mat-icon {
             vertical-align: bottom;
diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts
index 1e05c7b1e..8bb4597b1 100644
--- a/src/app/components/calculator-list/calculator-list.component.ts
+++ b/src/app/components/calculator-list/calculator-list.component.ts
@@ -1,5 +1,5 @@
-import { Component, OnInit, Inject, forwardRef } from "@angular/core";
-import { Router } from "@angular/router";
+import { Component, OnInit, Inject, forwardRef, ElementRef, ViewChild } from "@angular/core";
+import { Router, ActivatedRoute } from "@angular/router";
 
 import { CalculatorType, EnumEx, Session } from "jalhyd";
 
@@ -27,20 +27,37 @@ export class CalculatorListComponent implements OnInit {
 
     public filteredItems: any[];
 
+    /** enable search only if /list/search route was called */
+    private enableSearch = false;
+
     /** what is typed into the search field in the nav bar */
     public searchTerms: string;
 
+    @ViewChild("searchField")
+    private searchField: ElementRef;
+
     constructor(
         @Inject(forwardRef(() => AppComponent)) private appComponent: AppComponent,
         private router: Router,
         private httpService: HttpService,
         private intlService: I18nService,
-        private appSetupService: ApplicationSetupService
+        private appSetupService: ApplicationSetupService,
+        public route: ActivatedRoute
     ) {
         ServiceFactory.i18nService.addObserver(this);
         ServiceFactory.applicationSetupService.addObserver(this);
 
         this.searchTerms = "";
+
+        this.route.url.subscribe(params => {
+            if (params.length > 1 && params[1].path === "search") {
+                this.enableSearch = true;
+                // focus the new Field
+                setTimeout(() => {
+                    this.searchField.nativeElement.focus();
+                }, 0);
+            }
+        });
     }
 
     /** triggered on init */
diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index 529148f6d..9d8b2407b 100644
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -402,6 +402,7 @@
     "INFO_MENU_HELP_TITLE": "Help",
     "INFO_MENU_LOAD_SESSION_TITLE": "Load session",
     "INFO_MENU_NOUVELLE_CALC": "New calculation module",
+    "INFO_MENU_RECHERCHE_MODULES": "Search modules",
     "INFO_MENU_REPORT_BUG": "Report an issue",
     "INFO_MENU_RESTORE_DEFAULT_SETTINGS": "Default settings",
     "INFO_MENU_SAVE_SESSION_TITLE": "Save session",
diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json
index f89b6fa41..87d77cd15 100644
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -403,6 +403,7 @@
     "INFO_MENU_HELP_TITLE": "Aide",
     "INFO_MENU_LOAD_SESSION_TITLE": "Charger une session",
     "INFO_MENU_NOUVELLE_CALC": "Nouveau module de calcul",
+    "INFO_MENU_RECHERCHE_MODULES": "Rechercher des modules",
     "INFO_MENU_REPORT_BUG": "Signaler un problème",
     "INFO_MENU_RESTORE_DEFAULT_SETTINGS": "Paramètres par défaut",
     "INFO_MENU_SAVE_SESSION_TITLE": "Enregistrer la session",
-- 
GitLab


From 65e1d79c546ed6175f703f22137cfc69d992dd28 Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Mon, 31 Aug 2020 14:48:56 +0200
Subject: [PATCH 4/6] Fix visibility in component

---
 src/app/components/calculator-list/calculator-list.component.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts
index 8bb4597b1..ed2710834 100644
--- a/src/app/components/calculator-list/calculator-list.component.ts
+++ b/src/app/components/calculator-list/calculator-list.component.ts
@@ -28,7 +28,7 @@ export class CalculatorListComponent implements OnInit {
     public filteredItems: any[];
 
     /** enable search only if /list/search route was called */
-    private enableSearch = false;
+    public enableSearch = false;
 
     /** what is typed into the search field in the nav bar */
     public searchTerms: string;
-- 
GitLab


From 44044b58765d15290d18022bcfe154b17b23f8eb Mon Sep 17 00:00:00 2001
From: Dorchies David <david.dorchies@irstea.fr>
Date: Wed, 2 Sep 2020 14:50:09 +0200
Subject: [PATCH 5/6] feat: Add module description + Corrections in English
 documentation

Refs #428
---
 docs/en/calculators/hsl/courbe_remous.md      |  4 +-
 .../hyd_en_charge/lechapt-calmon.md           |  4 +-
 docs/en/calculators/par/calage.md             |  2 +-
 docs/en/calculators/par/formules.md           |  2 +-
 docs/en/calculators/par/simulation.md         |  2 +-
 docs/en/calculators/verif/par.md              |  8 +--
 docs/en/calculators/verif/principe.md         |  2 +-
 mkdocs-en.yml                                 |  4 +-
 src/app/calculators/espece/en.json            |  2 +-
 src/locale/messages.en.json                   | 62 +++++++++----------
 src/locale/messages.fr.json                   | 54 ++++++++--------
 11 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/docs/en/calculators/hsl/courbe_remous.md b/docs/en/calculators/hsl/courbe_remous.md
index 774c3bb63..1c14104f9 100644
--- a/docs/en/calculators/hsl/courbe_remous.md
+++ b/docs/en/calculators/hsl/courbe_remous.md
@@ -20,8 +20,8 @@ The integration of the equation can be done by one of the following methods: [Ru
 
 Depending on the flow regime, the calculation can be carried out:
 
- * from downstream to upstream for the river regime with definition of a downstream boundary condition.
- * from upstream to downstream for torrential regime with definition of an upstream boundary condition
+ * from downstream to upstream for subcritical flow with definition of a downstream boundary condition.
+ * from upstream to downstream for supercritical flow with definition of an upstream boundary condition
 
 If we take the example of a rectangular channel, [the proposed scilab code example for solving an ordinary differential equation](../../methodes_numeriques/euler_explicite.md) is amended as follows:
 
diff --git a/docs/en/calculators/hyd_en_charge/lechapt-calmon.md b/docs/en/calculators/hyd_en_charge/lechapt-calmon.md
index 4f42f1ab6..9cbdc07a2 100644
--- a/docs/en/calculators/hyd_en_charge/lechapt-calmon.md
+++ b/docs/en/calculators/hyd_en_charge/lechapt-calmon.md
@@ -1,6 +1,6 @@
 # Lechapt and Calmon
 
-Loss of charge in a circular pipe: Lechapt and Calmon abacus
+Headloss in a circular pipe: Lechapt and Calmon abacus
 
 Lechapt and Calmon formula is based on adjustements of [Cyril Frank Colebrook formula](https://en.wikipedia.org/wiki/Darcy_friction_factor_formulae#Colebrook%E2%80%93White_equation):
 
@@ -8,7 +8,7 @@ $$J=L.Q^M.D^{-N}$$
 
 With:
 
-- \(J\): loss of charge in mm/m or m/km;
+- \(J\): headloss in mm/m or m/km;
 - \(Q\): flow in L/s;
 - \(D\): pipe diameter in m;
 - \(L\), \(M\) and \(N\) coefficients depending on roughness {&#x3F5;}.
diff --git a/docs/en/calculators/par/calage.md b/docs/en/calculators/par/calage.md
index ed209ce6e..470f20091 100644
--- a/docs/en/calculators/par/calage.md
+++ b/docs/en/calculators/par/calage.md
@@ -1,4 +1,4 @@
-# Baffle fishway (or humpback fishway) setup
+# Baffle fishway (or baffle fishway) setup
 
 This module allows to dimension a baffle fishway. Supported baffle fishway types are:
 
diff --git a/docs/en/calculators/par/formules.md b/docs/en/calculators/par/formules.md
index 43a97f534..fd947ba79 100644
--- a/docs/en/calculators/par/formules.md
+++ b/docs/en/calculators/par/formules.md
@@ -1,4 +1,4 @@
-# Baffle fishways (or humpback fishways) calculation formulas
+# Baffle fishways (or baffle fishways) calculation formulas
 
 For calculation of:
 
diff --git a/docs/en/calculators/par/simulation.md b/docs/en/calculators/par/simulation.md
index 37708677a..2bf0901af 100644
--- a/docs/en/calculators/par/simulation.md
+++ b/docs/en/calculators/par/simulation.md
@@ -1,4 +1,4 @@
-# Baffle fishway (or humpback fishway) simulation
+# Baffle fishway (or baffle fishway) simulation
 
 This module allows to calculate different hydraulic conditions on a baffle fishway with a known geometry. This geometry may come from topographical measurements or from the [result of a baffle fishway setup](calage.md).
 
diff --git a/docs/en/calculators/verif/par.md b/docs/en/calculators/verif/par.md
index 7a2462687..9340ef55d 100644
--- a/docs/en/calculators/verif/par.md
+++ b/docs/en/calculators/verif/par.md
@@ -1,12 +1,12 @@
-# Crossability verification: Humpback fishways (simulation)
+# Crossability verification: Baffle fishways (simulation)
 
 ## Criteria
 
 ### Incompatible and discouraged species
 
-Species groups 3a, 3b and 7b are discouraged for crossing humpback fishways. This leads to a warning, but does not make the pass not crossable.
+Species groups 3a, 3b and 7b are discouraged for crossing baffle fishways. This leads to a warning, but does not make the pass not crossable.
 
-Species groups 8a, 8b, 8c, 8d, 9a, 9b and 10 are unable to cross humpback fishways.
+Species groups 8a, 8b, 8c, 8d, 9a, 9b and 10 are unable to cross baffle fishways.
 
 ### Minimum water level \(YMinPB\) and \(YMinSB\), in m
 
@@ -33,4 +33,4 @@ From _"Informations sur la Continuité Écologique - ICE, Onema 2014"_.
 | 7a | Common barbel (Barbus barbus)<br>Chub (Squalius cephalus)<br>Nase (Chondrostoma nasus) | 0.25 | 0.15 |
 | 7b | River lamprey (Lampetra fluviatilis) | 0.1 | 0.1 |
 
-Table: List of predefined values for crossing criteria of a humpback fishway
+Table: List of predefined values for crossing criteria of a baffle fishway
diff --git a/docs/en/calculators/verif/principe.md b/docs/en/calculators/verif/principe.md
index 6313c5cce..a26143330 100644
--- a/docs/en/calculators/verif/principe.md
+++ b/docs/en/calculators/verif/principe.md
@@ -3,7 +3,7 @@
 This module allows to verify the capacity of different fish species to cross the following types of fish passes:
 
 - [fish ladders](pab.md)
-- [humpback fishways](par.md)
+- [baffle fishways](par.md)
 - [rock-ramp fishpasses](macrorugo.md)
 
 ## Principle
diff --git a/mkdocs-en.yml b/mkdocs-en.yml
index 0278e599d..dc49d2d43 100644
--- a/mkdocs-en.yml
+++ b/mkdocs-en.yml
@@ -67,7 +67,7 @@ nav:
         - calculators/pam/macrorugo_theorie.md
         - calculators/pam/macrorugo_complexe.md
         - calculators/pam/concentration.md
-    - Humpback fishways:
+    - Baffle fishways:
         - Baffle fishway setup: calculators/par/calage.md
         - Baffle fishway simulation: calculators/par/simulation.md
         - Baffle fishways formulas: calculators/par/formules.md
@@ -78,7 +78,7 @@ nav:
     - Crossability verification:
         - Principle: calculators/verif/principe.md
         - Fish ladders: calculators/verif/pab.md
-        - Humpback fishways: calculators/verif/par.md
+        - Baffle fishways: calculators/verif/par.md
         - Rock-ramp fishpasses: calculators/verif/macrorugo.md
         - Predefined species: calculators/verif/especes_predefinies.md
     - Downstream migration:
diff --git a/src/app/calculators/espece/en.json b/src/app/calculators/espece/en.json
index ec2bfea67..f88069bf4 100644
--- a/src/app/calculators/espece/en.json
+++ b/src/app/calculators/espece/en.json
@@ -3,7 +3,7 @@
     "fs_param_pab_s": "Fish ladders, surface jets or orifices",
     "fs_param_pab_p": "Fish ladders, diving jets",
     "fs_param_pam": "Rock-ramp fishpasses",
-    "fs_param_par": "Humpback fishways",
+    "fs_param_par": "Baffle fishways",
 
     "select_divingjetsupported": "Diving jets support",
 
diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json
index 9d8b2407b..073d7138d 100644
--- a/src/locale/messages.en.json
+++ b/src/locale/messages.en.json
@@ -82,25 +82,25 @@
     "INFO_CALCULATOR_SAVE": "Save",
     "INFO_CALCULATOR_USED_BY": "Used by",
     "INFO_CALCULATOR_VALEURS": "Values",
-    "INFO_BIEF_DESCRIPTION": "",
+    "INFO_BIEF_DESCRIPTION": "open channel canal flow backwater curve",
     "INFO_BIEF_TITRE_COURT": "Reach",
     "INFO_BIEF_TITRE": "Up/downstream elevations of a reach",
-    "INFO_CLOISONS_DESCRIPTION": "",
+    "INFO_CLOISONS_DESCRIPTION": "step slot weir",
     "INFO_CLOISONS_TITRE_COURT": "Cross walls",
     "INFO_CLOISONS_TITRE": "Fish ladder: Cross walls",
     "INFO_CLOSE_DIALOGUE_DEPENDING_MODULES": "The following modules depend on the one you are closing:",
     "INFO_CLOSE_DIALOGUE_TEXT": "Warning ! Parameters and results of this module will be lost.",
     "INFO_CLOSE_DIALOGUE_TITRE": "Closing calculation module",
     "INFO_CONCENTRATIONBLOCS_TITRE": "Blocks concentration",
-    "INFO_CONCENTRATIONBLOCS_DESCRIPTION": "",
+    "INFO_CONCENTRATIONBLOCS_DESCRIPTION": "rock ramp fish pass",
     "INFO_CONCENTRATIONBLOCS_TITRE_COURT": "Blocks conc.",
-    "INFO_CONDUITEDISTRIBUTRICE_DESCRIPTION": "",
+    "INFO_CONDUITEDISTRIBUTRICE_DESCRIPTION": "flow Blasius",
     "INFO_CONDUITEDISTRIBUTRICE_TITRE_COURT": "Distrib.",
     "INFO_CONDUITEDISTRIBUTRICE_TITRE": "Distributor pipe",
-    "INFO_COURBEREMOUS_DESCRIPTION": "",
+    "INFO_COURBEREMOUS_DESCRIPTION": "open channel regime flow subcritical supercritical hydraulic jump",
     "INFO_COURBEREMOUS_TITRE_COURT": "Backwater",
     "INFO_COURBEREMOUS_TITRE": "Backwater curves",
-    "INFO_DEVER_DESCRIPTION": "",
+    "INFO_DEVER_DESCRIPTION": "slot threshold approach speed head hydraulic",
     "INFO_DEVER_TITRE_COURT": "Free weir",
     "INFO_DEVER_TITRE": "Free flow weir stage-discharge laws",
     "INFO_DIAGRAM_SOLVEUR_FINDS": "finds",
@@ -212,10 +212,10 @@
     "INFO_FIELDSET_MOVE_DOWN": "Move down",
     "INFO_FIELDSET_MOVE_LEFT": "Move left",
     "INFO_FIELDSET_MOVE_RIGHT": "Move right",
-    "INFO_GRILLE_DESCRIPTION": "",
+    "INFO_GRILLE_DESCRIPTION": "downstream migration trashrack conventional oriented inclined",
     "INFO_GRILLE_TITRE_COURT": "Grid",
     "INFO_GRILLE_TITRE": "Loss of charge, water grid",
-    "INFO_JET_DESCRIPTION": "",
+    "INFO_JET_DESCRIPTION": "downstream migration ichthyocompatible water intakes for small hydroelectric power plants ballistics",
     "INFO_JET_TITRE_COURT": "Jet",
     "INFO_JET_TITRE": "Jet trajectory and impact",
     "INFO_WALL_ADDED": "1 wall added",
@@ -229,7 +229,7 @@
     "INFO_JET_TITRE_TRAJECTOIRE": "Trajectory",
     "INFO_JET_TITRE_TRAJECTOIRE_ET_COTE_EAU": "Trajectory and water elevation",
     "INFO_JET_FOND": "Bottom",
-    "INFO_LECHAPTCALMON_DESCRIPTION": "",
+    "INFO_LECHAPTCALMON_DESCRIPTION": "pipe flow circular headloss",
     "INFO_LECHAPTCALMON_TITRE_COURT": "Lechapt-C.",
     "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon",
     "INFO_LIB_ABSCISSE": "Abscissa (m)",
@@ -384,19 +384,19 @@
     "INFO_LINKED_VALUE_SECTION": "%s (%s, section)",
     "INFO_LOG_HIDE_DETAILS": "hide details",
     "INFO_LOG_SHOW_DETAILS": "show details",
-    "INFO_MACRORUGO_DESCRIPTION": "",
+    "INFO_MACRORUGO_DESCRIPTION": "natural block",
     "INFO_MACRORUGO_TITRE_COURT": "Rock-ramp",
     "INFO_MACRORUGO_TITRE": "Rock-ramp fishpasses",
     "INFO_MENU_DIAGRAM_TITLE": "Modules diagram",
     "INFO_MACRORUGOCOMPOUND_TITRE": "Compound rock-ramp fishpasses",
-    "INFO_MACRORUGOCOMPOUND_DESCRIPTION": "",
+    "INFO_MACRORUGOCOMPOUND_DESCRIPTION": "natural multiple inclined block aprons",
     "INFO_MACRORUGOCOMPOUND_TITRE_COURT": "Compound RR",
     "INFO_MACRORUGOCOMPOUND_LINCL": "Lateral inclination (m/m): ",
     "INFO_ONLY_Q_MAY_VARY": "Only flow may vary",
     "INFO_ONLY_Z1_Q_MAY_VARY": "Only upstream elevation and flow may vary",
     "INFO_Z1_Z2_MUST_BE_DEFINED": "Upstream and downstream elevations must be defined",
     "INFO_PENTE_TITRE": "Slope",
-    "INFO_PENTE_DESCRIPTION": "",
+    "INFO_PENTE_DESCRIPTION": "open-channel flow drop",
     "INFO_PENTE_TITRE_COURT": "Slope",
     "INFO_MENU_EMPTY_SESSION_TITLE": "New session",
     "INFO_MENU_HELP_TITLE": "Help",
@@ -445,31 +445,31 @@
     "INFO_PAB_LOIDEBIT_VANLEVVILLEMONTE": "Regulated notch (Villemonte)",
     "INFO_PAB_LOIDEBIT_WEIRVILLEMONTE": "Notch (Villemonte)",
     "INFO_PARAMETRES_FIXES": "All parameters must be fixed",
-    "INFO_PAB_DESCRIPTION": "",
+    "INFO_PAB_DESCRIPTION": "basins",
     "INFO_PAB_TITRE_COURT": "Fish ladder",
     "INFO_PAB_TITRE": "Fish ladder",
     "INFO_PAB_TITRE_PROFIL": "Fish ladder longitudinal profile",
     "INFO_PAB_TABLE": "Fish ladder geometry",
-    "INFO_PABCHUTE_DESCRIPTION": "",
+    "INFO_PABCHUTE_DESCRIPTION": "basins",
     "INFO_PABCHUTE_TITRE_COURT": "FL: fall",
     "INFO_PABCHUTE_TITRE": "Fish ladder: fall",
-    "INFO_PABDIMENSIONS_DESCRIPTION": "",
+    "INFO_PABDIMENSIONS_DESCRIPTION": "basins",
     "INFO_PABDIMENSIONS_TITRE_COURT": "FL: dimensions",
     "INFO_PABDIMENSIONS_TITRE": "Fish ladder: dimensions",
-    "INFO_PABNOMBRE_DESCRIPTION": "",
+    "INFO_PABNOMBRE_DESCRIPTION": "basins",
     "INFO_PABNOMBRE_TITRE_COURT": "FL: number",
     "INFO_PABNOMBRE_TITRE": "Fish ladder: number of falls",
-    "INFO_PABPUISSANCE_DESCRIPTION": "",
+    "INFO_PABPUISSANCE_DESCRIPTION": "basins",
     "INFO_PABPUISSANCE_TITRE_COURT": "FL: diss. power",
     "INFO_PABPUISSANCE_TITRE": "Fish ladder: dissipated power",
-    "INFO_PARALLELSTRUCTURE_DESCRIPTION": "",
+    "INFO_PARALLELSTRUCTURE_DESCRIPTION": "orifice gate weir threshold free flow submerged discharge stage-discharge",
     "INFO_PARALLELSTRUCTURE_TITRE_COURT": "// structures",
     "INFO_PARALLELSTRUCTURE_TITRE": "Parallel structures",
-    "INFO_PAR_TITRE": "Humpback fishway: setup",
-    "INFO_PAR_DESCRIPTION": "",
+    "INFO_PAR_TITRE": "Baffle fishway: setup",
+    "INFO_PAR_DESCRIPTION": "planes Denil Fatou superactive mixte chevrons canoe",
     "INFO_PAR_TITRE_COURT": "HF: setup",
-    "INFO_PARSIMULATION_TITRE": "Humpback fishway: simulation",
-    "INFO_PARSIMULATION_DESCRIPTION": "",
+    "INFO_PARSIMULATION_TITRE": "Baffle fishway: simulation",
+    "INFO_PARSIMULATION_DESCRIPTION": "planes Denil Fatou superactive mixte chevrons canoe",
     "INFO_PARSIMULATION_TITRE_COURT": "HF: simulation",
     "INFO_PARAMFIELD_AWAITING_CALCULATION": "Awaiting calculation",
     "INFO_PARAMFIELD_BOUNDARY_CONDITIONS": "Boundary conditions",
@@ -513,7 +513,7 @@
     "INFO_QUICKNAV_INPUT": "input",
     "INFO_QUICKNAV_RESULTS": "results",
     "WARNING_PROBLEMS_ENCOUNTERED": "Problems occurred during calculation (info: %info%, warning: %warning%, error: %error%)",
-    "INFO_REGIMEUNIFORME_DESCRIPTION": "",
+    "INFO_REGIMEUNIFORME_DESCRIPTION": "open-channel flow normal depth",
     "INFO_REGIMEUNIFORME_TITRE_COURT": "Uniform flow",
     "INFO_REGIMEUNIFORME_TITRE": "Uniform flow calculation",
     "INFO_REMOUS_CALCUL_FLUVIAL": "Downstream boundary condition >= Critical elevation: calculation of subcritical part from downstream",
@@ -534,7 +534,7 @@
     "INFO_REQUIRES": "requires",
     "INFO_RESULTS_EXPORT_AS_SPREADSHEET": "Export as XLSX",
     "INFO_SEARCH_NO_RESULT": "No result",
-    "INFO_SECTIONPARAMETREE_DESCRIPTION": "",
+    "INFO_SECTIONPARAMETREE_DESCRIPTION": "open-channel canal rectangular circular trapezoidal depth head normal critical conjugate corresponding subcritical supercritical Froude",
     "INFO_SECTIONPARAMETREE_TITRE_COURT": "Param. section",
     "INFO_SECTIONPARAMETREE_TITRE": "Parametric section",
     "INFO_SELECT_MULTIPLE_AND_OTHER": "other",
@@ -560,7 +560,7 @@
     "INFO_SOLVEUR_DESCRIPTION": "",
     "INFO_SOLVEUR_TITRE_COURT": "Solver",
     "INFO_SPP_TITRE": "Sum and product of powers",
-    "INFO_SPP_DESCRIPTION": "",
+    "INFO_SPP_DESCRIPTION": "plus times",
     "INFO_SPP_TITRE_COURT": "SPP",
     "INFO_THEME_CREDITS": "Credit",
     "INFO_THEME_DEVALAISON_TITRE": "Downstream migration",
@@ -577,8 +577,8 @@
     "INFO_THEME_OUTILS_MATHEMATIQUES_DESCRIPTION": "Miscellaneous generic mathematical tools",
     "INFO_THEME_PASSE_A_BASSIN_DESCRIPTION": "Tools for sizing a fish pass made with pools also called fish steps",
     "INFO_THEME_PASSE_A_BASSIN_TITRE": "Fish ladder",
-    "INFO_THEME_PASSE_A_RALENTISSEURS_TITRE": "Humpback fishway",
-    "INFO_THEME_PASSE_A_RALENTISSEURS_DESCRIPTION": "Humpback fishway",
+    "INFO_THEME_PASSE_A_RALENTISSEURS_TITRE": "Baffle fishway",
+    "INFO_THEME_PASSE_A_RALENTISSEURS_DESCRIPTION": "Baffle fishway",
     "INFO_THEME_PASSE_NATURELLE_DESCRIPTION": "Tools for sizing a natural fish pass also called macroroughness pass or rock-ramp fish pass",
     "INFO_THEME_PASSE_NATURELLE_TITRE": "Natural pass",
     "INFO_THEME_VERIFICATION_DESCRIPTION": "Tools for verifying fish passes crossing capabilities by different fish species",
@@ -596,10 +596,10 @@
     "INFO_EXAMPLES_TITLE": "Examples",
     "INFO_EXAMPLES_SUBTITLE": "Load standard examples",
     "INFO_YAXB_TITRE": "Linear function",
-    "INFO_YAXB_DESCRIPTION": "",
+    "INFO_YAXB_DESCRIPTION": "addition plus subtraction minus multiplication division",
     "INFO_YAXB_TITRE_COURT": "Linear f.",
     "INFO_TRIGO_TITRE": "Trigonometric function",
-    "INFO_TRIGO_DESCRIPTION": "",
+    "INFO_TRIGO_DESCRIPTION": "cosinus sinus tangent arc",
     "INFO_TRIGO_TITRE_COURT": "Trigo. f.",
     "INFO_VERIF_OK": "Crossing criteria are met for all species",
     "INFO_VERIF_VARYING_OK": "Crossing criteria are met for all species and all pass modalities",
@@ -607,10 +607,10 @@
     "INFO_VERIFICATEUR_CUSTOM_SPECIES": "Custom species: %s",
     "INFO_VERIFICATEUR_SPECIES_GROUP": "Species group",
     "INFO_VERIFICATEUR_TITRE": "Fish pass verification",
-    "INFO_VERIFICATEUR_DESCRIPTION": "",
+    "INFO_VERIFICATEUR_DESCRIPTION": "ichtyocompatible",
     "INFO_VERIFICATEUR_TITRE_COURT": "Verification",
     "INFO_ESPECE_TITRE": "Fish species characteristics",
-    "INFO_ESPECE_DESCRIPTION": "",
+    "INFO_ESPECE_DESCRIPTION": "ichtyocompatible",
     "INFO_ESPECE_TITRE_COURT": "Species",
     "WARNING_WARNINGS_ABSTRACT": "%nb% warnings occurred during calculation",
     "ERROR_JET_SUBMERGED_NO_SOLUTION": "There is no solution",
diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json
index 87d77cd15..58d8ec44e 100644
--- a/src/locale/messages.fr.json
+++ b/src/locale/messages.fr.json
@@ -82,25 +82,25 @@
     "INFO_CALCULATOR_SAVE": "Enregistrer",
     "INFO_CALCULATOR_USED_BY": "Utilisé par",
     "INFO_CALCULATOR_VALEURS": "Valeurs",
-    "INFO_BIEF_DESCRIPTION": "",
+    "INFO_BIEF_DESCRIPTION": "Hydraulique à surface libre courbe de remous amont aval canal chenal régime écoulement fluvial torrentiel",
     "INFO_BIEF_TITRE_COURT": "Bief",
     "INFO_BIEF_TITRE": "Cotes amont/aval d'un bief",
-    "INFO_CLOISONS_DESCRIPTION": "",
+    "INFO_CLOISONS_DESCRIPTION": "poisson échelle échancrure fente",
     "INFO_CLOISONS_TITRE_COURT": "Cloisons",
     "INFO_CLOISONS_TITRE": "Passe à bassins&nbsp;: Cloisons",
     "INFO_CLOSE_DIALOGUE_DEPENDING_MODULES": "Les modules suivants dépendent de celui que vous êtes en train de fermer&nbsp;:",
     "INFO_CLOSE_DIALOGUE_TEXT": "Attention&nbsp;! Les paramètres et résultats du module de calcul seront perdus.",
     "INFO_CLOSE_DIALOGUE_TITRE": "Fermeture du module de calcul",
     "INFO_CONCENTRATIONBLOCS_TITRE": "Concentration de blocs",
-    "INFO_CONCENTRATIONBLOCS_DESCRIPTION": "",
+    "INFO_CONCENTRATIONBLOCS_DESCRIPTION": "passe macro rugosités naturelle poisson",
     "INFO_CONCENTRATIONBLOCS_TITRE_COURT": "Conc. blocs",
-    "INFO_CONDUITEDISTRIBUTRICE_DESCRIPTION": "",
+    "INFO_CONDUITEDISTRIBUTRICE_DESCRIPTION": "hydraulique en charge Blasius",
     "INFO_CONDUITEDISTRIBUTRICE_TITRE_COURT": "Conduite distri.",
     "INFO_CONDUITEDISTRIBUTRICE_TITRE": "Conduite distributrice",
-    "INFO_COURBEREMOUS_DESCRIPTION": "",
+    "INFO_COURBEREMOUS_DESCRIPTION": "hydraulique à surface libre régime écoulement fluvial torrentiel ressaut",
     "INFO_COURBEREMOUS_TITRE_COURT": "Remous",
     "INFO_COURBEREMOUS_TITRE": "Courbes de remous",
-    "INFO_DEVER_DESCRIPTION": "",
+    "INFO_DEVER_DESCRIPTION": "seuil vitesse d'approche charge hydraulique",
     "INFO_DEVER_TITRE_COURT": "Déver. dénoyés",
     "INFO_DEVER_TITRE": "Lois de déversoirs dénoyés",
     "INFO_DIAGRAM_SOLVEUR_FINDS": "trouve",
@@ -212,10 +212,10 @@
     "INFO_FIELDSET_MOVE_DOWN": "Déplacer vers le bas",
     "INFO_FIELDSET_MOVE_LEFT": "Déplacer vers la gauche",
     "INFO_FIELDSET_MOVE_RIGHT": "Déplacer vers la droite",
-    "INFO_GRILLE_DESCRIPTION": "",
+    "INFO_GRILLE_DESCRIPTION": "dévalaison plan orientée inclinée conventionnelle centrale hydroélectrique",
     "INFO_GRILLE_TITRE_COURT": "Grille",
     "INFO_GRILLE_TITRE": "Perte de charge, grille de prise d'eau",
-    "INFO_JET_DESCRIPTION": "",
+    "INFO_JET_DESCRIPTION": "dévalaison prises d'eau icthyocompatibles centrale hydroélectrique balistique",
     "INFO_JET_TITRE_COURT": "Jet",
     "INFO_JET_TITRE": "Trajectoire et impact d'un jet",
     "INFO_WALL_ADDED": "1 cloison ajoutée",
@@ -229,7 +229,7 @@
     "INFO_JET_TITRE_TRAJECTOIRE": "Trajectoire",
     "INFO_JET_TITRE_TRAJECTOIRE_ET_COTE_EAU": "Trajectoire et cote de l'eau",
     "INFO_JET_FOND": "Fond",
-    "INFO_LECHAPTCALMON_DESCRIPTION": "",
+    "INFO_LECHAPTCALMON_DESCRIPTION": "Hydraulique en charge conduite colebrook",
     "INFO_LECHAPTCALMON_TITRE_COURT": "Lechapt-C.",
     "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon",
     "INFO_LIB_ABSCISSE": "Abscisse (m)",
@@ -385,19 +385,19 @@
     "INFO_LINKED_VALUE_SECTION": "%s (%s, section)",
     "INFO_LOG_HIDE_DETAILS": "masquer les details",
     "INFO_LOG_SHOW_DETAILS": "montrer les details",
-    "INFO_MACRORUGO_DESCRIPTION": "",
+    "INFO_MACRORUGO_DESCRIPTION": "poisson naturelle bloc",
     "INFO_MACRORUGO_TITRE_COURT": "Macro-rugo.",
     "INFO_MACRORUGO_TITRE": "Passe à macro-rugosités",
     "INFO_MENU_DIAGRAM_TITLE": "Diagramme des modules",
     "INFO_MACRORUGOCOMPOUND_TITRE": "Passe à macro-rugosités complexe",
-    "INFO_MACRORUGOCOMPOUND_DESCRIPTION": "",
+    "INFO_MACRORUGOCOMPOUND_DESCRIPTION": "poisson naturelle bloc radiers multiples incliné",
     "INFO_MACRORUGOCOMPOUND_TITRE_COURT": "M-Rugo complexe",
     "INFO_MACRORUGOCOMPOUND_LINCL": "Dévers latéral (m/m)&nbsp;:",
     "INFO_ONLY_Q_MAY_VARY": "Seul le débit peut varier",
     "INFO_ONLY_Z1_Q_MAY_VARY": "Seuls la cote amont et le débit peuvent varier",
     "INFO_Z1_Z2_MUST_BE_DEFINED": "Les cotes amont et aval doivent être définies",
     "INFO_PENTE_TITRE": "Pente",
-    "INFO_PENTE_DESCRIPTION": "",
+    "INFO_PENTE_DESCRIPTION": "hydraulique à surface libre dénivelé",
     "INFO_PENTE_TITRE_COURT": "Pente",
     "INFO_MENU_EMPTY_SESSION_TITLE": "Nouvelle session",
     "INFO_MENU_HELP_TITLE": "Aide",
@@ -446,31 +446,31 @@
     "INFO_PAB_LOIDEBIT_VANLEVVILLEMONTE": "Échancrure régulée (Villemonte)",
     "INFO_PAB_LOIDEBIT_WEIRVILLEMONTE": "Échancrure (Villemonte)",
     "INFO_PARAMETRES_FIXES": "Tous les paramètres doivent être fixés",
-    "INFO_PAB_DESCRIPTION": "",
+    "INFO_PAB_DESCRIPTION": "poisson échelle",
     "INFO_PAB_TITRE_COURT": "PAB",
     "INFO_PAB_TITRE": "Passe à bassins",
     "INFO_PAB_TITRE_PROFIL": "Profil en long de la passe",
     "INFO_PAB_TABLE": "Géométrie de la passe",
-    "INFO_PABCHUTE_DESCRIPTION": "",
+    "INFO_PABCHUTE_DESCRIPTION": "échelle poisson",
     "INFO_PABCHUTE_TITRE_COURT": "PAB&nbsp;: chute",
     "INFO_PABCHUTE_TITRE": "Passe à bassins&nbsp;: chute",
-    "INFO_PABDIMENSIONS_DESCRIPTION": "",
+    "INFO_PABDIMENSIONS_DESCRIPTION": "échelle poisson",
     "INFO_PABDIMENSIONS_TITRE_COURT": "PAB&nbsp;: dimensions",
     "INFO_PABDIMENSIONS_TITRE": "Passe à bassins&nbsp;: dimensions",
-    "INFO_PABNOMBRE_DESCRIPTION": "",
+    "INFO_PABNOMBRE_DESCRIPTION": "échelle poisson",
     "INFO_PABNOMBRE_TITRE_COURT": "PAB&nbsp;: nombre",
     "INFO_PABNOMBRE_TITRE": "Passe à bassins&nbsp;: nombre de chutes",
-    "INFO_PABPUISSANCE_DESCRIPTION": "",
+    "INFO_PABPUISSANCE_DESCRIPTION": "échelle poisson",
     "INFO_PABPUISSANCE_TITRE_COURT": "PAB&nbsp;: puissance",
     "INFO_PABPUISSANCE_TITRE": "Passe à bassins&nbsp;: puissance dissipée",
-    "INFO_PARALLELSTRUCTURE_DESCRIPTION": "",
+    "INFO_PARALLELSTRUCTURE_DESCRIPTION": "orifice vanne seuil déversoir noyé dénoyé débit",
     "INFO_PARALLELSTRUCTURE_TITRE_COURT": "Ouvrages",
     "INFO_PARALLELSTRUCTURE_TITRE": "Lois d'ouvrages",
     "INFO_PAR_TITRE": "Passe à ralentisseurs&nbsp;: calage",
-    "INFO_PAR_DESCRIPTION": "",
+    "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",
-    "INFO_PARSIMULATION_DESCRIPTION": "",
+    "INFO_PARSIMULATION_DESCRIPTION": "plans Denil Fatou fonds suractifs mixte chevrons canoë",
     "INFO_PARSIMULATION_TITRE_COURT": "PAR&nbsp;: simulation",
     "INFO_PARAMFIELD_AWAITING_CALCULATION": "En attente de calcul",
     "INFO_PARAMFIELD_BOUNDARY_CONDITIONS": "Conditions aux limites",
@@ -514,7 +514,7 @@
     "INFO_QUICKNAV_INPUT": "données",
     "INFO_QUICKNAV_RESULTS": "résultats",
     "WARNING_PROBLEMS_ENCOUNTERED": "Des problèmes sont survenus durant le calcul (info&nbsp;: %info%, avertissement&nbsp;: %warning%, erreur&nbsp;: %error%)",
-    "INFO_REGIMEUNIFORME_DESCRIPTION": "",
+    "INFO_REGIMEUNIFORME_DESCRIPTION": "hydraulique à surface libre hauteur normale",
     "INFO_REGIMEUNIFORME_TITRE_COURT": "R. uniforme",
     "INFO_REGIMEUNIFORME_TITRE": "Régime uniforme",
     "INFO_REMOUS_CALCUL_FLUVIAL": "Condition limite aval >= Hauteur critique&nbsp;: calcul de la partie fluviale à partir de l'aval",
@@ -535,7 +535,7 @@
     "INFO_REQUIRES": "dépend de",
     "INFO_RESULTS_EXPORT_AS_SPREADSHEET": "Exporter en XLSX",
     "INFO_SEARCH_NO_RESULT": "Aucun résultat",
-    "INFO_SECTIONPARAMETREE_DESCRIPTION": "",
+    "INFO_SECTIONPARAMETREE_DESCRIPTION": "hydraulique à surface libre canal chenal bief rectangulaire circulaire puissance trapézoïdale périmètre charge mouillée rugosité hauteur charge critique normal conjuguée correspondante fluvial torrentiel Froude",
     "INFO_SECTIONPARAMETREE_TITRE_COURT": "Sec. param.",
     "INFO_SECTIONPARAMETREE_TITRE": "Section paramétrée",
     "INFO_SELECT_MULTIPLE_AND_OTHER": "autre",
@@ -561,7 +561,7 @@
     "INFO_SOLVEUR_DESCRIPTION": "",
     "INFO_SOLVEUR_TITRE_COURT": "Solveur",
     "INFO_SPP_TITRE": "Somme et produit de puissances",
-    "INFO_SPP_DESCRIPTION": "",
+    "INFO_SPP_DESCRIPTION": "plus fois",
     "INFO_SPP_TITRE_COURT": "SPP",
     "INFO_THEME_CREDITS": "Crédit",
     "INFO_THEME_DEVALAISON_TITRE": "Dévalaison",
@@ -597,10 +597,10 @@
     "INFO_EXAMPLES_TITLE": "Exemples",
     "INFO_EXAMPLES_SUBTITLE": "Charger des exemples types",
     "INFO_YAXB_TITRE": "Fonction affine",
-    "INFO_YAXB_DESCRIPTION": "",
+    "INFO_YAXB_DESCRIPTION": "addition plus soustraction moins multiplication division",
     "INFO_YAXB_TITRE_COURT": "F. affine",
     "INFO_TRIGO_TITRE": "Fonction trigonométrique",
-    "INFO_TRIGO_DESCRIPTION": "",
+    "INFO_TRIGO_DESCRIPTION": "cosinus sinus tangente arc",
     "INFO_TRIGO_TITRE_COURT": "F. trigo.",
     "INFO_VERIF_OK": "Les critères de franchissement sont remplis pour toutes les espèces",
     "INFO_VERIF_VARYING_OK": "Les critères de franchissement sont remplis pour toutes les espèces et toutes les modalités de la passe",
@@ -609,10 +609,10 @@
     "INFO_VERIFICATEUR_CUSTOM_SPECIES": "Espèce personnalisée&nbsp;: %s",
     "INFO_VERIFICATEUR_SPECIES_GROUP": "Groupe d'espèces",
     "INFO_VERIFICATEUR_TITRE": "Vérification d'une passe",
-    "INFO_VERIFICATEUR_DESCRIPTION": "",
+    "INFO_VERIFICATEUR_DESCRIPTION": "ichtyocompatible",
     "INFO_VERIFICATEUR_TITRE_COURT": "Vérification",
     "INFO_ESPECE_TITRE": "Caractéristiques d'une espèce",
-    "INFO_ESPECE_DESCRIPTION": "",
+    "INFO_ESPECE_DESCRIPTION": "ichtyocompatible",
     "INFO_ESPECE_TITRE_COURT": "Espèce",
     "WARNING_WARNINGS_ABSTRACT": "%nb% avertissements rencontrés lors du calcul",
     "ERROR_JET_SUBMERGED_NO_SOLUTION": "Il n'y a pas de solution",
-- 
GitLab


From e249e30629b87c33d27c33109013d488cb4bfaad Mon Sep 17 00:00:00 2001
From: "mathias.chouet" <mathias.chouet@irstea.fr>
Date: Wed, 2 Sep 2020 16:13:25 +0200
Subject: [PATCH 6/6] Search engine: also search in short title #428

---
 .../components/calculator-list/calculator-list.component.ts  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts
index ed2710834..6dc05bea1 100644
--- a/src/app/components/calculator-list/calculator-list.component.ts
+++ b/src/app/components/calculator-list/calculator-list.component.ts
@@ -87,6 +87,7 @@ export class CalculatorListComponent implements OnInit {
                         item.calculators.push({
                             type: calcType,
                             label: ServiceFactory.formulaireService.getLocalisedTitleFromCalculatorType(calcType),
+                            shortLabel: ServiceFactory.formulaireService.getLocalisedShortTitleFromCalculatorType(calcType),
                             description: ServiceFactory.formulaireService.getLocalisedDescriptionFromCalculatorType(calcType),
                             buttonId: "create-calc-" + calcType
                         });
@@ -121,6 +122,8 @@ export class CalculatorListComponent implements OnInit {
                         unusedTheme.calculators.push({
                             type: t,
                             label: ServiceFactory.formulaireService.getLocalisedTitleFromCalculatorType(t),
+                            shortLabel: ServiceFactory.formulaireService.getLocalisedShortTitleFromCalculatorType(t),
+                            description: ServiceFactory.formulaireService.getLocalisedDescriptionFromCalculatorType(t),
                             buttonId: "create-calc-" + t
                         });
                     }
@@ -205,7 +208,7 @@ export class CalculatorListComponent implements OnInit {
             // filter items based on parent component's search field
             for (const i of this.filteredItems) {
                 i.calculators = i.calculators.filter((c) => {
-                    return this.searchMatches(c.label) || this.searchMatches(c.description);
+                    return this.searchMatches(c.label) || this.searchMatches(c.shortLabel) || this.searchMatches(c.description);
                 });
             }
             this.filteredItems = this.filteredItems.filter((i) => {
-- 
GitLab