localized tree names

This commit is contained in:
perploug
2013-10-09 15:05:52 +02:00
parent 2b76d4b22d
commit a5b597e2f7
2 changed files with 11 additions and 3 deletions

View File

@@ -234,7 +234,7 @@ function treeService($q, treeResource, iconHelper, notificationsService, $rootSc
.then(function(data) {
//this will be called once the tree app data has loaded
var result = {
name: section,
name: data.name,
alias: section,
root: data
};

View File

@@ -13,6 +13,8 @@ using Umbraco.Web.WebApi;
using Umbraco.Web.WebApi.Filters;
using Constants = Umbraco.Core.Constants;
using umbraco;
namespace Umbraco.Web.Trees
{
@@ -47,11 +49,15 @@ namespace Umbraco.Web.Trees
var appTrees = ApplicationContext.Current.Services.ApplicationTreeService.GetApplicationTrees(application, true).ToArray();
if (appTrees.Count() == 1)
{
return GetRootForSingleAppTree(
var tree = GetRootForSingleAppTree(
appTrees.Single(),
Constants.System.Root.ToString(CultureInfo.InvariantCulture),
queryStrings,
application);
//PP: should this be further down in the logic?
tree.Title = ui.Text("sections", application);
return tree;
}
var collection = new TreeNodeCollection();
@@ -62,7 +68,9 @@ namespace Umbraco.Web.Trees
collection.Add(rootNode);
}
return SectionRootNode.CreateMultiTreeSectionRoot(rootId, collection);
var multiTree = SectionRootNode.CreateMultiTreeSectionRoot(rootId, collection);
multiTree.Title = ui.Text("sections", application);
return multiTree;
}
/// <summary>