From 34a7e7f768f888fe0885df109de8d0c9b546cd3d Mon Sep 17 00:00:00 2001
From: Mathias Chouet <mathias.chouet@irstea.fr>
Date: Thu, 7 May 2020 11:55:18 +0200
Subject: [PATCH] Fix #400 - for real !

---
 src/app/formulaire/elements/select-field.ts | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/app/formulaire/elements/select-field.ts b/src/app/formulaire/elements/select-field.ts
index 79d63a4b6..d92d48f46 100644
--- a/src/app/formulaire/elements/select-field.ts
+++ b/src/app/formulaire/elements/select-field.ts
@@ -126,7 +126,10 @@ export class SelectField extends Field {
     public updateLocalisation(loc: StringMap) {
         super.updateLocalisation(loc);
         for (const e of this._entries) {
-            e.label = ServiceFactory.instance.i18nService.localizeText(e.id, loc);
+            // some Select fields already have a translated label at this time; translate others
+            if (e.label === undefined) {
+                e.label = ServiceFactory.instance.i18nService.localizeText(e.id, loc);
+            }
         }
     }
 
-- 
GitLab