pull/900/head
Halil ibrahim Kalkan 6 years ago
commit 4207445845

@ -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<AbpSettingManagementWebModule>("Volo.Abp.SettingManagement.Web");
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<AbpSettingManagementResource>("en");
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<AbpSettingManagementResource>()
.AddVirtualJson("/Localization/Resources/AbpSettingManagement");
});
}
}
}

@ -0,0 +1,10 @@
using Volo.Abp.Localization;
namespace Volo.Abp.SettingManagement.Localization
{
[LocalizationResourceName("AbpSettingManagement")]
public class AbpSettingManagementResource
{
}
}

@ -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<IStringLocalizer<IdentityResource>>();
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<AbpSettingManagementResource>>();
context.Menu
.GetAdministration()
.AddItem(
new ApplicationMenuItem(
SettingManagementMenuNames.GroupName,
"Settings",
l["Settings"],
"/SettingManagement",
icon: "fa fa-cog"
)

@ -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<AbpSettingManagementResource> 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,7 +17,7 @@
</abp-script-bundle>
}
<div id="SettingManagementWrapper">
<div id="SettingManagementWrapper">
<abp-card>
<abp-card-body>
@ -31,4 +34,4 @@
</abp-tabs>
</abp-card-body>
</abp-card>
</div>
</div>

@ -14,6 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Localization\Volo.Abp.Localization.csproj" />
</ItemGroup>
<ItemGroup>
@ -25,7 +26,6 @@
<Content Remove="Pages\**\*.cshtml" />
<Content Remove="Pages\**\*.js" />
<Content Remove="Pages\**\*.css" />
<Content Remove="Localization\Resources\**\*.json" />
<Content Remove="Properties\launchSettings.json" />
<None Remove="Pages\Identity\Shared\personal-settings-modal.js" />
<None Include="Properties\launchSettings.json" />

Loading…
Cancel
Save