diff --git a/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/AbpAccountHttpApiModule.cs b/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/AbpAccountHttpApiModule.cs index 42e47c31c5..3a58d11643 100644 --- a/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/AbpAccountHttpApiModule.cs +++ b/modules/account/src/Volo.Abp.Account.HttpApi/Volo/Abp/Account/AbpAccountHttpApiModule.cs @@ -1,4 +1,7 @@ -using Volo.Abp.AspNetCore.Mvc; +using Localization.Resources.AbpUi; +using Volo.Abp.Account.Localization; +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Localization; using Volo.Abp.Modularity; namespace Volo.Abp.Account @@ -8,6 +11,14 @@ namespace Volo.Abp.Account typeof(AbpAspNetCoreMvcModule))] public class AbpAccountHttpApiModule : AbpModule { - + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes(typeof(AbpUiResource)); + }); + } } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs index 7f97cb7ee9..f7481b3485 100644 --- a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs +++ b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs @@ -1,12 +1,9 @@ -using Localization.Resources.AbpUi; -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Account.Localization; using Volo.Abp.AspNetCore.Mvc.Localization; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars; using Volo.Abp.Identity.AspNetCore; -using Volo.Abp.Localization; -using Volo.Abp.Localization.Resources.AbpValidation; using Volo.Abp.Modularity; using Volo.Abp.UI.Navigation; using Volo.Abp.VirtualFileSystem; @@ -40,14 +37,6 @@ namespace Volo.Abp.Account.Web options.MenuContributors.Add(new AbpAccountUserMenuContributor()); }); - Configure(options => - { - options.Resources - .Add("en") - .AddVirtualJson("/Localization/Resources/AbpAccount/Web") - .AddBaseTypes(typeof(AbpUiResource), typeof(AbpValidationResource)); - }); - Configure(options => { options.Contributors.Add(new AccountModuleToolbarContributor());