Skip to content

Commit

Permalink
activity-indicator translation, ref ant-design#329
Browse files Browse the repository at this point in the history
  • Loading branch information
silentcloud authored and lixiaoyang1992 committed Apr 26, 2018
1 parent 19e1d0b commit a52d2e8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 23 deletions.
16 changes: 8 additions & 8 deletions components/activity-indicator/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title:
en-US: Basic
---

基本的活动指示器。
Basic usage

````jsx
import { ActivityIndicator, WingBlank, WhiteSpace, Button } from 'antd-mobile';
Expand All @@ -31,33 +31,33 @@ class App extends React.Component {
<div>
<WingBlank>
<div className="loading-container">
<p className="sub-title">icon无文案</p>
<p className="sub-title">icon without text</p>
<div className="loading-example">
<ActivityIndicator animating />
</div>
<WhiteSpace size="xl" />
<p className="sub-title">icon带文案</p>
<p className="sub-title">icon with text</p>
<div className="loading-example">
<ActivityIndicator
text="加载中..."
text="Loading..."
/>
</div>
<WhiteSpace size="xl" />
<p className="sub-title">大号icon,自定义文案样式</p>
<p className="sub-title">icon with large size and customized text style</p>
<div className="loading-example">
<div className="align">
<ActivityIndicator size="large" />
<span style={{ marginTop: 8 }}>加载中...</span>
<span style={{ marginTop: 8 }}>Loading...</span>
</div>
</div>
</div>
<div className="toast-container">
<WhiteSpace size="xl" />
<Button onClick={this.showToast}>点击显示 Toast</Button>
<Button onClick={this.showToast}>Click to show Toast</Button>
<div className="toast-example">
<ActivityIndicator
toast
text="正在加载"
text="Loading..."
animating={this.state.animating}
/>
</div>
Expand Down
26 changes: 12 additions & 14 deletions components/activity-indicator/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ type: Feedback
title: ActivityIndicator
---

活动指示器。
表明某个任务正在进行中。
`ActivityIndicator` indicates that a task is currently in progress.

### 规则
- 不要让活动指示器静止,用户会以为该任务停滞了。
- 在某些特定场景下,提供有意义的文案,帮助用户明白哪个任务正在进行中,eg:正在上传照片。
- 如果能知道用户的等待时间,可以使用组件 Progress 来替代。
- 可通过控制 ActivityIndicator 运动的快慢,来表明进程处理的速度。
### Rules
- Don't stop activity indicator if the task is not completed.
- By providing meaningful texts under certain circumstances can help user understand which task is in progress. eg: uploading photos.
- If you know the user's waiting time, you can use `Progress` instead.


## API
Expand All @@ -22,17 +20,17 @@ Support WEB, React-Native.
<ActivityIndicator />
<ActivityIndicator color="white" />
<ActivityIndicator size="large" />
<ActivityIndicator text="正在加载" />
<ActivityIndicator text="loading" />
<ActivityIndicator toast />
<ActivityIndicator toast text="正在加载" />
<ActivityIndicator toast text="loading" />
```

### ActivityIndicator

Properties | Descrition | Type | Default
-----------|------------|------|--------
| animating | 显隐状态 | boolean | true |
| size | spinner大小,可选`small`/`large` | string | small |
| toast | loading样式类型 | boolean | false |
| text | loading文本 | string | - |
| color (`RN only`) | spinner颜色 | string | gray |
| animating | Whether to show the indicator (true, the default) or hide it (false). | boolean | true |
| size | Size of the indicator (`small`/`large`) | string | small |
| toast | Whether to use toast style | boolean | false |
| text | loading text behind the indicator | string | - |
| color (`RN only`) | The foreground color of the spinner (default is gray). | string | gray |
1 change: 0 additions & 1 deletion components/activity-indicator/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ subtitle: 活动指示器
- 不要让活动指示器静止,用户会以为该任务停滞了。
- 在某些特定场景下,提供有意义的文案,帮助用户明白哪个任务正在进行中,eg:正在上传照片。
- 如果能知道用户的等待时间,可以使用组件 Progress 来替代。
- 可通过控制 ActivityIndicator 运动的快慢,来表明进程处理的速度。


## API
Expand Down

0 comments on commit a52d2e8

Please sign in to comment.