From 9a34640ae1965624f3b7b684b7b90d0fe5929a46 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Thu, 3 Apr 2025 09:37:03 +0800 Subject: [PATCH] feat: update text in password-related components to English --- .../antd/password/Password.tsx | 2 +- .../src/client/pages/ForgotPasswordPage.tsx | 6 +++--- .../src/client/pages/ResetPasswordPage.tsx | 20 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/password/Password.tsx b/packages/core/client/src/schema-component/antd/password/Password.tsx index 44431d3197..ca48fcaa90 100644 --- a/packages/core/client/src/schema-component/antd/password/Password.tsx +++ b/packages/core/client/src/schema-component/antd/password/Password.tsx @@ -36,7 +36,7 @@ export const Password = connect( - {showForgotPassword ? : null} + {showForgotPassword ? : null} {checkStrength && ( diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/pages/ForgotPasswordPage.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/pages/ForgotPasswordPage.tsx index c0a0af296e..1583776abc 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/pages/ForgotPasswordPage.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/pages/ForgotPasswordPage.tsx @@ -12,7 +12,7 @@ const getForgotPasswordForm = (): ISchema => ({ email: { type: 'string', 'x-component': 'Input', - title: '{{t("重置密码")}}', + title: '{{t("Reset password")}}', required: true, 'x-validator': `{{(value) => { if (!value) { @@ -30,7 +30,7 @@ const getForgotPasswordForm = (): ISchema => ({ 'x-component': 'div', properties: { submit: { - title: '{{t("发送重置邮件")}}', + title: '{{t("Send reset email")}}', type: 'void', 'x-component': 'Action', 'x-component-props': { @@ -59,7 +59,7 @@ const getForgotPasswordForm = (): ISchema => ({ 'x-component-props': { to: '/signin', }, - 'x-content': '{{t("返回登录")}}', + 'x-content': '{{t("Back to login")}}', }, }, }); diff --git a/packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx b/packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx index 1831244be7..9e75c8ea8f 100644 --- a/packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx +++ b/packages/plugins/@nocobase/plugin-auth/src/client/pages/ResetPasswordPage.tsx @@ -12,24 +12,24 @@ const getResetPasswordForm = (): ISchema => ({ password: { type: 'string', 'x-component': 'Password', - title: '{{t("新密码")}}', + title: '{{t("New password")}}', required: true, 'x-decorator': 'FormItem', - 'x-component-props': { placeholder: '{{t("请输入新密码")}}' }, + 'x-component-props': { placeholder: '{{t("Please enter new password")}}' }, }, confirmPassword: { type: 'string', 'x-component': 'Password', - title: '{{t("确认密码")}}', + title: '{{t("Confirm password")}}', required: true, 'x-decorator': 'FormItem', - 'x-component-props': { placeholder: '{{t("请再次输入相同的密码")}}' }, + 'x-component-props': { placeholder: '{{t("Please enter the same password again")}}' }, 'x-validator': `{{(value, rules, {form}) => { if (!value) { return ''; } if (value !== form.values.password) { - return t("两次输入的密码不一致"); + return t("The passwords entered twice are inconsistent"); } }}}`, }, @@ -38,7 +38,7 @@ const getResetPasswordForm = (): ISchema => ({ 'x-component': 'div', properties: { submit: { - title: '{{t("确认")}}', + title: '{{t("Confirm")}}', type: 'void', 'x-component': 'Action', 'x-component-props': { @@ -54,7 +54,7 @@ const getResetPasswordForm = (): ISchema => ({ async run() { await form.submit(); await api.auth.resetPassword({ ...form.values, resetToken }); - message.success(t("密码重置成功")); + message.success(t("Password reset successful")); setTimeout(() => { window.location.href = '/signin'; }, 1000); @@ -71,7 +71,7 @@ const getResetPasswordForm = (): ISchema => ({ 'x-component-props': { to: '/signin', }, - 'x-content': '{{t("去登录")}}', + 'x-content': '{{t("Go to login")}}', }, }, }); @@ -94,8 +94,8 @@ export const ResetPasswordPage = () => { if (!resetToken || expired) { return navigate('/signin')}>去登录} + title="Reset link has expired" + extra={} />; }