From 7aeea96e2353414eb69ee63f831be80fd5b6d73b Mon Sep 17 00:00:00 2001 From: Tim Geyssens Date: Fri, 11 Nov 2016 11:45:25 +0100 Subject: [PATCH] First take localized text into account before the title property when working with tree headers --- src/Umbraco.Web/Trees/TreeController.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web/Trees/TreeController.cs b/src/Umbraco.Web/Trees/TreeController.cs index 0f975a9860..167de70cf7 100644 --- a/src/Umbraco.Web/Trees/TreeController.cs +++ b/src/Umbraco.Web/Trees/TreeController.cs @@ -43,16 +43,18 @@ namespace Umbraco.Web.Trees get { - //if title is defined, return that - if(string.IsNullOrEmpty(_attribute.Title) == false) - return _attribute.Title; + //try to look up a tree header matching the tree alias var localizedLabel = Services.TextService.Localize("treeHeaders/" + _attribute.Alias); - if (string.IsNullOrEmpty(localizedLabel) == false) + if (!string.IsNullOrEmpty(localizedLabel)) return localizedLabel; + //if title is defined, return that + if (!string.IsNullOrEmpty(_attribute.Title)) + return _attribute.Title; + //is returned to signal that a label was not found return "[" + _attribute.Alias + "]"; }