From e0882a7c55f70e72bde07d5634a7e952e23353e5 Mon Sep 17 00:00:00 2001
From: michael <156257964@qq.com>
Date: Tue, 9 Oct 2018 19:17:54 +0800
Subject: [PATCH] Internationalization Login error message(#2507)
---
src/locales/en-US.js | 2 ++
src/locales/pt-BR.js | 2 ++
src/locales/zh-CN.js | 2 ++
src/locales/zh-TW.js | 2 ++
src/pages/User/Login.js | 4 ++--
5 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/locales/en-US.js b/src/locales/en-US.js
index 976debe7..802cf3cf 100644
--- a/src/locales/en-US.js
+++ b/src/locales/en-US.js
@@ -108,6 +108,8 @@ export default {
'menu.account.settings': 'Account Settings',
'menu.account.trigger': 'Trigger Error',
'menu.account.logout': 'Logout',
+ 'app.login.message-invalid-credentials': 'Invalid username or password(admin/888888)',
+ 'app.login.message-invalid-verification-code': 'Invalid verification code',
'app.login.tab-login-credentials': 'Credentials',
'app.login.tab-login-mobile': 'Mobile number',
'app.login.remember-me': 'Remember me',
diff --git a/src/locales/pt-BR.js b/src/locales/pt-BR.js
index 26abcc7c..df223dbc 100644
--- a/src/locales/pt-BR.js
+++ b/src/locales/pt-BR.js
@@ -75,6 +75,8 @@ export default {
'menu.account.settings': 'Configurar Conta',
'menu.account.trigger': 'Disparar Erro',
'menu.account.logout': 'Sair',
+ 'app.login.message-invalid-credentials': 'Nome de usuário ou senha inválidosd(admin/888888)',
+ 'app.login.message-invalid-verification-code': 'Código de verificação inválido',
'app.login.tab-login-credentials': 'Credenciais',
'app.login.tab-login-mobile': 'Telefone',
'app.login.remember-me': 'Lembre-me',
diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js
index 0af54248..9e1df4b4 100644
--- a/src/locales/zh-CN.js
+++ b/src/locales/zh-CN.js
@@ -106,6 +106,8 @@ export default {
'menu.account.settings': '个人设置',
'menu.account.trigger': '触发报错',
'menu.account.logout': '退出登录',
+ 'app.login.message-invalid-credentials': '账户或密码错误(admin/888888)',
+ 'app.login.message-invalid-verification-code': '验证码错误',
'app.login.tab-login-credentials': '账户密码登录',
'app.login.tab-login-mobile': '手机号登录',
'app.login.remember-me': '自动登录',
diff --git a/src/locales/zh-TW.js b/src/locales/zh-TW.js
index e7def9d7..40597020 100644
--- a/src/locales/zh-TW.js
+++ b/src/locales/zh-TW.js
@@ -106,6 +106,8 @@ export default {
'menu.account.settings': '個人設置',
'menu.account.trigger': '觸發報錯',
'menu.account.logout': '退出登錄',
+ 'app.login.message-invalid-credentials': '賬戶或密碼錯誤(admin/888888)',
+ 'app.login.message-invalid-verification-code': '驗證碼錯誤',
'app.login.tab-login-credentials': '賬戶密碼登錄',
'app.login.tab-login-mobile': '手機號登錄',
'app.login.remember-me': '自動登錄',
diff --git a/src/pages/User/Login.js b/src/pages/User/Login.js
index 6fa13b35..3dd60797 100644
--- a/src/pages/User/Login.js
+++ b/src/pages/User/Login.js
@@ -80,7 +80,7 @@ class LoginPage extends Component {
{login.status === 'error' &&
login.type === 'account' &&
!submitting &&
- this.renderMessage('账户或密码错误(admin/888888)')}
+ this.renderMessage(formatMessage({ id: 'app.message-login.invalid-credentials' }))}
--
GitLab