mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 12:03:50 +08:00
Improve i18n.
This commit is contained in:
@ -201,7 +201,7 @@ class ApplicationEditPage extends React.Component {
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={22} >
|
<Col span={22} >
|
||||||
<UrlTable
|
<UrlTable
|
||||||
title="Redirect URLs"
|
title={i18next.t("application:Redirect URLs")}
|
||||||
table={this.state.application.redirectUris}
|
table={this.state.application.redirectUris}
|
||||||
onUpdateTable={(value) => { this.updateApplicationField('redirectUris', value)}}
|
onUpdateTable={(value) => { this.updateApplicationField('redirectUris', value)}}
|
||||||
/>
|
/>
|
||||||
|
@ -16,6 +16,7 @@ import React from "react";
|
|||||||
import {DownOutlined, DeleteOutlined, UpOutlined, LinkOutlined} from '@ant-design/icons';
|
import {DownOutlined, DeleteOutlined, UpOutlined, LinkOutlined} from '@ant-design/icons';
|
||||||
import {Button, Col, Input, Row, Table, Tooltip} from 'antd';
|
import {Button, Col, Input, Row, Table, Tooltip} from 'antd';
|
||||||
import * as Setting from "./Setting";
|
import * as Setting from "./Setting";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
class UrlTable extends React.Component {
|
class UrlTable extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -61,7 +62,7 @@ class UrlTable extends React.Component {
|
|||||||
renderTable(table) {
|
renderTable(table) {
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: 'Redirect URLs',
|
title: i18next.t("application:Redirect URL"),
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
@ -73,19 +74,19 @@ class UrlTable extends React.Component {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Action',
|
title: i18next.t("general:Action"),
|
||||||
key: 'action',
|
key: 'action',
|
||||||
width: '120px',
|
width: '100px',
|
||||||
render: (text, record, index) => {
|
render: (text, record, index) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Tooltip placement="bottomLeft" title="Up">
|
<Tooltip placement="bottomLeft" title={i18next.t("general:Up")}>
|
||||||
<Button style={{marginRight: "5px"}} disabled={index === 0} icon={<UpOutlined />} size="small" onClick={() => this.upRow(table, index)} />
|
<Button style={{marginRight: "5px"}} disabled={index === 0} icon={<UpOutlined />} size="small" onClick={() => this.upRow(table, index)} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip placement="topLeft" title="Down">
|
<Tooltip placement="topLeft" title={i18next.t("general:Down")}>
|
||||||
<Button style={{marginRight: "5px"}} disabled={index === table.length - 1} icon={<DownOutlined />} size="small" onClick={() => this.downRow(table, index)} />
|
<Button style={{marginRight: "5px"}} disabled={index === table.length - 1} icon={<DownOutlined />} size="small" onClick={() => this.downRow(table, index)} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip placement="topLeft" title="Delete">
|
<Tooltip placement="topLeft" title={i18next.t("general:Delete")}>
|
||||||
<Button icon={<DeleteOutlined />} size="small" onClick={() => this.deleteRow(table, index)} />
|
<Button icon={<DeleteOutlined />} size="small" onClick={() => this.deleteRow(table, index)} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
@ -99,7 +100,7 @@ class UrlTable extends React.Component {
|
|||||||
title={() => (
|
title={() => (
|
||||||
<div>
|
<div>
|
||||||
{this.props.title}
|
{this.props.title}
|
||||||
<Button style={{marginRight: "5px"}} type="primary" size="small" onClick={() => this.addRow(table)}>Add</Button>
|
<Button style={{marginRight: "5px"}} type="primary" size="small" onClick={() => this.addRow(table)}>{i18next.t("general:Add")}</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import {Cascader, Col, Input, Row, Select} from 'antd';
|
import {Cascader, Col, Input, Row, Select} from 'antd';
|
||||||
import * as Setting from "../Setting";
|
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import * as UserBackend from "../backend/UserBackend";
|
import * as UserBackend from "../backend/UserBackend";
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
"Action": "Action",
|
"Action": "Action",
|
||||||
"Edit": "Edit",
|
"Edit": "Edit",
|
||||||
"Delete": "Delete",
|
"Delete": "Delete",
|
||||||
|
"Up": "Up",
|
||||||
|
"Down": "Down",
|
||||||
"Organization": "Organization",
|
"Organization": "Organization",
|
||||||
"Created time": "Created time",
|
"Created time": "Created time",
|
||||||
"Name": "Name",
|
"Name": "Name",
|
||||||
@ -174,7 +176,9 @@
|
|||||||
"Enable password": "Enable password",
|
"Enable password": "Enable password",
|
||||||
"Login page preview": "Login page preview",
|
"Login page preview": "Login page preview",
|
||||||
"Test signup page..": "Test signup page..",
|
"Test signup page..": "Test signup page..",
|
||||||
"Test signin page..": "Test signin page.."
|
"Test signin page..": "Test signin page..",
|
||||||
|
"Redirect URL": "Redirect URL",
|
||||||
|
"Redirect URLs": "Redirect URLs"
|
||||||
},
|
},
|
||||||
"forget":
|
"forget":
|
||||||
{
|
{
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
"Applications": "应用",
|
"Applications": "应用",
|
||||||
"Save": "保存",
|
"Save": "保存",
|
||||||
"Add": "添加",
|
"Add": "添加",
|
||||||
"Action": "行为",
|
"Action": "操作",
|
||||||
"Edit": "修改",
|
"Edit": "修改",
|
||||||
"Delete": "删除",
|
"Delete": "删除",
|
||||||
|
"Up": "上移",
|
||||||
|
"Down": "下移",
|
||||||
"Organization": "组织",
|
"Organization": "组织",
|
||||||
"Created time": "创建时间",
|
"Created time": "创建时间",
|
||||||
"Name": "名称",
|
"Name": "名称",
|
||||||
@ -174,7 +176,9 @@
|
|||||||
"Enable password": "开启密码",
|
"Enable password": "开启密码",
|
||||||
"Login page preview": "登录页面预览",
|
"Login page preview": "登录页面预览",
|
||||||
"Test signup page..": "测试注册页面..",
|
"Test signup page..": "测试注册页面..",
|
||||||
"Test signin page..": "测试登录页面.."
|
"Test signin page..": "测试登录页面..",
|
||||||
|
"Redirect URL": "回调URL",
|
||||||
|
"Redirect URLs": "回调URLs"
|
||||||
},
|
},
|
||||||
"forget":
|
"forget":
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user