mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Translate signup page.
This commit is contained in:
parent
6fbdc556ac
commit
ef1995de4f
@ -168,7 +168,7 @@ class LoginPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="username"
|
||||
rules={[{ required: true, message: i18next.t("login:Please input your Username!") }]}
|
||||
rules={[{ required: true, message: i18next.t("login:Please input your username!") }]}
|
||||
>
|
||||
<Input
|
||||
prefix={<UserOutlined className="site-form-item-icon" />}
|
||||
@ -178,7 +178,7 @@ class LoginPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="password"
|
||||
rules={[{ required: true, message: i18next.t("login:Please input your Password!") }]}
|
||||
rules={[{ required: true, message: i18next.t("login:Please input your password!") }]}
|
||||
>
|
||||
<Input
|
||||
prefix={<LockOutlined className="site-form-item-icon" />}
|
||||
|
@ -17,6 +17,7 @@ import {Link} from "react-router-dom";
|
||||
import {Form, Input, Select, Checkbox, Button, Row, Col} from 'antd';
|
||||
import * as Setting from "../Setting";
|
||||
import * as AuthBackend from "./AuthBackend";
|
||||
import i18next from "i18next";
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
@ -105,12 +106,12 @@ class SignupPage extends React.Component {
|
||||
size="large"
|
||||
>
|
||||
<Form.Item
|
||||
name="name"
|
||||
label="Username"
|
||||
name="username"
|
||||
label={i18next.t("signup:Username")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input your username',
|
||||
message: i18next.t("login:Please input your username!"),
|
||||
whitespace: true,
|
||||
},
|
||||
]}
|
||||
@ -119,11 +120,11 @@ class SignupPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="displayName"
|
||||
label="Display name"
|
||||
label={i18next.t("general:Display name")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input your display name',
|
||||
message: i18next.t("signup:Please input your display name!"),
|
||||
whitespace: true,
|
||||
},
|
||||
]}
|
||||
@ -132,11 +133,11 @@ class SignupPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="affiliation"
|
||||
label="Affiliation"
|
||||
label={i18next.t("user:Affiliation")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input your affiliation',
|
||||
message: i18next.t("signup:Please input your affiliation!"),
|
||||
whitespace: true,
|
||||
},
|
||||
]}
|
||||
@ -145,15 +146,15 @@ class SignupPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="email"
|
||||
label="Email"
|
||||
label={i18next.t("general:Email")}
|
||||
rules={[
|
||||
{
|
||||
type: 'email',
|
||||
message: 'The input is not valid Email!',
|
||||
message: i18next.t("signup:The input is not valid Email!"),
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input your Email',
|
||||
message: i18next.t("signup:Please input your Email!"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
@ -161,11 +162,11 @@ class SignupPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="password"
|
||||
label="Password"
|
||||
label={i18next.t("general:Password")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input your password',
|
||||
message: i18next.t("login:Please input your password!"),
|
||||
},
|
||||
]}
|
||||
hasFeedback
|
||||
@ -174,13 +175,13 @@ class SignupPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="confirm"
|
||||
label="Confirm"
|
||||
label={i18next.t("signup:Confirm password")}
|
||||
dependencies={['password']}
|
||||
hasFeedback
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please confirm your password',
|
||||
message: i18next.t("signup:Please confirm your password!"),
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
validator(rule, value) {
|
||||
@ -188,7 +189,7 @@ class SignupPage extends React.Component {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
return Promise.reject('Your confirmed password is inconsistent with the password');
|
||||
return Promise.reject(i18next.t("signup:Your confirmed password is inconsistent with the password!"));
|
||||
},
|
||||
}),
|
||||
]}
|
||||
@ -197,11 +198,11 @@ class SignupPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="phone"
|
||||
label="Phone number"
|
||||
label={i18next.t("general:Phone")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: 'Please confirm your phone number',
|
||||
message: i18next.t("signup:Please input your phone number!"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
@ -214,19 +215,19 @@ class SignupPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item name="agreement" valuePropName="checked" {...tailFormItemLayout}>
|
||||
<Checkbox>
|
||||
Accept
|
||||
{i18next.t("signup:Accept")}
|
||||
<Link to={"/agreement"}>
|
||||
Terms of Use
|
||||
{i18next.t("signup:Terms of Use")}
|
||||
</Link>
|
||||
</Checkbox>
|
||||
</Form.Item>
|
||||
<Form.Item {...tailFormItemLayout}>
|
||||
<Button type="primary" htmlType="submit">
|
||||
Sign Up
|
||||
{i18next.t("account:Sign Up")}
|
||||
</Button>
|
||||
Have account?
|
||||
{i18next.t("signup:Have account?")}
|
||||
<Link to={"/login"}>
|
||||
sign in now
|
||||
{i18next.t("signup:sign in now")}
|
||||
</Link>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
@ -30,11 +30,27 @@
|
||||
"Applications that requires authentication": "Applications that requires authentication",
|
||||
"Swagger": "Swagger"
|
||||
},
|
||||
"signup":
|
||||
{
|
||||
"Username": "Username",
|
||||
"Please input your display name!": "Please input your display name!",
|
||||
"Please input your affiliation!": "Please input your affiliation!",
|
||||
"The input is not valid Email!": "The input is not valid Email!",
|
||||
"Please input your Email!": "Please input your Email!",
|
||||
"Confirm password": "Confirm password",
|
||||
"Please confirm your password!": "Please confirm your password!",
|
||||
"Your confirmed password is inconsistent with the password!": "Your confirmed password is inconsistent with the password!",
|
||||
"Please input your phone number!": "Please input your phone number!",
|
||||
"Accept": "Accept",
|
||||
"Terms of Use": "Terms of Use",
|
||||
"Have account?": "Have account?",
|
||||
"sign in now": "sign in now"
|
||||
},
|
||||
"login":
|
||||
{
|
||||
"Please input your Username!": "Please input your Username!",
|
||||
"Please input your username!": "Please input your username!",
|
||||
"username": "username",
|
||||
"Please input your Password!": "Please input your Password!",
|
||||
"Please input your password!": "Please input your password!",
|
||||
"password": "password",
|
||||
"Auto login": "Auto login",
|
||||
"Forgot password?": "Forgot password?",
|
||||
|
@ -30,11 +30,27 @@
|
||||
"Applications that requires authentication": "需要鉴权的应用",
|
||||
"Swagger": "API总览"
|
||||
},
|
||||
"signup":
|
||||
{
|
||||
"Username": "用户名",
|
||||
"Please input your display name!": "请输入您的姓名!",
|
||||
"Please input your affiliation!": "请输入您所在的工作单位!",
|
||||
"The input is not valid Email!": "您输入的电子邮箱格式错误!",
|
||||
"Please input your Email!": "请输入您的电子邮箱!",
|
||||
"Confirm password": "确认密码",
|
||||
"Please confirm your password!": "请再次确认您的密码!",
|
||||
"Your confirmed password is inconsistent with the password!": "您两次输入的密码不一致!",
|
||||
"Please input your phone number!": "请输入您的手机号码!",
|
||||
"Accept": "阅读并接受",
|
||||
"Terms of Use": "《用户协议》",
|
||||
"Have account?": "已有账号?",
|
||||
"sign in now": "立即登录"
|
||||
},
|
||||
"login":
|
||||
{
|
||||
"Please input your Username!": "请输入用户名!",
|
||||
"Please input your username!": "请输入您的用户名!",
|
||||
"username": "用户名",
|
||||
"Please input your Password!": "请输入密码!",
|
||||
"Please input your password!": "请输入您的密码!",
|
||||
"password": "密码",
|
||||
"Auto login": "下次自动登录",
|
||||
"Forgot password?": "忘记密码?",
|
||||
@ -72,7 +88,7 @@
|
||||
"Upload a photo": "上传头像",
|
||||
"Select a photo...": "选择图片...",
|
||||
"Set new profile picture": "设置新头像",
|
||||
"Affiliation": "单位",
|
||||
"Affiliation": "工作单位",
|
||||
"Tag": "标签",
|
||||
"Third-party logins": "第三方登录",
|
||||
"Link": "绑定",
|
||||
|
Loading…
x
Reference in New Issue
Block a user