Remove redundant localization.

pull/12084/head
maliming 4 years ago
parent c57d2bceee
commit 6953e9c8a4
No known key found for this signature in database
GPG Key ID: 096224957E51C89E

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Primitives;
using OpenIddict.Abstractions;
using OpenIddict.Server.AspNetCore;
@ -61,7 +62,7 @@ public class AuthorizeController : AbpOpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.LoginRequired,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheUserIsNotLoggedIn"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The user is not logged in."
}));
}
@ -100,7 +101,7 @@ public class AuthorizeController : AbpOpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheLoggedInUserIsNotAllowedToAccessThisClientApplication"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The logged in user is not allowed to access this client application."
}));
// If the consent is implicit or if an authorization was found,
@ -144,7 +145,7 @@ public class AuthorizeController : AbpOpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["InteractiveUserConsentIsRequired"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "Interactive user consent is required."
}));
// In every other case, render the consent form.
@ -189,7 +190,7 @@ public class AuthorizeController : AbpOpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.ConsentRequired,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheLoggedInUserIsNotAllowedToAccessThisClientApplication"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The logged in user is not allowed to access this client application."
}));
}

@ -26,7 +26,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheTokenIsNoLongerValid"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The token is no longer valid."
}));
}
@ -38,7 +38,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheUserIsNoLongerAllowedToSignIn"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The user is no longer allowed to sign in."
}));
}

@ -26,7 +26,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheTokenIsNoLongerValid"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The token is no longer valid."
}));
}
@ -38,7 +38,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheUserIsNoLongerAllowedToSignIn"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The user is no longer allowed to sign in."
}));
}

@ -75,7 +75,7 @@ public partial class TokenController
var properties = new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["InvalidUsername"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "Invalid username or password!"
});
await IdentitySecurityLogManager.SaveAsync(new IdentitySecurityLogContext()
@ -96,17 +96,17 @@ public partial class TokenController
if (result.IsLockedOut)
{
Logger.LogInformation("Authentication failed for username: {username}, reason: locked out", request.Username);
errorDescription = L["UserLockedOut"];
errorDescription = "The user account has been locked out due to invalid login attempts. Please wait a while and try again.";
}
else if (result.IsNotAllowed)
{
Logger.LogInformation("Authentication failed for username: {username}, reason: not allowed", request.Username);
errorDescription = L["LoginIsNotAllowed"];
errorDescription = "You are not allowed to login! Your account is inactive or needs to confirm your email/phone number.";
}
else
{
Logger.LogInformation("Authentication failed for username: {username}, reason: invalid credentials", request.Username);
errorDescription = L["InvalidUserNameOrPassword"];
errorDescription = "Invalid username or password!";
}
var properties = new AuthenticationProperties(new Dictionary<string, string>
@ -175,7 +175,7 @@ public partial class TokenController
var properties = new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["InvalidAuthenticatorCode"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "Invalid authenticator code!"
});
return Forbid(properties, OpenIddictServerAspNetCoreDefaults.AuthenticationScheme);

@ -26,7 +26,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheTokenIsNoLongerValid"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The token is no longer valid."
}));
}
@ -38,7 +38,7 @@ public partial class TokenController
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidGrant,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheUserIsNoLongerAllowedToSignIn"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The user is no longer allowed to sign in."
}));
}

@ -27,7 +27,7 @@ public class UserInfoController : AbpOpenIdDictControllerBase
properties: new AuthenticationProperties(new Dictionary<string, string>
{
[OpenIddictServerAspNetCoreConstants.Properties.Error] = OpenIddictConstants.Errors.InvalidToken,
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = L["TheSpecifiedAccessTokenIsBoundToAnAccountThatNoLongerExists"]
[OpenIddictServerAspNetCoreConstants.Properties.ErrorDescription] = "The specified access token is bound to an account that no longer exists."
}));
}

@ -1,23 +1,11 @@
{
"culture": "en",
"texts": {
"UserLockedOut": "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! Your account is inactive or needs to confirm your email/phone number.",
"InvalidUsername": "Invalid username or password!",
"InvalidAuthenticatorCode": "Invalid authenticator code!",
"TheTargetUserIsNotLinkedToYou": "The target user is not linked to you!",
"TheOpenIDConnectRequestCannotBeRetrieved": "The OpenID Connect request cannot be retrieved.",
"TheUserDetailsCannotBbeRetrieved" : "The user details cannot be retrieved.",
"TheApplicationDetailsCannotBeFound": "The application details cannot be found.",
"DetailsConcerningTheCallingClientApplicationCannotBeFound": "Details concerning the calling client application cannot be found.",
"TheSpecifiedGrantTypeIsNotImplemented.": "The specified grant type {0} is not implemented.",
"TheUserIsNotLoggedIn": "The user is not logged in.",
"TheLoggedInUserIsNotAllowedToAccessThisClientApplication": "The logged in user is not allowed to access this client application.",
"TheTokenIsNoLongerValid": "The token is no longer valid.",
"InteractiveUserConsentIsRequired": "Interactive user consent is required.",
"TheUserIsNoLongerAllowedToSignIn": "The user is no longer allowed to sign in.",
"TheSpecifiedAccessTokenIsBoundToAnAccountThatNoLongerExists": "The specified access token is bound to an account that no longer exists.",
"Authorization": "Authorization",
"DoYouWantToGrantAccessToYourData": "Do you want to grant {0} access to your data?",
"ScopesRequested": "Scopes requested",

@ -1,11 +1,15 @@
{
"culture": "tr",
"texts": {
"UserLockedOut": "Kullanıcı hesabı hatalı giriş denemeleri nedeniyle kilitlenmiştir. Lütfen bir süre bekleyip tekrar deneyin.",
"InvalidUserNameOrPassword": "Kullanıcı adı ya da şifre geçersiz!",
"LoginIsNotAllowed": "Giriş yapmanıza izin verilmiyor! Hesabınız etkin değil veya e-postanızı/telefon numaranızı onaylamanız gerekiyor.",
"InvalidUsername": "Kullanıcı adı ya da şifre geçersiz!",
"InvalidAuthenticatorCode": "Geçersiz kimlik doğrulama kodu!",
"TheTargetUserIsNotLinkedToYou": "Hedef kullanıcı sizinle bağlantılı değil!"
"TheOpenIDConnectRequestCannotBeRetrieved": "OpenID Connect isteği alınamıyor.",
"TheUserDetailsCannotBbeRetrieved" : "Kullanıcı ayrıntıları alınamıyor.",
"TheApplicationDetailsCannotBeFound": "Başvuru detayları bulunamadı.",
"DetailsConcerningTheCallingClientApplicationCannotBeFound": "Çağıran istemci uygulamasıyla ilgili ayrıntılar bulunamıyor.",
"TheSpecifiedGrantTypeIsNotImplemented.": "Belirtilen hibe türü {0} uygulanmadı.",
"Authorization": "Yetki",
"DoYouWantToGrantAccessToYourData": "Do you want to grant {0} access to your data?",
"ScopesRequested": "İstenen kapsamlar",
"LogOut": ıkış Yap",
"AreYouSureYouWantToSignOut": ıkış yapmak istediğinden emin misin?"
}
}
}

@ -1,23 +1,11 @@
{
"culture": "zh-Hans",
"texts": {
"UserLockedOut": "登录失败,用户账户已被锁定.请稍后再试.",
"InvalidUserNameOrPassword": "用户名或密码错误!",
"LoginIsNotAllowed": "无法登录!你的账号未激活或者需要验证邮箱地址/手机号.",
"InvalidUsername": "用户名或密码错误!",
"InvalidAuthenticatorCode": "验证码无效!",
"TheTargetUserIsNotLinkedToYou": "目标用户未和你有关联!",
"TheOpenIDConnectRequestCannotBeRetrieved": "无法检索 OpenID Connect 请求.",
"TheUserDetailsCannotBbeRetrieved" : "无法检索用户详细信息.",
"TheApplicationDetailsCannotBeFound": "找不到应用详情.",
"DetailsConcerningTheCallingClientApplicationCannotBeFound": "找不到有关调用客户端应用程序的详细信息.",
"TheSpecifiedGrantTypeIsNotImplemented.": "未实施指定的授权类型 {0}.",
"TheUserIsNotLoggedIn": "用户未登录.",
"TheLoggedInUserIsNotAllowedToAccessThisClientApplication": "登录的用户不允许访问此客户端应用程序.",
"TheTokenIsNoLongerValid": "令牌不再有效.",
"InteractiveUserConsentIsRequired": "需要交互式用户同意.",
"TheUserIsNoLongerAllowedToSignIn": "不再允许用户登录.",
"TheSpecifiedAccessTokenIsBoundToAnAccountThatNoLongerExists": "指定的访问令牌绑定到不再存在的帐户.",
"Authorization": "授权",
"DoYouWantToGrantAccessToYourData": "是否要授予 {0} 访问你的数据的权限?",
"ScopesRequested": "要求的Scope",

@ -1,22 +1,11 @@
{
"culture": "zh-Hant",
"texts": {
"UserLockedOut": "登錄失敗,用戶賬戶已被鎖定.請稍後再試.",
"InvalidUserNameOrPassword": "用戶名或密碼錯誤!",
"LoginIsNotAllowed": "無法登入!你的賬號未激活或者需要驗證郵箱地址/手機號碼.",
"InvalidUsername": "用戶名或密碼錯誤!",
"InvalidAuthenticatorCode": "驗證碼無效!",
"TheTargetUserIsNotLinkedToYou": "目標用戶與您無關!",
"TheOpenIDConnectRequestCannotBeRetrieved": "無法檢索 OpenID Connect 請求.",
"TheUserDetailsCannotBbeRetrieved" : "無法檢索用戶詳細信息.",
"TheApplicationDetailsCannotBeFound": "找不到應用詳情.",
"DetailsConcerningTheCallingClientApplicationCannotBeFound": "找不到有關調用客戶端應用程序的詳細信息.",
"TheSpecifiedGrantTypeIsNotImplemented.": "未實施指定的授權類型 {0}.",
"TheUserIsNotLoggedIn": "用戶未登錄.",
"TheLoggedInUserIsNotAllowedToAccessThisClientApplication": "登錄的用戶不允許訪問此客戶端應用程序.",
"TheTokenIsNoLongerValid": "令牌不再有效.",
"InteractiveUserConsentIsRequired": "需要交互式用戶同意.",
"TheUserIsNoLongerAllowedToSignIn": "不再允許用戶登錄.",
"TheSpecifiedAccessTokenIsBoundToAnAccountThatNoLongerExists": "指定的訪問令牌綁定到不再存在的帳戶.",
"Authorization": "授權",
"DoYouWantToGrantAccessToYourData": "是否要授予 {0} 訪問你的數據的權限?",

Loading…
Cancel
Save