mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-15 16:43:50 +08:00
Improve i18n.
This commit is contained in:
@ -16,6 +16,7 @@ import React from "react";
|
||||
import {DownOutlined, DeleteOutlined, UpOutlined, LinkOutlined} from '@ant-design/icons';
|
||||
import {Button, Col, Input, Row, Table, Tooltip} from 'antd';
|
||||
import * as Setting from "./Setting";
|
||||
import i18next from "i18next";
|
||||
|
||||
class UrlTable extends React.Component {
|
||||
constructor(props) {
|
||||
@ -61,7 +62,7 @@ class UrlTable extends React.Component {
|
||||
renderTable(table) {
|
||||
const columns = [
|
||||
{
|
||||
title: 'Redirect URLs',
|
||||
title: i18next.t("application:Redirect URL"),
|
||||
dataIndex: 'id',
|
||||
key: 'id',
|
||||
render: (text, record, index) => {
|
||||
@ -73,19 +74,19 @@ class UrlTable extends React.Component {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Action',
|
||||
title: i18next.t("general:Action"),
|
||||
key: 'action',
|
||||
width: '120px',
|
||||
width: '100px',
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<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)} />
|
||||
</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)} />
|
||||
</Tooltip>
|
||||
<Tooltip placement="topLeft" title="Delete">
|
||||
<Tooltip placement="topLeft" title={i18next.t("general:Delete")}>
|
||||
<Button icon={<DeleteOutlined />} size="small" onClick={() => this.deleteRow(table, index)} />
|
||||
</Tooltip>
|
||||
</div>
|
||||
@ -99,7 +100,7 @@ class UrlTable extends React.Component {
|
||||
title={() => (
|
||||
<div>
|
||||
{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>
|
||||
)}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user