rollback #3125 and localize module component Title using LocalizerFactory
This commit is contained in:
parent
2777a0946c
commit
9e6ea3f486
|
@ -66,12 +66,6 @@
|
|||
|
||||
public override string Title => "File Management";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -112,11 +112,6 @@
|
|||
|
||||
public override string Title => "Folder Management";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
||||
}
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -22,12 +22,6 @@
|
|||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||
public override string Title => "Export Content";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
||||
}
|
||||
|
||||
private async Task ExportModule()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -28,11 +28,6 @@
|
|||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Edit;
|
||||
public override string Title => "Import Content";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
||||
}
|
||||
private async Task ImportModule()
|
||||
{
|
||||
validated = true;
|
||||
|
|
|
@ -130,11 +130,6 @@
|
|||
private string modifiedby;
|
||||
private DateTime modifiedon;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
||||
}
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
_module = ModuleState.ModuleDefinition.Name;
|
||||
|
|
|
@ -42,12 +42,6 @@
|
|||
|
||||
public override string Title => "Send Notification";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
||||
}
|
||||
|
||||
private async Task Send()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -110,11 +110,6 @@
|
|||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.View;
|
||||
public override string Title => "View Notification";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
||||
}
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -68,12 +68,6 @@
|
|||
private List<Models.HtmlText> _htmltexts;
|
||||
private string _view = "";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
base.SetModuleTitle(Localizer["ModuleTitle.Text"]);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
@ -150,7 +150,7 @@
|
|||
<data name="Description.Text" xml:space="preserve">
|
||||
<value>Description:</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
||||
<data name="File Management" xml:space="preserve">
|
||||
<value>File Management</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
@ -192,7 +192,7 @@
|
|||
<data name="Public" xml:space="preserve">
|
||||
<value>Public</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
||||
<data name="Folder Management" xml:space="preserve">
|
||||
<value>Folder Management</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
@ -132,7 +132,7 @@
|
|||
<data name="Success.Content.Export" xml:space="preserve">
|
||||
<value>Content Exported Successfully</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
||||
<data name="Export Content" xml:space="preserve">
|
||||
<value>Export Content</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
@ -138,7 +138,7 @@
|
|||
<data name="Message.Required.ImportContent" xml:space="preserve">
|
||||
<value>You Must Enter Some Content To Import</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
||||
<data name="Import Content" xml:space="preserve">
|
||||
<value>Import Content</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
@ -156,7 +156,7 @@
|
|||
<data name="Module.Text" xml:space="preserve">
|
||||
<value>Module:</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
||||
<data name="Module Settings" xml:space="preserve">
|
||||
<value>Module Settings</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
@ -141,7 +141,7 @@
|
|||
<data name="Subject.Text" xml:space="preserve">
|
||||
<value>Subject: </value>
|
||||
</data>
|
||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
||||
<data name="Send Notification" xml:space="preserve">
|
||||
<value>Send Notification</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
@ -144,7 +144,7 @@
|
|||
<data name="OriginalMessage" xml:space="preserve">
|
||||
<value>Original Message</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
||||
<data name="View Notification" xml:space="preserve">
|
||||
<value>View Notification</value>
|
||||
</data>
|
||||
</root>
|
|
@ -156,7 +156,7 @@
|
|||
<data name="Message.Content.Restored" xml:space="preserve">
|
||||
<value>Version Restored</value>
|
||||
</data>
|
||||
<data name="ModuleTitle.Text" xml:space="preserve">
|
||||
<data name="Edit Html/Text" xml:space="preserve">
|
||||
<value>Edit Html/Text</value>
|
||||
</data>
|
||||
<data name="Restore.Header" xml:space="preserve">
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
@inject IUrlMappingService UrlMappingService
|
||||
@inject ILogService LogService
|
||||
@inject IJSRuntime JSRuntime
|
||||
@inject IStringLocalizerFactory LocalizerFactory
|
||||
@implements IHandleAfterRender
|
||||
|
||||
@if (!string.IsNullOrEmpty(_error))
|
||||
|
@ -387,6 +388,7 @@
|
|||
private (Page Page, List<Module> Modules) ProcessModules(Page page, List<Module> modules, int moduleid, string action, string defaultcontainertype, Alias alias)
|
||||
{
|
||||
var paneindex = new Dictionary<string, int>();
|
||||
|
||||
foreach (Module module in modules)
|
||||
{
|
||||
// initialize module control properties
|
||||
|
@ -463,8 +465,9 @@
|
|||
// additional metadata needed for admin components
|
||||
if (module.ModuleId == moduleid && action != "")
|
||||
{
|
||||
var localizer = LocalizerFactory.Create(module.ModuleType);
|
||||
module.ControlTitle = localizer[moduleobject.Title];
|
||||
module.SecurityAccessLevel = moduleobject.SecurityAccessLevel;
|
||||
module.ControlTitle = moduleobject.Title;
|
||||
module.Actions = moduleobject.Actions;
|
||||
module.UseAdminContainer = moduleobject.UseAdminContainer;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user