From 2bc4805910830391a470954dab1f6f63d2e7997b Mon Sep 17 00:00:00 2001 From: Kay Unkroth Date: Thu, 20 Jan 2022 18:56:37 -0800 Subject: [PATCH] Added support for hierarchy levels. --- MetadataTranslator/Metadata Translator/Data/DataModel.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MetadataTranslator/Metadata Translator/Data/DataModel.cs b/MetadataTranslator/Metadata Translator/Data/DataModel.cs index 7cb7fb0..2090199 100644 --- a/MetadataTranslator/Metadata Translator/Data/DataModel.cs +++ b/MetadataTranslator/Metadata Translator/Data/DataModel.cs @@ -187,6 +187,14 @@ namespace Metadata_Translator Descriptions.Add(CreateRow(new MetadataObjectContainer(hierarchy, TranslatedProperty.Description), hierarchy.Description, DefaultCulture, cultures)); if (!string.IsNullOrEmpty(hierarchy.DisplayFolder)) DisplayFolders.AddDisplayFolder(hierarchy, hierarchy.DisplayFolder, DefaultCulture, cultures); + + foreach(Level level in hierarchy.Levels) + { + Captions.Add(CreateRow(new MetadataObjectContainer(level, TranslatedProperty.Caption), level.Name, DefaultCulture, cultures)); + + if (!string.IsNullOrEmpty(level.Description)) + Descriptions.Add(CreateRow(new MetadataObjectContainer(level, TranslatedProperty.Description), level.Description, DefaultCulture, cultures)); + } } } }