Skip to content

Commit

Permalink
Localize document type scaffolds for nested content (umbraco#3483)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjac committed Nov 16, 2018
1 parent 609609e commit eec286e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Umbraco.Web/Editors/ContentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ public ContentItemDisplay GetEmpty(string contentTypeAlias, int parentId)

var emptyContent = Services.ContentService.CreateContent("", parentId, contentType.Alias, UmbracoUser.Id);
var mapped = AutoMapperExtensions.MapWithUmbracoContext<IContent, ContentItemDisplay>(emptyContent, UmbracoContext);
// translate the content type name if applicable
mapped.ContentTypeName = Services.TextService.UmbracoDictionaryTranslate(mapped.ContentTypeName);
mapped.DocumentType.Name = Services.TextService.UmbracoDictionaryTranslate(mapped.DocumentType.Name);

//remove this tab if it exists: umbContainerView
var containerTab = mapped.Tabs.FirstOrDefault(x => x.Alias == Constants.Conventions.PropertyGroups.ListViewGroupName);
Expand Down

0 comments on commit eec286e

Please sign in to comment.