Merge pull request #3156 from sbwalker/dev
migrate LocalizerFactory logic from SiteRouter to ModuleTitle component
This commit is contained in:
commit
4c5460fc9e
|
@ -3,6 +3,7 @@
|
|||
@inherits ContainerBase
|
||||
@attribute [OqtaneIgnore]
|
||||
@inject IStringLocalizer<SharedResources> SharedLocalizer
|
||||
@inject IStringLocalizerFactory LocalizerFactory
|
||||
|
||||
<span class="app-moduletitle">
|
||||
@((MarkupString)title)
|
||||
|
@ -20,7 +21,8 @@
|
|||
{
|
||||
if (!string.IsNullOrEmpty(ModuleState.ControlTitle))
|
||||
{
|
||||
title = ModuleState.ControlTitle;
|
||||
var localizer = LocalizerFactory.Create(ModuleState.ModuleType);
|
||||
title = localizer[ModuleState.ControlTitle];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
@inject IUrlMappingService UrlMappingService
|
||||
@inject ILogService LogService
|
||||
@inject IJSRuntime JSRuntime
|
||||
@inject IStringLocalizerFactory LocalizerFactory
|
||||
@implements IHandleAfterRender
|
||||
|
||||
@if (!string.IsNullOrEmpty(_error))
|
||||
|
@ -465,8 +464,7 @@
|
|||
// additional metadata needed for admin components
|
||||
if (module.ModuleId == moduleid && action != "")
|
||||
{
|
||||
var localizer = LocalizerFactory.Create(module.ModuleType);
|
||||
module.ControlTitle = localizer[moduleobject.Title];
|
||||
module.ControlTitle = moduleobject.Title;
|
||||
module.SecurityAccessLevel = moduleobject.SecurityAccessLevel;
|
||||
module.Actions = moduleobject.Actions;
|
||||
module.UseAdminContainer = moduleobject.UseAdminContainer;
|
||||
|
|
Loading…
Reference in New Issue
Block a user