site: translate the tips of EditButton, close: #3060

This commit is contained in:
Benjy Cui 2016-09-18 14:27:41 +08:00
parent 483b9e4888
commit b27dfca108
5 changed files with 9 additions and 3 deletions

View File

@ -11,6 +11,8 @@ module.exports = {
'app.header.menu.spec': 'Specification',
'app.header.menu.resource': 'Resource',
'app.header.lang': '中文',
'app.content.edit-page': 'Edit this page on Github!',
'app.content.edit-demo': 'Edit this demo on Github!',
'app.component.examples': 'Examples',
'app.home.slogan': 'One Design Language for UI',
'app.home.start': 'Getting Started',

View File

@ -1,4 +1,5 @@
import React, { Children, cloneElement } from 'react';
import { FormattedMessage } from 'react-intl';
import DocumentTitle from 'react-document-title';
import { getChildren } from 'jsonml.js/lib/utils';
import { Timeline } from 'antd';
@ -66,7 +67,7 @@ export default class Article extends React.Component {
(!subtitle && !chinese) ? null :
<span className="subtitle">{subtitle || chinese}</span>
}
<EditButton title="在 Github 上编辑此页!" filename={filename} />
<EditButton title={<FormattedMessage id="app.content.edit-page" />} filename={filename} />
</h1>
{
!description ? null :

View File

@ -89,7 +89,7 @@ export default class ComponentDoc extends React.Component {
(!subtitle && !chinese) ? null :
<span className="subtitle">{subtitle || chinese}</span>
}
<EditButton title="在 Github 上编辑此页!" filename={filename} />
<EditButton title={<FormattedMessage id="app.content.edit-page" />} filename={filename} />
</h1>
{
props.utils.toReactComponent(

View File

@ -1,5 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import EditButton from './EditButton';
@ -75,7 +76,7 @@ export default class Demo extends React.Component {
<a href={`#${meta.id}`}>
{localizedTitle}
</a>
<EditButton title="在 Github 上编辑此示例!" filename={meta.filename} />
<EditButton title={<FormattedMessage id="app.content.edit-page" />} filename={meta.filename} />
</div>
{introChildren}
<span className="collapse anticon anticon-circle-o-right"

View File

@ -11,6 +11,8 @@ module.exports = {
'app.header.menu.spec': '语言',
'app.header.menu.resource': '资源',
'app.header.lang': 'EN',
'app.content.edit-page': '在 Github 上编辑此页!',
'app.content.edit-demo': '在 Github 上编辑此示例!',
'app.component.examples': '代码演示',
'app.home.slogan': '一个 UI 设计语言',
'app.home.start': '开始探索',