Browse Source

Move localization files to application.contracts.

pull/1561/head
Halil İbrahim Kalkan 7 years ago
parent
commit
31b7622a12
  1. 6
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj
  2. 0
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json
  3. 18
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json
  4. 0
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl.json
  5. 0
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json
  6. 0
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json
  7. 0
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json
  8. 20
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json
  9. 2
      modules/account/src/Volo.Abp.Account.Web/AbpAccountWebModule.cs
  10. 10
      modules/account/src/Volo.Abp.Account.Web/Localization/AccountResource.cs
  11. 21
      modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/en.json
  12. 21
      modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json
  13. 2
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPage.cs
  14. 9
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs
  15. 2
      modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj

6
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo.Abp.Account.Application.Contracts.csproj

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

0
modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/cs.json → modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json

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

0
modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/pl.json → modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl.json

0
modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/pt-BR.json → modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json

0
modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/tr.json → modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json

0
modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/vi.json → modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json

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

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

10
modules/account/src/Volo.Abp.Account.Web/Localization/AccountResource.cs

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

21
modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/en.json

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

21
modules/account/src/Volo.Abp.Account.Web/Localization/Resources/AbpAccount/Web/zh-Hans.json

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

2
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

9
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<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)
{

2
modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj

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