Move localization files to application.contracts.

pull/1561/head
Halil İbrahim Kalkan 6 years ago
parent 8650b519b5
commit 31b7622a12

@ -11,11 +11,7 @@
<ItemGroup>
<EmbeddedResource Include="Volo\Abp\Account\Localization\Resources\*.json" />
</ItemGroup>
<ItemGroup>
<None Remove="Volo\Abp\Account\Localization\Resources\en.json" />
<None Remove="Volo\Abp\Account\Localization\Resources\zh-Hans.json" />
<Content Remove="Volo\Abp\Account\Localization\Resources\*.json" />
</ItemGroup>
<ItemGroup>

@ -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"
}
}

@ -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}帐户登录"
}
}
}

@ -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;

@ -1,10 +0,0 @@
using Volo.Abp.Localization;
namespace Volo.Abp.Account.Web.Localization
{
[LocalizationResourceName("AbpAccount")]
public class AccountResource
{
}
}

@ -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"
}
}

@ -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}帐户登录"
}
}

@ -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

@ -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<IdentityUser> SignInManager { get; set; }
public IdentityUserManager UserManager { get; set; }
public IStringLocalizer<AccountResource> L { get; set; }
protected AccountPageModel()
{
LocalizationResourceType = typeof(AccountResource);
}
protected RedirectResult RedirectSafely(string returnUrl, string returnUrlHash = null)
{

@ -18,13 +18,11 @@
<ItemGroup>
<EmbeddedResource Include="Modules\**\*.*" Exclude="*.cs" />
<EmbeddedResource Include="Pages\**\*.*" Exclude="*.cs" />
<EmbeddedResource Include="Localization\**\*.json" />
</ItemGroup>
<ItemGroup>
<Content Remove="Modules\**\*.cshtml" />
<Content Remove="Pages\**\*.cshtml" />
<Content Remove="Localization\**\*.json" />
<Content Remove="Properties\launchSettings.json" />
<None Include="Properties\launchSettings.json" />
</ItemGroup>

Loading…
Cancel
Save