From 7c27a891c483cad1f2917694d5ffb6d9ba10380d Mon Sep 17 00:00:00 2001 From: "francois.grand" <francois.grand@irstea.fr> Date: Fri, 18 May 2018 10:08:14 +0200 Subject: [PATCH] =?UTF-8?q?=20#45=20correction=20d'un=20bug=20de=20Interna?= =?UTF-8?q?tionalisationService.translateLabel()=20dans=20le=20cas=20d'un?= =?UTF-8?q?=20label=20ne=20repr=C3=A9sentant=20pas=20un=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internationalisation.service.ts | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/app/services/internationalisation/internationalisation.service.ts b/src/app/services/internationalisation/internationalisation.service.ts index f418a8899..d5e3486b8 100644 --- a/src/app/services/internationalisation/internationalisation.service.ts +++ b/src/app/services/internationalisation/internationalisation.service.ts @@ -192,24 +192,27 @@ export class InternationalisationService extends Observable { default: const match = this.parseLabel(o); - if (match) + if (match) { if (match[1] === "ouvrage") res = this.localizeText("INFO_OUVRAGE") + " n°" + (+match[2] + 1); - const p = match[3]; - switch (p) { - case "Q": - res += " : " + this.localizeText("INFO_GRANDEUR_" + p); - break; + const p = match[3]; + switch (p) { + case "Q": + res += " : " + this.localizeText("INFO_GRANDEUR_" + p); + break; - case "Q_Mode": - res += " : " + this.localizeText("INFO_TYPE_ECOULEMENT"); - break; + case "Q_Mode": + res += " : " + this.localizeText("INFO_TYPE_ECOULEMENT"); + break; - case "Q_Regime": - res += " : " + this.localizeText("INFO_REGIME"); - break; + case "Q_Regime": + res += " : " + this.localizeText("INFO_REGIME"); + break; + } } + else + res = o; break; } } -- GitLab