mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 23:49:27 +08:00
feat: update text in password-related components to English
This commit is contained in:
parent
555da204b7
commit
9a34640ae1
@ -36,7 +36,7 @@ export const Password = connect(
|
||||
<span className={className}>
|
||||
<Space.Compact block>
|
||||
<Input.Password {...others} value={value} />
|
||||
{showForgotPassword ? <Button onClick={() => navigate('/forgot-password')}>忘记密码?</Button> : null}
|
||||
{showForgotPassword ? <Button onClick={() => navigate('/forgot-password')}>Forgot password?</Button> : null}
|
||||
</Space.Compact>
|
||||
{checkStrength && (
|
||||
<PasswordStrength value={value}>
|
||||
|
@ -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")}}',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
@ -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 <Result
|
||||
status="403"
|
||||
title="重置链接已失效"
|
||||
extra={<Button type="primary" onClick={() => navigate('/signin')}>去登录</Button>}
|
||||
title="Reset link has expired"
|
||||
extra={<Button type="primary" onClick={() => navigate('/signin')}>Go to login</Button>}
|
||||
/>;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user