From 717a634090a528e9ac8542035d942a8265841552 Mon Sep 17 00:00:00 2001 From: toto <toto@tata> Date: Wed, 23 Nov 2022 13:45:23 +0100 Subject: [PATCH] fix: parametric section generation select: replace x,y by abscissa/water depth refs #496 --- .../select-section-details.component.ts | 8 ++++++-- src/locale/messages.en.json | 2 +- src/locale/messages.fr.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/components/select-section-details/select-section-details.component.ts b/src/app/components/select-section-details/select-section-details.component.ts index 58516fc2d..f315e94d1 100644 --- a/src/app/components/select-section-details/select-section-details.component.ts +++ b/src/app/components/select-section-details/select-section-details.component.ts @@ -2,6 +2,7 @@ import { Component, Input } from '@angular/core'; import { Router } from '@angular/router'; import { FormulaireDefinition } from 'app/formulaire/definition/form-definition'; import { FormulaireService } from 'app/services/formulaire.service'; +import { I18nService } from 'app/services/internationalisation.service'; import { fv } from 'app/util'; import { formattedValue } from 'jalhyd'; @@ -31,11 +32,14 @@ export class SelectSectionDetailsComponent { constructor( private formulaireService: FormulaireService, - private router: Router + private router: Router, + private intlService: I18nService ) { } public pointLabel(p: any): string { - return "x : " + formattedValue(p.x, 1) + " y : " + fv(p.z); + const abs = this.intlService.localizeText("INFO_REMOUSRESULTS_ABSCISSE"); + const tirant = this.intlService.localizeText("INFO_REMOUSRESULTS_TIRANT"); + return abs + " : " + formattedValue(p.x, 1) + " - " + tirant + " : " + fv(p.z); } /** diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index 5171fdefc..ce82a8a71 100755 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -577,7 +577,7 @@ "INFO_REMOUSRESULTS_ABSCISSE": "Abscissa", "INFO_REMOUSRESULTS_BERGE": "Embankment", "INFO_REMOUSRESULTS_FOND": "Bottom", - "INFO_REMOUSRESULTS_TIRANT": "Water depth (m)", + "INFO_REMOUSRESULTS_TIRANT": "Water depth", "INFO_REMOUSRESULTS_TIRANTCRITIQUE": "Critical water level", "INFO_REMOUSRESULTS_TIRANTNORMAL": "Normal water level", "INFO_REPORT_BUG_BODY": "This is an issue report.\n\nPlease describe quickly the issue you encountered, and the steps you followed:\n\n\n\n\n--- Current session state - do not modify text below ---\n------------------------------------------------------------------------\n\n", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index d41d2edd4..618be937a 100755 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -578,7 +578,7 @@ "INFO_REMOUSRESULTS_ABSCISSE": "Abscisse", "INFO_REMOUSRESULTS_BERGE": "Berge", "INFO_REMOUSRESULTS_FOND": "Fond", - "INFO_REMOUSRESULTS_TIRANT": "Tirant d'eau (m)", + "INFO_REMOUSRESULTS_TIRANT": "Tirant d'eau", "INFO_REMOUSRESULTS_TIRANTCRITIQUE": "Tirant d'eau critique", "INFO_REMOUSRESULTS_TIRANTNORMAL": "Tirant d'eau normal", "INFO_REPORT_BUG_BODY": "Ceci est un rapport d'erreur.\n\nMerci de décrire rapidement ci-dessous le problème rencontré, et les étapes qui vous y ont mené:\n\n\n\n\n--- État de la session en cours - ne pas modifier le texte ci-dessous ---\n--------------------------------------------------------------------------------------------\n\n", -- GitLab