fix: Complete translation
This commit is contained in:
parent
0769b02549
commit
4845a8e87b
|
@ -2,6 +2,7 @@ import React, { Component } from 'react';
|
||||||
import { Tree, Spin, Input } from 'antd';
|
import { Tree, Spin, Input } from 'antd';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import { injectIntl, WrappedComponentProps } from 'react-intl';
|
||||||
import * as config from '@common/config';
|
import * as config from '@common/config';
|
||||||
import { TreeNode } from '@interface';
|
import { TreeNode } from '@interface';
|
||||||
import { renderTreeNodes } from './utils';
|
import { renderTreeNodes } from './utils';
|
||||||
|
@ -15,7 +16,7 @@ interface Props {
|
||||||
onExpandedKeys: (expandedKeys: string[]) => void,
|
onExpandedKeys: (expandedKeys: string[]) => void,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class NsTree extends Component<Props> {
|
class NsTree extends Component<Props & WrappedComponentProps> {
|
||||||
static defaultProps = {
|
static defaultProps = {
|
||||||
treeData: [],
|
treeData: [],
|
||||||
originTreeData: [],
|
originTreeData: [],
|
||||||
|
@ -42,7 +43,10 @@ export default class NsTree extends Component<Props> {
|
||||||
return (
|
return (
|
||||||
<div className={`${prefixCls}-nsTree`}>
|
<div className={`${prefixCls}-nsTree`}>
|
||||||
<div className={`${prefixCls}-nsTree-header`}>
|
<div className={`${prefixCls}-nsTree-header`}>
|
||||||
<Input.Search onSearch={this.props.onSearchValue} placeholder="搜节点(空格分割)" />
|
<Input.Search
|
||||||
|
onSearch={this.props.onSearchValue}
|
||||||
|
placeholder={this.props.intl.formatMessage({ id: 'tree.search' })}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
<div>
|
<div>
|
||||||
|
@ -77,3 +81,5 @@ export default class NsTree extends Component<Props> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default injectIntl(NsTree);
|
||||||
|
|
|
@ -317,11 +317,13 @@ class NILayout extends Component<Props & RouteComponentProps & WrappedComponentP
|
||||||
<Menu.Item>
|
<Menu.Item>
|
||||||
<Link to={{ pathname: '/profile' }}>
|
<Link to={{ pathname: '/profile' }}>
|
||||||
<Icon type="setting" className="mr10" />
|
<Icon type="setting" className="mr10" />
|
||||||
个人设置
|
{language === 'zh' ? '个人设置' : 'setting'}
|
||||||
</Link>
|
</Link>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item>
|
<Menu.Item>
|
||||||
<a onClick={this.handleLogoutLinkClick}><Icon type="logout" className="mr10" />退出登录</a>
|
<a onClick={this.handleLogoutLinkClick}><Icon type="logout" className="mr10" />
|
||||||
|
{language === 'zh' ? '退出登录' : 'logout'}
|
||||||
|
</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
}>
|
}>
|
||||||
|
|
|
@ -358,7 +358,7 @@ class index extends Component<Props & WrappedComponentProps, State> {
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
<Search
|
<Search
|
||||||
placeholder="搜索"
|
placeholder="Search"
|
||||||
style={{ width: 200 }}
|
style={{ width: 200 }}
|
||||||
onSearch={(value) => {
|
onSearch={(value) => {
|
||||||
this.setState({ searchValue: value });
|
this.setState({ searchValue: value });
|
||||||
|
|
Loading…
Reference in New Issue