From b2b64ff29f02557b6ab85ce58988d568c6e4e536 Mon Sep 17 00:00:00 2001
From: David Dorchies <david.dorchies@irstea.fr>
Date: Wed, 4 Jul 2018 23:10:12 +0200
Subject: [PATCH] =?UTF-8?q?Correction=20de=20la=20gestion=20des=20libell?=
 =?UTF-8?q?=C3=A9s=20pour=20courbe=20de=20remous=20et=20sections=20param?=
 =?UTF-8?q?=C3=A9tr=C3=A9es=20suite=20=C3=A0=203556b20361?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../remous-results.component.ts               | 201 ++++++++++--------
 .../vertical-result-element.component.ts      |   2 +-
 .../definition/concrete/form-courbe-remous.ts |   1 -
 .../definition/form-compute-courbe-remous.ts  |  17 +-
 src/app/formulaire/ngparam.ts                 |  12 +-
 src/app/results/remous-results.ts             |  16 +-
 src/app/results/var-results.ts                |   2 +-
 .../internationalisation.service.ts           |   6 +-
 src/locale/error_messages.fr.json             |   6 +-
 9 files changed, 145 insertions(+), 118 deletions(-)

diff --git a/src/app/components/remous-results/remous-results.component.ts b/src/app/components/remous-results/remous-results.component.ts
index ee772b261..a986c11d1 100644
--- a/src/app/components/remous-results/remous-results.component.ts
+++ b/src/app/components/remous-results/remous-results.component.ts
@@ -16,12 +16,12 @@ import { VarResultsComponent } from "../fixedvar-results/var-results.component";
         text-align: right;
         padding-top:10px;
         padding-bottom:10px;
-        padding-right:10px;   
+        padding-right:10px;
     }
     .result_value {
         text-align: center;
-        padding-left:30px;   
-        padding-right:30px;   
+        padding-left:30px;
+        padding-right:30px;
     }
     .result_id_0 {
         background-color: #f0f0f0;
@@ -57,7 +57,7 @@ export class RemousResultsComponent {
     /**
      * true si les résultats doivent être mis à jour
      */
-    private _doUpdate: boolean = false;
+    private _doUpdate = false;
 
     /**
      * composant des résultats variables
@@ -75,54 +75,56 @@ export class RemousResultsComponent {
     }
 
     private get uitextLigneFluviale() {
-        return this.intlService.localizeText("INFO_REMOUSRESULTS_LIGNEFLUVIALE")
+        return this.intlService.getExtraResLabel("FLU");
     }
 
     private get uitextLigneTorrentielle() {
-        return this.intlService.localizeText("INFO_REMOUSRESULTS_LIGNETORRENTIELLE")
+        return this.intlService.getExtraResLabel("TOR");
     }
 
     private get uitextAbscisse() {
-        return this.intlService.localizeText("INFO_REMOUSRESULTS_ABSCISSE")
+        return this.intlService.localizeText("INFO_REMOUSRESULTS_ABSCISSE");
     }
 
     private get uitextTirant() {
-        return this.intlService.localizeText("INFO_REMOUSRESULTS_TIRANT")
+        return this.intlService.localizeText("INFO_REMOUSRESULTS_TIRANT");
     }
 
     private get uitextFond() {
-        return this.intlService.localizeText("INFO_REMOUSRESULTS_FOND")
+        return this.intlService.localizeText("INFO_REMOUSRESULTS_FOND");
     }
 
     private get uitextBerge() {
-        return this.intlService.localizeText("INFO_REMOUSRESULTS_BERGE")
+        return this.intlService.localizeText("INFO_REMOUSRESULTS_BERGE");
     }
 
     private get uitextTirantNormal() {
-        return this.intlService.localizeText("INFO_REMOUSRESULTS_TIRANTNORMAL")
+        return this.intlService.localizeText("INFO_REMOUSRESULTS_TIRANTNORMAL");
     }
 
     private get uitextTirantCritique() {
-        return this.intlService.localizeText("INFO_REMOUSRESULTS_TIRANTCRITIQUE")
+        return this.intlService.localizeText("INFO_REMOUSRESULTS_TIRANTCRITIQUE");
     }
 
     private get extraGraph(): boolean {
-        return this._remousResults == undefined ? false : this._remousResults.extraGraph;
+        return this._remousResults === undefined ? false : this._remousResults.extraGraph;
     }
 
     private get extraParamLabel(): string {
-        return this._remousResults == undefined ? undefined : this._remousResults.extraParamLabel;
+        return this._remousResults === undefined ? undefined :
+            this.intlService.getExtraResLabel(this._remousResults.extraParamSymbol);
     }
 
     public set results(rs: CalculatorResults[]) {
         this._remousResults = undefined;
-        if (rs != undefined)
+        if (rs !== undefined) {
             for (const r of rs) {
                 if (r instanceof RemousResults) {
                     this._remousResults = r;
                     break;
                 }
             }
+        }
         this.updateView();
     }
 
@@ -131,26 +133,30 @@ export class RemousResultsComponent {
         this.graph1_options = {};
         this.graph2_data = {};
         this.graph2_options = {};
-        if (this.varResultsComponent != undefined)
+        if (this.varResultsComponent !== undefined) {
             this.varResultsComponent.results = undefined;
-        if (this.logComponent != undefined)
+        }
+        if (this.logComponent !== undefined) {
             this.logComponent.log = undefined;
+        }
         this._tableHeaders = [];
 
-        if (this._remousResults != undefined)
+        if (this._remousResults !== undefined) {
             this._doUpdate = this._remousResults.hasResults;
+        }
     }
 
-    /** 
+    /**
      * appelé pour gérer les changements non détectés par Angular
      */
     public ngDoCheck() {
-        if (this._doUpdate)
+        if (this._doUpdate) {
             this._doUpdate = !this.updateResults();
+        }
     }
 
     private updateResults() {
-        if (this.logComponent != undefined && this._remousResults != undefined) {
+        if (this.logComponent !== undefined && this._remousResults !== undefined) {
             this.logComponent.log = this._remousResults.log;
             this.generateGraph();
             return true;
@@ -163,57 +169,61 @@ export class RemousResultsComponent {
     }
 
     private connectRessaut(lineFlu: LineData, lineTor: LineData) {
-        if (lineFlu != undefined && lineTor != undefined) {
-            let tX = lineFlu.tx.slice(0); // copie
+        if (lineFlu !== undefined && lineTor !== undefined) {
+            const tX = lineFlu.tx.slice(0); // copie
 
             tX.sort((a, b) => {
-                if (a > b)
+                if (a > b) {
                     return 1;
-                if (a < b)
+                }
+                if (a < b) {
                     return -1;
+                }
                 return 0;
             });
 
             let minXflu; // abscisse de début de la courbe fluviale
             let itX = this.abscisseIterator;
-            for (let re of this._remousResults.result.resultElements) {
-                if (!itX.hasNext)
-                    throw new Error("RemousResultsComponent.connectRessaut() : erreur interne (itérateur sur x)")
+            for (const re of this._remousResults.result.resultElements) {
+                if (!itX.hasNext) {
+                    throw new Error("RemousResultsComponent.connectRessaut() : erreur interne (itérateur sur x)");
+                }
                 const x = itX.next().value;
-                if (re.getExtraResult("flu") != undefined) {
+                if (re.getExtraResult("flu") !== undefined) {
                     minXflu = x;
                     break;
                 }
             }
 
-            if (minXflu != undefined && minXflu != tX[0]) {
+            if (minXflu !== undefined && minXflu !== tX[0]) {
                 // la courbe fluviale ne démarre pas au début, on ajoute un point de raccord avec la ligne torrentielle
 
-                let i = tX.indexOf(minXflu);
-                let xflu = tX[i - 1];
-                let yflu = lineTor.getYat(xflu);
+                const i = tX.indexOf(minXflu);
+                const xflu = tX[i - 1];
+                const yflu = lineTor.getYat(xflu);
                 lineFlu.setPoint(xflu, yflu);
             }
 
             let maxXtor; // abscisse de fin de la courbe torrentielle
             const itRE = new ArrayReverseIterator<ResultElement>(this._remousResults.result.resultElements);
             itX = this.abscisseIterator;
-            for (let r of itRE) {
-                if (!itX.hasNext)
-                    throw new Error("RemousResultsComponent.connectRessaut() : erreur interne (itérateur sur x)")
+            for (const r of itRE) {
+                if (!itX.hasNext) {
+                    throw new Error("RemousResultsComponent.connectRessaut() : erreur interne (itérateur sur x)");
+                }
                 const x = itX.next();
-                if (r.getExtraResult("tor") != undefined) {
+                if (r.getExtraResult("tor") !== undefined) {
                     maxXtor = x;
                     break;
                 }
             }
 
-            if (maxXtor != undefined && maxXtor != tX[tX.length - 1]) {
+            if (maxXtor !== undefined && maxXtor !== tX[tX.length - 1]) {
                 // la courbe torrentielle ne finit pas à la fin des abscisses, on ajoute un point de raccord avec la ligne fluviale
 
-                let i = tX.indexOf(maxXtor);
-                let xflu = tX[i + 1];
-                let yflu = lineFlu.getYat(xflu);
+                const i = tX.indexOf(maxXtor);
+                const xflu = tX[i + 1];
+                const yflu = lineFlu.getYat(xflu);
                 lineTor.setPoint(xflu, yflu);
             }
         }
@@ -224,86 +234,109 @@ export class RemousResultsComponent {
         // le dernier dataset de la liste datasets est dessiné en 1er
 
         this._remousResults.update();
-        if (this.varResultsComponent)
+        if (this.varResultsComponent) {
             this.varResultsComponent.results = this._remousResults.varResults;
+        }
 
         const penteFond: number = this._remousResults.penteFond;
 
         // abscisses
 
         let labs: number[] = [];
+        let xmax: number;
         if (this._remousResults.result.ok) {
-            var xmax = -1e8;
-            const itX = this.abscisseIterator;
-            while (itX.hasNext) {
-                const x = itX.next().value;
+            xmax = -1e8;
+            const itX2 = this.abscisseIterator;
+            while (itX2.hasNext) {
+                const x = itX2.next().value;
                 labs.push(x);
                 xmax = Math.max(x, xmax);
             }
-        }
-        else {
+        } else {
             labs = [0, 1];
             xmax = 1;
         }
 
         // init graphiques
 
-        let gr1 = new GraphData(labs, penteFond, xmax);
-        if (this._remousResults.extraGraph)
-            var gr2 = new GraphData(labs, 0, xmax);
+        const gr1 = new GraphData(labs, penteFond, xmax);
+        let gr2: GraphData;
+        if (this._remousResults.extraGraph) {
+            gr2 = new GraphData(labs, 0, xmax);
+        }
 
         // ligne de fond
         gr1.drawLine(0, 0, 3, "#753F00", this.uitextFond, "#753F00");
 
         // ligne de berge
-        if (this._remousResults.hautBerge)
+        if (this._remousResults.hautBerge) {
             gr1.drawLine(this._remousResults.hautBerge, this._remousResults.hautBerge, 4, "#C58F50", this.uitextBerge);
+        }
 
         // hauteur normale
-        if (this._remousResults.hautNormale != undefined && this._remousResults.hautNormale.ok)
-            gr1.drawLine(this._remousResults.hautNormale.vCalc, this._remousResults.hautNormale.vCalc, 5, "#A4C537", this.uitextTirantNormal);
+        if (this._remousResults.hautNormale !== undefined && this._remousResults.hautNormale.ok) {
+            gr1.drawLine(this._remousResults.hautNormale.vCalc, this._remousResults.hautNormale.vCalc,
+                5, "#A4C537", this.uitextTirantNormal
+            );
+        }
 
         // hauteur critique
-        if (this._remousResults.hautCritique != undefined && this._remousResults.hautCritique.ok)
-            gr1.drawLine(this._remousResults.hautCritique.vCalc, this._remousResults.hautCritique.vCalc, 6, "#FF0000", this.uitextTirantCritique);
+        if (this._remousResults.hautCritique !== undefined && this._remousResults.hautCritique.ok) {
+            gr1.drawLine(this._remousResults.hautCritique.vCalc, this._remousResults.hautCritique.vCalc,
+                6, "#FF0000", this.uitextTirantCritique
+            );
+        }
 
         // lignes d'eau torrentielle et fluviale
 
-        if (this._remousResults.hasFluData)
-            var lineFlu = gr1.newLine(0);
-        if (this._remousResults.hasTorData)
-            var lineTor = gr1.newLine(1);
+        let lineFlu: LineData;
+        if (this._remousResults.hasFluData) {
+            lineFlu = gr1.newLine(0);
+        }
+        let lineTor: LineData;
+        if (this._remousResults.hasTorData) {
+            lineTor = gr1.newLine(1);
+        }
+        let lineExtra: LineData;
         if (this._remousResults.hasExtra) {
-            if (this._remousResults.extraGraph)
-                var lineExtra = gr2.newLine(2);
-            else
+            if (this._remousResults.extraGraph) {
+                lineExtra = gr2.newLine(2);
+            } else {
                 lineExtra = gr1.newLine(2);
+            }
         }
 
         const itX = this.abscisseIterator;
-        for (let re of this._remousResults.result.resultElements) {
+        for (const re of this._remousResults.result.resultElements) {
             if (!itX.hasNext)
-                throw new Error("RemousResultsComponent.generateGraph() : erreur interne (itérateur sur x)")
+                throw new Error("RemousResultsComponent.generateGraph() : erreur interne (itérateur sur x)");
 
             const x = itX.next().value;
-            const yExtra = re.getExtraResult("tRes");
-            if (yExtra != undefined)
+            const yExtra = re.getExtraResult(this._remousResults.extraParamSymbol);
+            if (yExtra !== undefined)
                 lineExtra.mapPoint(x, yExtra);
 
             const yFlu = re.getExtraResult("flu");
-            if (yFlu != undefined)
+            if (yFlu !== undefined)
                 lineFlu.mapPoint(x, yFlu);
 
             const yTor = re.getExtraResult("tor");
-            if (yTor != undefined)
+            if (yTor !== undefined)
                 lineTor.mapPoint(x, yTor);
         }
 
         if (this._remousResults.hasExtra) {
-            if (this._remousResults.extraGraph)
-                lineExtra.data = { label: this._remousResults.extraParamLabel, tension: 0, spanGaps: true, borderColor: "#0093BD", pointRadius: 4 };
-            else
-                lineExtra.data = { label: this._remousResults.extraParamLabel, tension: 0, fill: false, spanGaps: true, borderColor: "#C17AF0", pointRadius: 4 };
+            if (this._remousResults.extraGraph) {
+                lineExtra.data = {
+                    label: this.extraParamLabel,
+                    tension: 0, spanGaps: true, borderColor: "#0093BD", pointRadius: 4
+                };
+            } else {
+                lineExtra.data = {
+                    label: this.extraParamLabel,
+                    tension: 0, fill: false, spanGaps: true, borderColor: "#C17AF0", pointRadius: 4
+                };
+            }
         }
 
         // raccordement ligne fluviale -> torrentielle pour dessiner le ressaut
@@ -312,9 +345,9 @@ export class RemousResultsComponent {
 
         // ajout des données au graphique
 
-        if (lineTor != undefined)
+        if (lineTor !== undefined)
             lineTor.data = { label: this.uitextLigneTorrentielle, tension: 0, borderColor: "#77A3CD", pointBackgroundColor: "#77A3CD", pointRadius: 4, backgroundColor: "#D1D0D4" };
-        if (lineFlu != undefined)
+        if (lineFlu !== undefined)
             lineFlu.data = { label: this.uitextLigneFluviale, tension: 0, borderColor: "#0093BD", pointBackgroundColor: "#0093BD", pointRadius: 4, backgroundColor: "#D1D0D4" };
 
         this.graph1_data = gr1.data;
@@ -367,7 +400,7 @@ export class RemousResultsComponent {
     }
 
     private get hasResults(): boolean {
-        return this._remousResults != undefined && this._remousResults.hasResults;
+        return this._remousResults !== undefined && this._remousResults.hasResults;
     }
 
     private get hasData(): boolean {
@@ -413,12 +446,12 @@ class LineData {
     }
 
     public getYat(x: number) {
-        let i = this._tx.indexOf(x);
+        const i = this._tx.indexOf(x);
         return this._ty[i];
     }
 
     public setPoint(x: number, y: number) {
-        let i = this._tx.indexOf(x);
+        const i = this._tx.indexOf(x);
         this._ty[i] = y;
     }
 
@@ -435,7 +468,7 @@ class LineData {
     }
 
     public hasYs(): boolean {
-        for (let y of this._ty)
+        for (const y of this._ty)
             if (y != null)
                 return true;
         return false;
@@ -480,7 +513,7 @@ class GraphData {
      * @param z profondeur de la lign
      */
     public newLine(z: number): LineData {
-        let res = new LineData(this);
+        const res = new LineData(this);
         res.z = z;
         this._lines.push(res);
         return res;
@@ -514,19 +547,19 @@ class GraphData {
      * @param fillColor couleur de remplissage sous la ligne
      */
     public drawLine(y0: number, ymax: number, prof: number, color: string, lbl: string, fillColor: string = undefined) {
-        let l = this.newLine(prof);
+        const l = this.newLine(prof);
         l.mapPoint(0, y0);
         l.mapPoint(this._longBief, ymax);
 
         // l.data = { label: lbl, data: l, fill: fillColor != undefined, tension: 0, borderColor: color, backgroundColor: fillColor, pointRadius: 0 };
         l.data = {
-            label: lbl, fill: fillColor != undefined, tension: 0, spanGaps: true,
+            label: lbl, fill: fillColor !== undefined, tension: 0, spanGaps: true,
             borderColor: color, backgroundColor: fillColor, pointRadius: 0
         };
     }
 
     public get data() {
-        let ds = [];
+        const ds = [];
         this._lines.sort((a, b) => {
             if (a.z > b.z)
                 return -1;
@@ -535,7 +568,7 @@ class GraphData {
             return 0;
         });
 
-        for (let l of this._lines)
+        for (const l of this._lines)
             ds.push(l.data);
 
         return {
diff --git a/src/app/components/result-element/vertical-result-element.component.ts b/src/app/components/result-element/vertical-result-element.component.ts
index 53fff9965..ae8f7c09c 100644
--- a/src/app/components/result-element/vertical-result-element.component.ts
+++ b/src/app/components/result-element/vertical-result-element.component.ts
@@ -54,7 +54,7 @@ export class VerticalResultElementComponent extends ResultElementBaseComponent {
                 const lblClass = (i % 2) == 0 ? "label1" : "label2";
                 const valueClass = (i % 2) == 0 ? "value1" : "value2";
                 this.vcRef.createEmbeddedView(this.trTemplate, {
-                    extraRes: { "label": this.intlService.translateLabel(k), "value": this.intlService.formatResult(k, er) },
+                    extraRes: { "label": this.intlService.getExtraResLabel(k), "value": this.intlService.formatResult(k, er) },
                     classes: { "label_class": lblClass, "value_class": valueClass }
                 });
                 i++;
diff --git a/src/app/formulaire/definition/concrete/form-courbe-remous.ts b/src/app/formulaire/definition/concrete/form-courbe-remous.ts
index c4653bbac..f67df0d0b 100644
--- a/src/app/formulaire/definition/concrete/form-courbe-remous.ts
+++ b/src/app/formulaire/definition/concrete/form-courbe-remous.ts
@@ -6,7 +6,6 @@ import { FormComputeCourbeRemous } from "../form-compute-courbe-remous";
 import { FormulaireDefinition } from "../form-definition";
 import { CalculatorResults } from "../../../results/calculator-results";
 import { FieldSet } from "../../fieldset";
-import { SelectField } from "../../select-field";
 
 export class FormulaireCourbeRemous extends FormulaireDefinition {
     private _formSection: FormDefSection;
diff --git a/src/app/formulaire/definition/form-compute-courbe-remous.ts b/src/app/formulaire/definition/form-compute-courbe-remous.ts
index 664a17cf4..69f3a832a 100644
--- a/src/app/formulaire/definition/form-compute-courbe-remous.ts
+++ b/src/app/formulaire/definition/form-compute-courbe-remous.ts
@@ -22,31 +22,30 @@ export class FormComputeCourbeRemous extends FormCompute {
         const prmCR: CourbeRemousParams = cr.parameters as CourbeRemousParams;
         const sect: acSection = prmCR.Sn;
 
-        let Yn: Result = sect.Calc("Yn"); // hauteur normale
-        let Yc: Result = sect.Calc("Yc"); // hauteur critique
+        const Yn: Result = sect.Calc("Yn"); // hauteur normale
+        const Yc: Result = sect.Calc("Yc"); // hauteur critique
 
         this.remousResults.parameters = prmCR;
 
         // méthode de résolution
 
-        let msf: SelectField = <SelectField>this._formBase.getFormulaireNodeById("select_resolution");
-        let methRes: MethodeResolution = msf.getValue().value;
+        const msf: SelectField = <SelectField>this._formBase.getFormulaireNodeById("select_resolution");
+        const methRes: MethodeResolution = msf.getValue().value;
 
         // variable supplémentaire à calculer
 
-        const extraSymbol: string = this._formBase.getSelectedValue("select_target");
+        this.remousResults.extraParamSymbol = this._formBase.getSelectedValue("select_target");
 
         // calcul
 
-        this.remousResults.result = cr.calculRemous(extraSymbol);
+        this.remousResults.result = cr.calculRemous(this.remousResults.extraParamSymbol);
 
         // données du graphe
 
         this.remousResults.hauteurNormale = Yn.resultElement;
         this.remousResults.hauteurCritique = Yc.resultElement;
-        if (extraSymbol) {
-            this.remousResults.extraParamLabel = this._formBase.getSelectedLabel("select_target");
-            this.remousResults.extraGraph = ["Hs", "Hsc", "Yf", "Yt", "Yco"].indexOf(extraSymbol) == -1;
+        if (this.remousResults.extraParamSymbol) {
+            this.remousResults.extraGraph = ["Hs", "Hsc", "Yf", "Yt", "Yco"].indexOf(this.remousResults.extraParamSymbol) === -1;
         }
         else
             this.remousResults.extraGraph = false;
diff --git a/src/app/formulaire/ngparam.ts b/src/app/formulaire/ngparam.ts
index 2b31478c3..71b4e6b68 100644
--- a/src/app/formulaire/ngparam.ts
+++ b/src/app/formulaire/ngparam.ts
@@ -107,8 +107,8 @@ export class NgParameter extends InputField implements Observer {
      * fixe la valeur du paramètre.
      * une notification préalable est envoyée pour laisser l'occasion aux objets liés de préciser le contexte
      * dans lequel cette valeur existe
-     * @param sender 
-     * @param val 
+     * @param sender
+     * @param val
      */
     public setValue(sender: any, val: number) {
         this._paramDef.setValue(val, sender);
@@ -292,14 +292,6 @@ export class NgParameter extends InputField implements Observer {
         return this._paramDef.valuesIterator;
     }
 
-    public updateLocalisation(loc: StringMap) {
-        super.updateLocalisation(loc);
-        if (this.label == undefined) {
-            const key: string = `INFO_GRANDEUR_${this.symbol.toUpperCase()}`;
-            super.updateLocalisation(loc, key);
-        }
-    }
-
     private paramValuesJSON(): any {
         let res = {};
         res["mode"] = ParamValueMode[this._paramValues.valueMode];
diff --git a/src/app/results/remous-results.ts b/src/app/results/remous-results.ts
index 99cbddeb6..ec7d5ef9c 100644
--- a/src/app/results/remous-results.ts
+++ b/src/app/results/remous-results.ts
@@ -57,7 +57,7 @@ export class RemousResults extends CalculatorResults {
     /**
      * titre de la colonne du paramètre supplémentaire
      */
-    private _extraParamLabel: string;
+    private _extraParamSymbol: string;
 
     /**
      * journal de calcul
@@ -76,7 +76,7 @@ export class RemousResults extends CalculatorResults {
         this._penteFond = undefined;
         this._hautNormale = undefined;
         this._hautCritique = undefined;
-        this._extraParamLabel = undefined;
+        this._extraParamSymbol = undefined;
         this._hasFlu = false;
         this._hasTor = false;
         this._hasExtra = false;
@@ -127,7 +127,7 @@ export class RemousResults extends CalculatorResults {
                 this._hasFlu = true;
             if (!this._hasTor && re.getExtraResult("tor"))
                 this._hasTor = true;
-            if (!this._hasExtra && re.getExtraResult("tRes"))
+            if (!this._hasExtra && re.getExtraResult(this.extraParamSymbol))
                 this._hasExtra = true;
         }
 
@@ -143,13 +143,17 @@ export class RemousResults extends CalculatorResults {
         if (this._hasTor)
             keys.push("tor");
         if (this._hasExtra)
-            keys.push("tRes");
+            keys.push(this.extraParamSymbol);
         this._varResults.extraResultKeys = keys;
         this._varResults.update(true);
     }
 
-    public set extraParamLabel(l: string) {
-        this._extraParamLabel = l;
+    public get extraParamSymbol(): string {
+        return this._extraParamSymbol;
+    }
+
+    public set extraParamSymbol(l: string) {
+        this._extraParamSymbol = l;
     }
 
     public get hautBerge() {
diff --git a/src/app/results/var-results.ts b/src/app/results/var-results.ts
index 72cec0561..4a39c1c9a 100644
--- a/src/app/results/var-results.ts
+++ b/src/app/results/var-results.ts
@@ -136,6 +136,6 @@ export class VarResults extends CalculatedParamResults {
 
         const intlService = ServiceFactory.instance.internationalisationService;
         for (const k of this._extraResultKeys)
-            this._extraResultHeaders.push(intlService.translateLabel(k));
+            this._extraResultHeaders.push(intlService.getExtraResLabel(k));
     }
 }
diff --git a/src/app/services/internationalisation/internationalisation.service.ts b/src/app/services/internationalisation/internationalisation.service.ts
index 00397c931..95b6dcbad 100644
--- a/src/app/services/internationalisation/internationalisation.service.ts
+++ b/src/app/services/internationalisation/internationalisation.service.ts
@@ -163,10 +163,10 @@ export class InternationalisationService extends Observable {
      */
     public localizeText(code: string) {
         if (this._Messages === undefined) {
-            return "<messages not loaded>";
+            return "*** messages not loaded: ${code} ***";
         }
         if (this._Messages[code] === undefined) {
-            return `<message not exists: ${code}>`;
+            return `*** message not exists: ${code} ***`;
         }
         return this._Messages[code];
     }
@@ -182,7 +182,7 @@ export class InternationalisationService extends Observable {
     /**
      * Traduit un libellé qui peut être un code
      */
-    public translateLabel(s: string) {
+    public getExtraResLabel(s: string) {
         const key = "INFO_EXTRARES_LIB_";
         const match = this.parseLabel(s);
         if (match) {
diff --git a/src/locale/error_messages.fr.json b/src/locale/error_messages.fr.json
index e1dfb10f2..e0e56d74c 100644
--- a/src/locale/error_messages.fr.json
+++ b/src/locale/error_messages.fr.json
@@ -87,9 +87,9 @@
     "INFO_EXTRARES_LIB_HSC": "Charge critique (m)",
     "INFO_EXTRARES_LIB_B": "Largeur au miroir (m)",
     "INFO_EXTRARES_LIB_P": "Périmètre mouillé (m)",
-    "INFO_EXTRARES_LIB_S": "Surface mouillée  (m²)",
-    "INFO_EXTRARES_LIB_R": "Rayon hydraulique  (m)",
-    "INFO_EXTRARES_LIB_V": "Vitesse moyenne  (m/s)",
+    "INFO_EXTRARES_LIB_S": "Surface mouillée (m²)",
+    "INFO_EXTRARES_LIB_R": "Rayon hydraulique (m)",
+    "INFO_EXTRARES_LIB_V": "Vitesse moyenne (m/s)",
     "INFO_EXTRARES_LIB_FR": "Froude",
     "INFO_EXTRARES_LIB_YC": "Tirant d'eau critique (m)",
     "INFO_EXTRARES_LIB_YN": "Tirant d'eau normal (m)",
-- 
GitLab