From 6a616de7670363ad1d5139351ff5be9b74e1af97 Mon Sep 17 00:00:00 2001 From: lixiaochou077 Date: Mon, 4 Jul 2016 10:49:04 +0800 Subject: [PATCH] docs: add translation for timeline (#2190) --- components/timeline/demo/basic.md | 10 ++++- components/timeline/demo/color.md | 10 ++++- components/timeline/demo/custom.md | 10 ++++- components/timeline/demo/pending.md | 10 ++++- components/timeline/index.en-US.md | 40 +++++++++++++++++++ .../timeline/{index.md => index.zh-CN.md} | 0 6 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 components/timeline/index.en-US.md rename components/timeline/{index.md => index.zh-CN.md} (100%) diff --git a/components/timeline/demo/basic.md b/components/timeline/demo/basic.md index c06b505745..225a589a3b 100644 --- a/components/timeline/demo/basic.md +++ b/components/timeline/demo/basic.md @@ -1,10 +1,18 @@ --- order: 0 -title: 基本用法 +title: + zh-CN: 基本用法 + en-US: Basic --- +## zh-CN + 基本的时间轴。 +## en-US + +Basic timeline. + ````jsx import { Timeline } from 'antd'; diff --git a/components/timeline/demo/color.md b/components/timeline/demo/color.md index b8647d31e3..9ea5cac62d 100644 --- a/components/timeline/demo/color.md +++ b/components/timeline/demo/color.md @@ -1,10 +1,18 @@ --- order: 1 -title: 圆圈颜色 +title: + zh-CN: 圆圈颜色 + en-US: Color --- +## zh-CN + 圆圈颜色,绿色用于已完成、成功状态,红色表示告警或错误状态,蓝色可表示正在进行或其他默认状态。 +## en-US + +Set the color of circles. `green` means completed or success status, `red` means warning or error, and `blue` means ongoing or other default status. + ````jsx import { Timeline } from 'antd'; diff --git a/components/timeline/demo/custom.md b/components/timeline/demo/custom.md index 09f8035792..d3dfbd8948 100644 --- a/components/timeline/demo/custom.md +++ b/components/timeline/demo/custom.md @@ -1,10 +1,18 @@ --- order: 4 -title: 自定义时间轴点 +title: + zh-CN: 自定义时间轴点 + en-US: Custom --- +## zh-CN + 可以设置为图标或其他自定义元素。 +## en-US + +Set a node as an icon or other custom element. + ````jsx import { Timeline, Icon } from 'antd'; diff --git a/components/timeline/demo/pending.md b/components/timeline/demo/pending.md index 8c5f9436a9..f8ad3a18b6 100644 --- a/components/timeline/demo/pending.md +++ b/components/timeline/demo/pending.md @@ -1,10 +1,18 @@ --- order: 2 -title: 最后一个 +title: + zh-CN: 最后一个 + en-US: Last node --- +## zh-CN + 在最后位置添加一个幽灵节点,表示时间轴未完成,还在记录过程中。可以指定 `pending={true}` 或者 `pending={一个 React 元素}`。 +## en-US + +When the timeline is incomplete and ongoing, put a ghost node at last. set `pending={true}` or `pending={a React Element}`。 + ````jsx import { Timeline } from 'antd'; diff --git a/components/timeline/index.en-US.md b/components/timeline/index.en-US.md new file mode 100644 index 0000000000..220391770c --- /dev/null +++ b/components/timeline/index.en-US.md @@ -0,0 +1,40 @@ +--- +category: Components +type: Views +title: Timeline +--- + +Vertical display timeline. + +## When To Use + +- When a series of information need to be lined from top to bottom by time. +- When need a timeline to make a visual connection. + +## API + +```jsx + + step1 2015-09-01 + step2 2015-09-01 + step3 2015-09-01 + step4 2015-09-01 + +``` + +### Timeline + +Timeline + +| Property | Description | Type | Default | +|----------|----------------------------------------|------------|-------| +| pending | to set the last ghost node's existence or its content | boolean or React.Element | false | + +### Timeline.Item + +Node of timeline + +| Property | Description | Type | Default | +|----------|------------------------------------------|------------|-------| +| color | to set the circle's color to `blue, red, green` or other custom colors | string | blue | +| dot | custom timeline dot | React.Element | - | diff --git a/components/timeline/index.md b/components/timeline/index.zh-CN.md similarity index 100% rename from components/timeline/index.md rename to components/timeline/index.zh-CN.md