mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Translate login page.
This commit is contained in:
parent
0faeaae78f
commit
8ce8169d65
@ -23,6 +23,7 @@ import * as Util from "./Util";
|
||||
import * as Setting from "../Setting";
|
||||
import {GithubLoginButton, GoogleLoginButton} from "react-social-login-buttons";
|
||||
import QqLoginButton from "./QqLoginButton";
|
||||
import i18next from "i18next";
|
||||
|
||||
class LoginPage extends React.Component {
|
||||
constructor(props) {
|
||||
@ -167,33 +168,33 @@ class LoginPage extends React.Component {
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="username"
|
||||
rules={[{ required: true, message: 'Please input your Username!' }]}
|
||||
rules={[{ required: true, message: i18next.t("login:Please input your Username!") }]}
|
||||
>
|
||||
<Input
|
||||
prefix={<UserOutlined className="site-form-item-icon" />}
|
||||
placeholder="username"
|
||||
placeholder={i18next.t("login:username")}
|
||||
disabled={!application.enablePassword}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="password"
|
||||
rules={[{ required: true, message: 'Please input your Password!' }]}
|
||||
rules={[{ required: true, message: i18next.t("login:Please input your Password!") }]}
|
||||
>
|
||||
<Input
|
||||
prefix={<LockOutlined className="site-form-item-icon" />}
|
||||
type="password"
|
||||
placeholder="password"
|
||||
placeholder={i18next.t("login:password")}
|
||||
disabled={!application.enablePassword}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
<Form.Item name="remember" valuePropName="checked" noStyle>
|
||||
<Checkbox style={{float: "left"}} disabled={!application.enablePassword}>
|
||||
Auto login
|
||||
{i18next.t("login:Auto login")}
|
||||
</Checkbox>
|
||||
</Form.Item>
|
||||
<Link style={{float: "right"}} to="/forgot">
|
||||
Forgot password?
|
||||
{i18next.t("login:Forgot password?")}
|
||||
</Link>
|
||||
</Form.Item>
|
||||
<Form.Item>
|
||||
@ -203,14 +204,14 @@ class LoginPage extends React.Component {
|
||||
style={{width: "100%"}}
|
||||
disabled={!application.enablePassword}
|
||||
>
|
||||
Sign In
|
||||
{i18next.t("login:Sign In")}
|
||||
</Button>
|
||||
{
|
||||
!application.enableSignUp ? null : (
|
||||
<div style={{float: "right"}}>
|
||||
No account yet?
|
||||
{i18next.t("login:No account yet?")}
|
||||
<Link to={"/register"}>
|
||||
sign up now
|
||||
{i18next.t("login:sign up now")}
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
|
@ -30,6 +30,18 @@
|
||||
"Applications that requires authentication": "Applications that requires authentication",
|
||||
"Swagger": "Swagger"
|
||||
},
|
||||
"login":
|
||||
{
|
||||
"Please input your Username!": "Please input your Username!",
|
||||
"username": "username",
|
||||
"Please input your Password!": "Please input your Password!",
|
||||
"password": "password",
|
||||
"Auto login": "Auto login",
|
||||
"Forgot password?": "Forgot password?",
|
||||
"Sign In": "Sign In",
|
||||
"No account yet?": "No account yet?",
|
||||
"sign up now": "sign up now"
|
||||
},
|
||||
"account":
|
||||
{
|
||||
"My Account": "My Account",
|
||||
|
@ -30,6 +30,18 @@
|
||||
"Applications that requires authentication": "需要鉴权的应用",
|
||||
"Swagger": "API总览"
|
||||
},
|
||||
"login":
|
||||
{
|
||||
"Please input your Username!": "请输入用户名!",
|
||||
"username": "用户名",
|
||||
"Please input your Password!": "请输入密码!",
|
||||
"password": "密码",
|
||||
"Auto login": "下次自动登录",
|
||||
"Forgot password?": "忘记密码?",
|
||||
"Sign In": "登录",
|
||||
"No account yet?": "没有账号?",
|
||||
"sign up now": "立即注册"
|
||||
},
|
||||
"account":
|
||||
{
|
||||
"My Account": "我的账户",
|
||||
|
Loading…
x
Reference in New Issue
Block a user