From 485e35cdc13e9f0d1c7d9925ef1b767ff8e65303 Mon Sep 17 00:00:00 2001 From: Nicola Carminati Date: Thu, 9 Aug 2018 16:32:44 +0200 Subject: [PATCH] Fix Heads translate Read Config --- Step.Config/ServerConfigController.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs index e560f1f2..a98f6798 100644 --- a/Step.Config/ServerConfigController.cs +++ b/Step.Config/ServerConfigController.cs @@ -312,10 +312,12 @@ namespace Step.Config .Select(x => new HeadsConfigModel() { Id = i++, // Autoincrement Id - Name = x.Element("name").Value, Type = GetHeadType(x.Element("type").Value), WarningLimit = Convert.ToInt16(x.Element("warningLimit").Value), - AlarmLimit = Convert.ToInt16(x.Element("alarmLimit").Value), + AlarmLimit = Convert.ToInt16(x.Element("alarmLimit").Value), + LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read localized names and convert into a dictionary + y => y.Attribute("langKey").Value, y => y.Value + ), }) .ToList(); }