diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs index b10d3c69c3..f1fae6b2f3 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/AbpSettingManagementWebModule.cs @@ -1,5 +1,7 @@ using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.Localization; using Volo.Abp.Modularity; +using Volo.Abp.SettingManagement.Localization; using Volo.Abp.SettingManagement.Web.Navigation; using Volo.Abp.UI.Navigation; using Volo.Abp.VirtualFileSystem; @@ -22,6 +24,19 @@ namespace Volo.Abp.SettingManagement.Web { options.FileSets.AddEmbedded("Volo.Abp.SettingManagement.Web"); }); + + Configure(options => + { + options.Resources + .Add("en"); + }); + + Configure(options => + { + options.Resources + .Get() + .AddVirtualJson("/Localization/Resources/AbpSettingManagement"); + }); } } } diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/AbpSettingManagementResource.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/AbpSettingManagementResource.cs new file mode 100644 index 0000000000..a89f749e4c --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/AbpSettingManagementResource.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Localization; + +namespace Volo.Abp.SettingManagement.Localization +{ + [LocalizationResourceName("AbpSettingManagement")] + public class AbpSettingManagementResource + { + + } +} diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json new file mode 100644 index 0000000000..654885f10b --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/en.json @@ -0,0 +1,6 @@ +{ + "culture": "en", + "texts": { + "Settings": "Settings" + } +} \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/tr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/tr.json new file mode 100644 index 0000000000..0e80027b84 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Localization/Resources/AbpSettingManagement/tr.json @@ -0,0 +1,6 @@ +{ + "culture": "tr", + "texts": { + "Settings": "Ayarlar" + } +} \ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs index 1fbd519bfd..79ed300398 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Navigation/SettingManagementMainMenuContributor.cs @@ -1,7 +1,9 @@ using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; using System.Linq; using System.Threading.Tasks; +using Volo.Abp.SettingManagement.Localization; using Volo.Abp.SettingManagement.Web.Pages.SettingManagement; using Volo.Abp.UI.Navigation; @@ -22,15 +24,14 @@ namespace Volo.Abp.SettingManagement.Web.Navigation return Task.CompletedTask; } - //TODO: Localize - //var l = context.ServiceProvider.GetRequiredService>(); + var l = context.ServiceProvider.GetRequiredService>(); context.Menu .GetAdministration() .AddItem( new ApplicationMenuItem( SettingManagementMenuNames.GroupName, - "Settings", + l["Settings"], "/SettingManagement", icon: "fa fa-cog" ) diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml index c14c416a36..edcc541bfe 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Pages/SettingManagement/Index.cshtml @@ -1,11 +1,14 @@ @page @using Volo.Abp.AspNetCore.Mvc.UI.Layout +@using Microsoft.AspNetCore.Mvc.Localization +@using Volo.Abp.SettingManagement.Localization @using Volo.Abp.SettingManagement.Web.Navigation @using Volo.Abp.SettingManagement.Web.Pages.SettingManagement @model IndexModel +@inject IHtmlLocalizer L @inject IPageLayout PageLayout @{ - PageLayout.Content.Title = /*L["Settings"].Value*/ "Settings"; + PageLayout.Content.Title = L["Settings"].Value; PageLayout.Content.MenuItemName = SettingManagementMenuNames.GroupName; } @section scripts { @@ -14,21 +17,21 @@ } -
- - +
+ + - - @foreach (var group in Model.SettingPageCreationContext.Groups) - { - + + @foreach (var group in Model.SettingPageCreationContext.Groups) + { + -

@group.DisplayName

-
- @await Component.InvokeAsync(group.ComponentType) -
- } -
-
-
-
\ No newline at end of file +

@group.DisplayName

+
+ @await Component.InvokeAsync(group.ComponentType) + + } + +
+
+
\ No newline at end of file diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj index b4d9324a10..bef5707d83 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj @@ -14,6 +14,7 @@ + @@ -25,7 +26,6 @@ -