mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Merge pull request #117 from turbodog03/turbodog03
fix: improve i18n and add some translation
This commit is contained in:
@ -40,7 +40,7 @@ export const ResetModal = (props) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (code === "") {
|
if (code === "") {
|
||||||
Setting.showMessage("error", i18next.t("user:Empty Code"));
|
Setting.showMessage("error", i18next.t("code:Empty Code"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setConfirmLoading(true);
|
setConfirmLoading(true);
|
||||||
@ -85,9 +85,9 @@ export const ResetModal = (props) => {
|
|||||||
</Row>
|
</Row>
|
||||||
<Row style={{width: "100%", marginBottom: "20px"}}>
|
<Row style={{width: "100%", marginBottom: "20px"}}>
|
||||||
<CountDownInput
|
<CountDownInput
|
||||||
defaultButtonText={i18next.t("user:Send code")}
|
defaultButtonText={i18next.t("code:Send code")}
|
||||||
textBefore={i18next.t("user:Code You Received")}
|
textBefore={i18next.t("code:Code You Received")}
|
||||||
placeHolder={i18next.t("user:Enter your code")}
|
placeHolder={i18next.t("code:Enter your code")}
|
||||||
onChange={setCode}
|
onChange={setCode}
|
||||||
onButtonClick={UserBackend.sendCode}
|
onButtonClick={UserBackend.sendCode}
|
||||||
onButtonClickArgs={[dest, destType, org?.owner + "/" + org?.name]}
|
onButtonClickArgs={[dest, destType, org?.owner + "/" + org?.name]}
|
||||||
|
@ -111,7 +111,7 @@ class TokenListPage extends React.Component {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Application"),
|
title: i18next.t("general:Application"),
|
||||||
dataIndex: 'application',
|
dataIndex: 'application',
|
||||||
key: 'application',
|
key: 'application',
|
||||||
width: '120px',
|
width: '120px',
|
||||||
@ -125,7 +125,7 @@ class TokenListPage extends React.Component {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Organization"),
|
title: i18next.t("general:Organization"),
|
||||||
dataIndex: 'organization',
|
dataIndex: 'organization',
|
||||||
key: 'organization',
|
key: 'organization',
|
||||||
width: '120px',
|
width: '120px',
|
||||||
@ -139,7 +139,7 @@ class TokenListPage extends React.Component {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:User"),
|
title: i18next.t("general:User"),
|
||||||
dataIndex: 'user',
|
dataIndex: 'user',
|
||||||
key: 'user',
|
key: 'user',
|
||||||
width: '120px',
|
width: '120px',
|
||||||
@ -153,7 +153,7 @@ class TokenListPage extends React.Component {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Authorization code"),
|
title: i18next.t("general:Authorization code"),
|
||||||
dataIndex: 'code',
|
dataIndex: 'code',
|
||||||
key: 'code',
|
key: 'code',
|
||||||
// width: '150px',
|
// width: '150px',
|
||||||
@ -163,7 +163,7 @@ class TokenListPage extends React.Component {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Access token"),
|
title: i18next.t("general:Access token"),
|
||||||
dataIndex: 'accessToken',
|
dataIndex: 'accessToken',
|
||||||
key: 'accessToken',
|
key: 'accessToken',
|
||||||
// width: '150px',
|
// width: '150px',
|
||||||
@ -174,14 +174,14 @@ class TokenListPage extends React.Component {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Expires in"),
|
title: i18next.t("general:Expires in"),
|
||||||
dataIndex: 'expiresIn',
|
dataIndex: 'expiresIn',
|
||||||
key: 'expiresIn',
|
key: 'expiresIn',
|
||||||
width: '120px',
|
width: '120px',
|
||||||
sorter: (a, b) => a.expiresIn - b.expiresIn,
|
sorter: (a, b) => a.expiresIn - b.expiresIn,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: i18next.t("token:Scope"),
|
title: i18next.t("general:Scope"),
|
||||||
dataIndex: 'scope',
|
dataIndex: 'scope',
|
||||||
key: 'scope',
|
key: 'scope',
|
||||||
width: '100px',
|
width: '100px',
|
||||||
|
@ -217,7 +217,7 @@ class ForgetPage extends React.Component {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
prefix={<UserOutlined />}
|
prefix={<UserOutlined />}
|
||||||
placeholder={i18next.t("signup:username, Email or phone")}
|
placeholder={i18next.t("login:username, Email or phone")}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<br />
|
<br />
|
||||||
@ -311,7 +311,7 @@ class ForgetPage extends React.Component {
|
|||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: i18next.t(
|
message: i18next.t(
|
||||||
"forget:Please input your verification code!"
|
"code:Please input your verification code!"
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -319,8 +319,8 @@ class ForgetPage extends React.Component {
|
|||||||
{this.state.verifyType === "email" ? (
|
{this.state.verifyType === "email" ? (
|
||||||
<CountDownInput
|
<CountDownInput
|
||||||
disabled={this.state.username === "" || this.state.verifyType === ""}
|
disabled={this.state.username === "" || this.state.verifyType === ""}
|
||||||
placeHolder={i18next.t("forget:Verify code")}
|
placeHolder={i18next.t("code:Verify code")}
|
||||||
defaultButtonText={i18next.t("user:Send code")}
|
defaultButtonText={i18next.t("code:Send code")}
|
||||||
onButtonClick={UserBackend.sendCode}
|
onButtonClick={UserBackend.sendCode}
|
||||||
onButtonClickArgs={[
|
onButtonClickArgs={[
|
||||||
this.state.email,
|
this.state.email,
|
||||||
@ -334,8 +334,8 @@ class ForgetPage extends React.Component {
|
|||||||
) : (
|
) : (
|
||||||
<CountDownInput
|
<CountDownInput
|
||||||
disabled={this.state.username === "" || this.state.verifyType === ""}
|
disabled={this.state.username === "" || this.state.verifyType === ""}
|
||||||
placeHolder={i18next.t("forget:Verify code")}
|
placeHolder={i18next.t("code:Verify code")}
|
||||||
defaultButtonText={i18next.t("User:Send code")}
|
defaultButtonText={i18next.t("code:Send code")}
|
||||||
onButtonClick={UserBackend.sendCode}
|
onButtonClick={UserBackend.sendCode}
|
||||||
onButtonClickArgs={[
|
onButtonClickArgs={[
|
||||||
this.state.phone,
|
this.state.phone,
|
||||||
|
@ -163,7 +163,7 @@ class SignupPage extends React.Component {
|
|||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: required,
|
required: required,
|
||||||
message: i18next.t("login:Please input your username!"),
|
message: i18next.t("forget:Please input your username!"),
|
||||||
whitespace: true,
|
whitespace: true,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
@ -224,14 +224,14 @@ class SignupPage extends React.Component {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="emailCode"
|
name="emailCode"
|
||||||
label={i18next.t("signup:Email code")}
|
label={i18next.t("code:Email code")}
|
||||||
rules={[{
|
rules={[{
|
||||||
required: required,
|
required: required,
|
||||||
message: i18next.t("signup:Please input your verification code!"),
|
message: i18next.t("code:Please input your verification code!"),
|
||||||
}]}
|
}]}
|
||||||
>
|
>
|
||||||
<CountDownInput
|
<CountDownInput
|
||||||
defaultButtonText={i18next.t("user:Send code")}
|
defaultButtonText={i18next.t("code:Send code")}
|
||||||
onButtonClick={UserBackend.sendCode}
|
onButtonClick={UserBackend.sendCode}
|
||||||
onButtonClickArgs={[this.state.email, "email", application?.organizationObj.owner + "/" + application?.organizationObj.name]}
|
onButtonClickArgs={[this.state.email, "email", application?.organizationObj.owner + "/" + application?.organizationObj.name]}
|
||||||
coolDownTime={60}
|
coolDownTime={60}
|
||||||
@ -304,16 +304,16 @@ class SignupPage extends React.Component {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="phoneCode"
|
name="phoneCode"
|
||||||
label={i18next.t("signup:Phone code")}
|
label={i18next.t("code:Phone code")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: required,
|
required: required,
|
||||||
message: i18next.t("signup:Please input your phone verification code!"),
|
message: i18next.t("code:Please input your phone verification code!"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<CountDownInput
|
<CountDownInput
|
||||||
defaultButtonText={i18next.t("user:Send code")}
|
defaultButtonText={i18next.t("code:Send code")}
|
||||||
onButtonClick={UserBackend.sendCode}
|
onButtonClick={UserBackend.sendCode}
|
||||||
onButtonClickArgs={[this.state.phone, "phone", application.organizationObj.owner + "/" + application.organizationObj.name]}
|
onButtonClickArgs={[this.state.phone, "phone", application.organizationObj.owner + "/" + application.organizationObj.name]}
|
||||||
coolDownTime={60}
|
coolDownTime={60}
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
"Organizations": "Organizations",
|
"Organizations": "Organizations",
|
||||||
"Providers": "Providers",
|
"Providers": "Providers",
|
||||||
"Users": "Users",
|
"Users": "Users",
|
||||||
|
"User": "User",
|
||||||
"Applications": "Applications",
|
"Applications": "Applications",
|
||||||
|
"Application": "Application",
|
||||||
"Save": "Save",
|
"Save": "Save",
|
||||||
"Add": "Add",
|
"Add": "Add",
|
||||||
"Action": "Action",
|
"Action": "Action",
|
||||||
@ -35,7 +37,11 @@
|
|||||||
"Applications that requires authentication": "Applications that requires authentication",
|
"Applications that requires authentication": "Applications that requires authentication",
|
||||||
"Swagger": "Swagger",
|
"Swagger": "Swagger",
|
||||||
"Phone Prefix": "Phone Prefix",
|
"Phone Prefix": "Phone Prefix",
|
||||||
"Enter the code": "Enter the code"
|
"Enter the code": "Enter the code",
|
||||||
|
"Authorization code":"Authorization code",
|
||||||
|
"Access token":"Access token",
|
||||||
|
"Expires in":"Expires in",
|
||||||
|
"Scope":"Scope"
|
||||||
},
|
},
|
||||||
"signup":
|
"signup":
|
||||||
{
|
{
|
||||||
@ -56,7 +62,21 @@
|
|||||||
"sign in now": "sign in now",
|
"sign in now": "sign in now",
|
||||||
"Your account has been created!": "Your account has been created!",
|
"Your account has been created!": "Your account has been created!",
|
||||||
"Please click the below button to sign in": "Please click the below button to sign in",
|
"Please click the below button to sign in": "Please click the below button to sign in",
|
||||||
"code sent": "code sent",
|
"Missing parameter.": "Missing parameter."
|
||||||
|
},
|
||||||
|
"code":
|
||||||
|
{
|
||||||
|
"Verify code": "Verify code",
|
||||||
|
"Please input your verification code!": "Please input your verification code!",
|
||||||
|
"Send code": "Send code",
|
||||||
|
"Empty Code": "Empty Code",
|
||||||
|
"Code Sent": "Code Sent",
|
||||||
|
"Code You Received": "Code You Received",
|
||||||
|
"Enter your code": "Enter your code",
|
||||||
|
"You can only send one code in 60s.": "You can only send one code in 60s.",
|
||||||
|
"Code has not been sent yet!": "Code has not been sent yet!",
|
||||||
|
"You should verify your code in 5 min!": "You should verify your code in 5 min!",
|
||||||
|
"Wrong code!": "Wrong code!",
|
||||||
"Email code": "Email code",
|
"Email code": "Email code",
|
||||||
"Phone code": "Phone code",
|
"Phone code": "Phone code",
|
||||||
"PhoneCode has not been sent yet!": "Phone code has not been sent yet!",
|
"PhoneCode has not been sent yet!": "Phone code has not been sent yet!",
|
||||||
@ -151,23 +171,14 @@
|
|||||||
"input password": "input password",
|
"input password": "input password",
|
||||||
"Reset Email...": "Reset Email...",
|
"Reset Email...": "Reset Email...",
|
||||||
"Reset Phone...": "Reset Phone...",
|
"Reset Phone...": "Reset Phone...",
|
||||||
"Send code": "Send code",
|
|
||||||
"Empty email": "Empty Email",
|
"Empty email": "Empty Email",
|
||||||
"Empty phone": "Empty Phone",
|
"Empty phone": "Empty Phone",
|
||||||
"Empty Code": "Empty Code",
|
|
||||||
"phone reset": "Phone Reset",
|
"phone reset": "Phone Reset",
|
||||||
"email reset": "Email Reset",
|
"email reset": "Email Reset",
|
||||||
"Code Sent": "Code Sent",
|
|
||||||
"Input your email": "Input your email",
|
"Input your email": "Input your email",
|
||||||
"Input your phone number": "Input your phone number",
|
"Input your phone number": "Input your phone number",
|
||||||
"New phone": "New Phone",
|
"New phone": "New Phone",
|
||||||
"New email": "New Email",
|
"New email": "New Email",
|
||||||
"Code You Received": "Code You Received",
|
|
||||||
"Enter your code": "Enter your code",
|
|
||||||
"You can only send one code in 60s.": "You can only send one code in 60s.",
|
|
||||||
"Code has not been sent yet!": "Code has not been sent yet!",
|
|
||||||
"You should verify your code in 5 min!": "You should verify your code in 5 min!",
|
|
||||||
"Wrong code!": "Wrong code!",
|
|
||||||
"Invalid phone number": "Invalid phone number",
|
"Invalid phone number": "Invalid phone number",
|
||||||
"Invalid Email address": "Invalid Email address",
|
"Invalid Email address": "Invalid Email address",
|
||||||
"Turing test failed.": "Turing test failed.",
|
"Turing test failed.": "Turing test failed.",
|
||||||
@ -194,7 +205,6 @@
|
|||||||
"Please input your password!": "Please input your password!",
|
"Please input your password!": "Please input your password!",
|
||||||
"Please confirm your password!": "Please confirm your password!",
|
"Please confirm your password!": "Please confirm your password!",
|
||||||
"Please input your Email/Phone string!": "Please input your Email/Phone string!",
|
"Please input your Email/Phone string!": "Please input your Email/Phone string!",
|
||||||
"Please input your verification code!": "Please input your verification code!",
|
|
||||||
"Your confirmed password is inconsistent with the password!": "Your confirmed password is inconsistent with the password!",
|
"Your confirmed password is inconsistent with the password!": "Your confirmed password is inconsistent with the password!",
|
||||||
"Account": "Account",
|
"Account": "Account",
|
||||||
"Verify": "Verify",
|
"Verify": "Verify",
|
||||||
@ -203,7 +213,6 @@
|
|||||||
"Password": "Password",
|
"Password": "Password",
|
||||||
"Next Step": "Next Step",
|
"Next Step": "Next Step",
|
||||||
"Confirm": "Confirm",
|
"Confirm": "Confirm",
|
||||||
"Verify code": "Verify code",
|
|
||||||
"Email/Phone's format wrong!": "Email/Phone's format wrong!",
|
"Email/Phone's format wrong!": "Email/Phone's format wrong!",
|
||||||
"Email/Phone": "Email/Phone",
|
"Email/Phone": "Email/Phone",
|
||||||
"Change Password": "Change Password",
|
"Change Password": "Change Password",
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
"Organizations": "组织",
|
"Organizations": "组织",
|
||||||
"Providers": "提供商",
|
"Providers": "提供商",
|
||||||
"Users": "用户",
|
"Users": "用户",
|
||||||
|
"User": "用户",
|
||||||
"Applications": "应用",
|
"Applications": "应用",
|
||||||
|
"Application": "应用",
|
||||||
"Save": "保存",
|
"Save": "保存",
|
||||||
"Add": "添加",
|
"Add": "添加",
|
||||||
"Action": "操作",
|
"Action": "操作",
|
||||||
@ -35,7 +37,11 @@
|
|||||||
"Applications that requires authentication": "需要鉴权的应用",
|
"Applications that requires authentication": "需要鉴权的应用",
|
||||||
"Swagger": "API总览",
|
"Swagger": "API总览",
|
||||||
"Phone Prefix": "手机号前缀",
|
"Phone Prefix": "手机号前缀",
|
||||||
"Enter the code": "输入验证码"
|
"Enter the code": "输入验证码",
|
||||||
|
"Authorization code": "授权码",
|
||||||
|
"Access token": "访问令牌",
|
||||||
|
"Expires in": "有效期",
|
||||||
|
"Scope": "范围"
|
||||||
},
|
},
|
||||||
"signup":
|
"signup":
|
||||||
{
|
{
|
||||||
@ -56,6 +62,20 @@
|
|||||||
"sign in now": "立即登录",
|
"sign in now": "立即登录",
|
||||||
"Your account has been created!": "您的账号已创建!",
|
"Your account has been created!": "您的账号已创建!",
|
||||||
"Please click the below button to sign in": "请点击下方按钮登录",
|
"Please click the below button to sign in": "请点击下方按钮登录",
|
||||||
|
"Missing parameter.": "缺少参数"
|
||||||
|
},
|
||||||
|
"code":
|
||||||
|
{
|
||||||
|
"Please input your verification code!": "请输入您的验证码",
|
||||||
|
"Verify code": "验证码",
|
||||||
|
"Enter your code": "输入你的验证码",
|
||||||
|
"You can only send one code in 60s.": "每分钟你只能发送一次验证码",
|
||||||
|
"Code has not been sent yet!": "你还没有发送验证码",
|
||||||
|
"You should verify your code in 5 min!": "验证码已超时。你应该在 5 分钟内完成验证。",
|
||||||
|
"Wrong code!": "验证码错误!",
|
||||||
|
"Code You Received": "验证码",
|
||||||
|
"Empty Code": "验证码为空",
|
||||||
|
"Send code": "发送验证码",
|
||||||
"code sent": "验证码已发送",
|
"code sent": "验证码已发送",
|
||||||
"Email code": "邮箱验证码",
|
"Email code": "邮箱验证码",
|
||||||
"Phone code": "手机验证码",
|
"Phone code": "手机验证码",
|
||||||
@ -151,23 +171,14 @@
|
|||||||
"input password": "输入密码",
|
"input password": "输入密码",
|
||||||
"Reset Email...": "重置邮箱...",
|
"Reset Email...": "重置邮箱...",
|
||||||
"Reset Phone...": "重置手机号...",
|
"Reset Phone...": "重置手机号...",
|
||||||
"Send code": "发送验证码",
|
|
||||||
"Empty email": "邮箱为空",
|
"Empty email": "邮箱为空",
|
||||||
"Empty phone": "手机号为空",
|
"Empty phone": "手机号为空",
|
||||||
"Empty Code": "验证码为空",
|
|
||||||
"phone reset": "手机号已设置",
|
"phone reset": "手机号已设置",
|
||||||
"email reset": "邮箱已设置",
|
"email reset": "邮箱已设置",
|
||||||
"Code Sent": "验证码已发送",
|
|
||||||
"Input your email": "请输入邮箱",
|
"Input your email": "请输入邮箱",
|
||||||
"Input your phone number": "输入手机号",
|
"Input your phone number": "输入手机号",
|
||||||
"New phone": "新手机号",
|
"New phone": "新手机号",
|
||||||
"New email": "新邮箱",
|
"New email": "新邮箱",
|
||||||
"Code You Received": "验证码",
|
|
||||||
"Enter your code": "输入你的验证码",
|
|
||||||
"You can only send one code in 60s.": "每分钟你只能发送一次验证码",
|
|
||||||
"Code has not been sent yet!": "你还没有发送验证码",
|
|
||||||
"You should verify your code in 5 min!": "验证码已超时。你应该在 5 分钟内完成验证。",
|
|
||||||
"Wrong code!": "验证码错误!",
|
|
||||||
"Invalid phone number": "手机号格式错误",
|
"Invalid phone number": "手机号格式错误",
|
||||||
"Invalid Email address": "邮箱格式错误",
|
"Invalid Email address": "邮箱格式错误",
|
||||||
"Turing test failed.": "图灵验证失败,无法确认你是人类!",
|
"Turing test failed.": "图灵验证失败,无法确认你是人类!",
|
||||||
@ -194,9 +205,7 @@
|
|||||||
"Please input your password!": "请输入您的密码!",
|
"Please input your password!": "请输入您的密码!",
|
||||||
"Please confirm your password!": "请确认您的密码!",
|
"Please confirm your password!": "请确认您的密码!",
|
||||||
"Please input your Email/Phone string!": "请输入您的邮箱/手机号!",
|
"Please input your Email/Phone string!": "请输入您的邮箱/手机号!",
|
||||||
"Please input your verification code!": "请输入您的验证码",
|
|
||||||
"Your confirmed password is inconsistent with the password!": "您确认的密码与密码不一致!",
|
"Your confirmed password is inconsistent with the password!": "您确认的密码与密码不一致!",
|
||||||
"Verify code": "验证码",
|
|
||||||
"Password": "密码",
|
"Password": "密码",
|
||||||
"Next Step": "下一步",
|
"Next Step": "下一步",
|
||||||
"Choose email verification or mobile verification": "选择邮箱验证或手机验证",
|
"Choose email verification or mobile verification": "选择邮箱验证或手机验证",
|
||||||
|
Reference in New Issue
Block a user