diff --git a/src/app/calculators/pab/en.json b/src/app/calculators/pab/en.json index d3fda007d382bbceb0f7694ff26ae4a6ac06cd08..a9360eb6c9b32cd8c8dde212325b80c1ece07856 100644 --- a/src/app/calculators/pab/en.json +++ b/src/app/calculators/pab/en.json @@ -4,6 +4,7 @@ "Q": "Flow", "Z1": "Upstream elevation", "Z2": "Downstream elevation", + "ZW": "Water line (m)", "Z": "Water elevation", "LB": "Basin length", diff --git a/src/app/calculators/pab/fr.json b/src/app/calculators/pab/fr.json index d951248b73d41ab075deb3083c89cff81040e1ee..68b983df6591b6be62323af2b47044e0029eded9 100644 --- a/src/app/calculators/pab/fr.json +++ b/src/app/calculators/pab/fr.json @@ -4,6 +4,7 @@ "Q": "Débit", "Z1": "Cote amont", "Z2": "Cote aval", + "ZW": "Ligne d'eau (m)", "Z": "Cote de l'eau", "LB": "Longueur du bassin", @@ -29,4 +30,4 @@ "UNIT_H1": "m", "UNIT_H2": "m", "UNIT_SUBMERGENCE": "%" -} \ No newline at end of file +} diff --git a/src/app/components/pab-profile-chart/pab-profile-chart.component.ts b/src/app/components/pab-profile-chart/pab-profile-chart.component.ts index 5bbc25c8fe1b056c20b6aef522b49e9bc2d348e1..c8eff7ec5fbb007f2b11bf6f48ca87a94e3edab1 100644 --- a/src/app/components/pab-profile-chart/pab-profile-chart.component.ts +++ b/src/app/components/pab-profile-chart/pab-profile-chart.component.ts @@ -16,6 +16,7 @@ import { CalculatorResults } from 'app/results/calculator-results'; import zoomPlugin from 'chartjs-plugin-zoom'; import { Chart } from "chart.js"; +import { FormulaireService } from "app/services/formulaire.service"; @Component({ selector: "pab-profile-chart", @@ -70,6 +71,7 @@ export class PabProfileChartComponent extends ResultsComponentDirective implemen public constructor( private intlService: I18nService, + private formService: FormulaireService, private cd: ChangeDetectorRef ) { super(); @@ -444,7 +446,7 @@ export class PabProfileChartComponent extends ResultsComponentDirective implemen label: ( this._results.variatedParameters.length > 0 ? this.getLegendForSeries(n) : - this.intlService.localizeText("INFO_LIB_ZW") // ligne d'eau + this.formService.localizeText("ZW", this.formService.currentForm.calculatorType) // ligne d'eau ), color: palette[ n % palette.length ] }); diff --git a/src/app/services/formulaire.service.ts b/src/app/services/formulaire.service.ts index 19022be0bb65cf658472f29e979dd9f25c400aa3..5c29f442d1a79d93e9f4b143b76a2491492d7b70 100644 --- a/src/app/services/formulaire.service.ts +++ b/src/app/services/formulaire.service.ts @@ -602,7 +602,7 @@ export class FormulaireService extends Observable { } } - private get currentForm(): FormulaireDefinition { + public get currentForm(): FormulaireDefinition { return this.getFormulaireFromId(this._currentFormId); }