diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj index 0f1621b6b2..039c559860 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj @@ -11,11 +11,7 @@ - - - - - + diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/cs.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json similarity index 100% rename from modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/cs.json rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json index a9c8dcc3fd..892e60f89e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json @@ -1,5 +1,21 @@ -{ +{ "culture": "en", "texts": { + "UserName": "User name", + "EmailAddress": "Email address", + "UserNameOrEmailAddress": "User name or email address", + "Password": "Password", + "RememberMe": "Remember me", + "UseAnotherServiceToLogin": "Use another service to log in", + "UserLockedOutMessage": "The user account has been locked out due to invalid login attempts. Please wait a while and try again.", + "InvalidUserNameOrPassword": "Invalid username or password!", + "LoginIsNotAllowed": "You are not allowed to login! You need to confirm your email/phone number.", + "SelfRegistrationDisabledMessage": "Self user registration is disabled for this application. Contact to the application administrator to register a new user.", + "Login": "Login", + "Cancel": "Cancel", + "Register": "Register", + "InvalidLoginRequest": "Invalid login request", + "ThereAreNoLoginSchemesConfiguredForThisClient": "There are no login schemes configured for this client.", + "LogInUsingYourProviderAccount": "Log in using your {0} account" } } \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/pl.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl.json similarity index 100% rename from modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/pl.json rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl.json diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/pt-BR.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json similarity index 100% rename from modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/pt-BR.json rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/tr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json similarity index 100% rename from modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/tr.json rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/vi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json similarity index 100% rename from modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/vi.json rename to modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json index c5ad813265..6aee740de6 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json @@ -1,5 +1,21 @@ -{ +{ "culture": "zh-Hans", "texts": { + "UserName": "用户名称", + "EmailAddress": "邮箱地址", + "UserNameOrEmailAddress": "用户名称或邮箱地址", + "Password": "密码", + "RememberMe": "记住我", + "UseAnotherServiceToLogin": "使用另一个服务登录", + "UserLockedOutMessage": "登录失败,用户账户已被锁定.请稍后再试.", + "InvalidUserNameOrPassword": "用户名或密码错误!", + "LoginIsNotAllowed": "无法登录!你需要验证邮箱地址/手机号.", + "SelfRegistrationDisabledMessage": "应用程序未开放注册,请联系管理员添加新用户.", + "Login": "登录", + "Cancel": "取消", + "Register": "注册", + "InvalidLoginRequest": "登录请求无效", + "ThereAreNoLoginSchemesConfiguredForThisClient": "没有为此客户端配置登录方案.", + "LogInUsingYourProviderAccount": "使用你的{0}帐户登录" } -} \ 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 e4e446dc8d..7f97cb7ee9 100644 --- a/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs +++ b/modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs @@ -1,6 +1,6 @@ using Localization.Resources.AbpUi; using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Account.Web.Localization; +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; diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/AccountResource.cs b/modules/account/src/Volo.Abp.Account.Web/Localization/AccountResource.cs deleted file mode 100644 index cb3b542887..0000000000 --- a/modules/account/src/Volo.Abp.Account.Web/Localization/AccountResource.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Volo.Abp.Localization; - -namespace Volo.Abp.Account.Web.Localization -{ - [LocalizationResourceName("AbpAccount")] - public class AccountResource - { - - } -} diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/en.json b/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/en.json deleted file mode 100644 index 892e60f89e..0000000000 --- a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/en.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "culture": "en", - "texts": { - "UserName": "User name", - "EmailAddress": "Email address", - "UserNameOrEmailAddress": "User name or email address", - "Password": "Password", - "RememberMe": "Remember me", - "UseAnotherServiceToLogin": "Use another service to log in", - "UserLockedOutMessage": "The user account has been locked out due to invalid login attempts. Please wait a while and try again.", - "InvalidUserNameOrPassword": "Invalid username or password!", - "LoginIsNotAllowed": "You are not allowed to login! You need to confirm your email/phone number.", - "SelfRegistrationDisabledMessage": "Self user registration is disabled for this application. Contact to the application administrator to register a new user.", - "Login": "Login", - "Cancel": "Cancel", - "Register": "Register", - "InvalidLoginRequest": "Invalid login request", - "ThereAreNoLoginSchemesConfiguredForThisClient": "There are no login schemes configured for this client.", - "LogInUsingYourProviderAccount": "Log in using your {0} account" - } -} \ No newline at end of file diff --git a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json deleted file mode 100644 index 6aee740de6..0000000000 --- a/modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "culture": "zh-Hans", - "texts": { - "UserName": "用户名称", - "EmailAddress": "邮箱地址", - "UserNameOrEmailAddress": "用户名称或邮箱地址", - "Password": "密码", - "RememberMe": "记住我", - "UseAnotherServiceToLogin": "使用另一个服务登录", - "UserLockedOutMessage": "登录失败,用户账户已被锁定.请稍后再试.", - "InvalidUserNameOrPassword": "用户名或密码错误!", - "LoginIsNotAllowed": "无法登录!你需要验证邮箱地址/手机号.", - "SelfRegistrationDisabledMessage": "应用程序未开放注册,请联系管理员添加新用户.", - "Login": "登录", - "Cancel": "取消", - "Register": "注册", - "InvalidLoginRequest": "登录请求无效", - "ThereAreNoLoginSchemesConfiguredForThisClient": "没有为此客户端配置登录方案.", - "LogInUsingYourProviderAccount": "使用你的{0}帐户登录" - } -} diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPage.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPage.cs index bb7d011235..771776ae57 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPage.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPage.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc.Localization; using Microsoft.AspNetCore.Mvc.Razor.Internal; -using Volo.Abp.Account.Web.Localization; +using Volo.Abp.Account.Localization; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; namespace Volo.Abp.Account.Web.Pages.Account diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs index 8d621be79c..4a2751f21b 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs @@ -3,8 +3,7 @@ using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Localization; -using Volo.Abp.Account.Web.Localization; +using Volo.Abp.Account.Localization; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; using Volo.Abp.Identity; @@ -14,7 +13,11 @@ namespace Volo.Abp.Account.Web.Pages.Account { public SignInManager SignInManager { get; set; } public IdentityUserManager UserManager { get; set; } - public IStringLocalizer L { get; set; } + + protected AccountPageModel() + { + LocalizationResourceType = typeof(AccountResource); + } protected RedirectResult RedirectSafely(string returnUrl, string returnUrlHash = null) { diff --git a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj index 223b83610d..86706f28d5 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj +++ b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj @@ -18,13 +18,11 @@ - -