Merge remote-tracking branch 'origin/dev-v7' into temp8
# Conflicts: # src/SolutionInfo.cs # src/Umbraco.Core/Configuration/UmbracoVersion.cs # src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs # src/Umbraco.Core/Migrations/Upgrade/V_7_12_0/AddRelationTypeForMediaFolderOnDelete.cs # src/Umbraco.Core/Migrations/Upgrade/V_7_12_0/IncreaseLanguageIsoCodeColumnLength.cs # src/Umbraco.Core/Persistence/DatabaseModelDefinitions/ConstraintDefinition.cs # src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AddIndexToCmsMacroPropertyTable.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AddIndexToCmsMacroTable.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AlterTagsTable.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AssignMissingKeysAndIndexes.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenEightZero/AddIndexToPropertyTypeAliasColumn.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/AddForeignKeysForLanguageAndDictionaryTables.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/MigrateAndRemoveTemplateMasterColumn.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenTwoZero/AddMissingForeignKeyForContentType.cs # src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSixTwoZero/AdditionalIndexesAndKeys.cs # src/Umbraco.Core/Persistence/SqlSyntax/ISqlSyntaxProvider.cs # src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs # src/Umbraco.Core/Persistence/SqlSyntax/SqlCeSyntaxProvider.cs # src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs # src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs # src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs # src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.editor.html # src/Umbraco.Web/HealthCheck/Checks/DataIntegrity/DatabaseSchemaValidationHealthCheck.cs # src/Umbraco.Web/Scheduling/KeepAlive.cs # src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs
This commit is contained in:
@@ -52,17 +52,24 @@ namespace Umbraco.Web.Trees
|
||||
|
||||
internal static string GetRootNodeDisplayName(this TreeAttribute attribute, ILocalizedTextService textService)
|
||||
{
|
||||
var label = $"[{attribute.Alias}]";
|
||||
|
||||
// try to look up a the localized tree header matching the tree alias
|
||||
var localizedLabel = textService.Localize("treeHeaders/" + attribute.Alias);
|
||||
if (string.IsNullOrEmpty(localizedLabel) == false)
|
||||
return localizedLabel;
|
||||
|
||||
// otherwise return the header if it's defined
|
||||
if (string.IsNullOrEmpty(attribute.Title) == false)
|
||||
return attribute.Title;
|
||||
|
||||
// if all fails, return this to signal that a label was not found
|
||||
return "[" + attribute.Alias + "]";
|
||||
// if the localizedLabel returns [alias] then return the title attribute from the trees.config file, if it's defined
|
||||
if (localizedLabel != null && localizedLabel.Equals(label, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
if (string.IsNullOrEmpty(attribute.Title) == false)
|
||||
label = attribute.Title;
|
||||
}
|
||||
else
|
||||
{
|
||||
// the localizedLabel translated into something that's not just [alias], so use the translation
|
||||
label = localizedLabel;
|
||||
}
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
internal static Attempt<Type> TryGetControllerTree(this ApplicationTree appTree)
|
||||
|
||||
Reference in New Issue
Block a user