From 0c09022e071617c6f8e313b5deb9bf0a852dac48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=90=E4=BB=AA?= <linya.qu@alipay.com> Date: Thu, 27 Apr 2017 21:47:41 +0800 Subject: [PATCH] Translation Radio --- components/radio/demo/basic.md | 16 ++++++++-------- components/radio/demo/basic.tsx | 12 ++++++------ components/radio/index.en-US.md | 17 +++++++++-------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/components/radio/demo/basic.md b/components/radio/demo/basic.md index 4de2d6964c7..2205fb567ed 100644 --- a/components/radio/demo/basic.md +++ b/components/radio/demo/basic.md @@ -33,16 +33,16 @@ class Test extends React.Component { render() { const { value, value2, value3, value4 } = this.state; const data = [ - { value: 0, label: '博士' }, - { value: 1, label: '本科' }, + { value: 0, label: 'Doctor' }, + { value: 1, label: 'Bachelor' }, ]; const data2 = [ - { value: 0, label: '篮球', extra: '辅助文字内容' }, - { value: 1, label: '足球', extra: '辅助文字内容' }, + { value: 0, label: 'Basketball', extra: 'Details' }, + { value: 1, label: 'Football', extra: 'Details' }, ]; return (<div> - <List renderHeader={() => 'RadioItem 演示'}> + <List renderHeader={() => 'RadioItem Demo'}> {data.map(i => ( <RadioItem key={i.value} checked={value === i.value} onChange={() => this.onChange(i.value)}> {i.label} @@ -58,7 +58,7 @@ class Test extends React.Component { ))} </List> - <List renderHeader={() => '禁用状态'}> + <List renderHeader={() => 'Disabled'}> {data.map(i => ( <RadioItem key={i.value} checked={value3 === i.value} onChange={() => this.onChange3(i.value)} disabled> {i.label} @@ -74,9 +74,9 @@ class Test extends React.Component { ))} </List> <Flex style={{ padding: '0.3rem' }}> - <Flex.Item style={{ padding: '0.3rem 0', color: '#888', flex: 'none' }}>Radio 演示 (自定义样式)</Flex.Item> + <Flex.Item style={{ padding: '0.3rem 0', color: '#888', flex: 'none' }}>Radio Demo(Customized style)</Flex.Item> <Flex.Item> - <Radio className="my-radio" onChange={e => console.log('checkbox', e)}>同意协议</Radio> + <Radio className="my-radio" onChange={e => console.log('checkbox', e)}>Agree</Radio> </Flex.Item> </Flex> </div>); diff --git a/components/radio/demo/basic.tsx b/components/radio/demo/basic.tsx index ea078fc55e3..97dbcf3636e 100644 --- a/components/radio/demo/basic.tsx +++ b/components/radio/demo/basic.tsx @@ -23,7 +23,7 @@ export default class BasicRadioExample extends React.Component<any, any> { }} style={{ borderWidth: 1, borderColor: '#999', margin: 10 }} > - 支持 + Support </Radio> <WhiteSpace /> <Radio @@ -39,7 +39,7 @@ export default class BasicRadioExample extends React.Component<any, any> { </View> <List style={{ marginTop: 12 }}> - <Text style={{ marginTop: 12 }}>表单单选项,普通列表中单选项</Text> + <Text style={{ marginTop: 12 }}>Form radio, radio in general list.</Text> <RadioItem checked={this.state.part2Value === 1} onChange={(event) => { @@ -48,7 +48,7 @@ export default class BasicRadioExample extends React.Component<any, any> { } }} > - 使用 Ant Desgin Component + Use Ant Desgin Component </RadioItem> <RadioItem checked={this.state.part2Value === 2} @@ -58,10 +58,10 @@ export default class BasicRadioExample extends React.Component<any, any> { } }} > - 使用 Ant Desgin Component + Use Ant Desgin Component </RadioItem> - <RadioItem disabled>个性化调整disabled</RadioItem> - <RadioItem disabled checked>个性化调整disabled</RadioItem> + <RadioItem disabled>Set disabled</RadioItem> + <RadioItem disabled checked>Set disabled</RadioItem> </List> </View> ); diff --git a/components/radio/index.en-US.md b/components/radio/index.en-US.md index 6b1f393b0c3..b71592ec226 100644 --- a/components/radio/index.en-US.md +++ b/components/radio/index.en-US.md @@ -4,7 +4,7 @@ type: Data Entry title: Radio --- -单选框 +Radio. ## API @@ -14,13 +14,14 @@ Support WEB, React-Native. Properties | Descrition | Type | Default -----------|------------|------|-------- -| name | name | String | 无 | -| defaultChecked | 初始是否选中 | Boolean | 无 | -| checked | 指定当前是否选中 | Boolean | 无 | -| disabled | 禁用 | Boolean | false | -| onChange | change 事件触发的回调函数 | (e: Object): void | 无 | +| name | name | String | - | +| defaultChecked | the initial checked state | Boolean | - | +| checked | to set the current checked state | Boolean | - | +| disabled | whether disabled | Boolean | false | +| onChange | a callback function, can be executed when the checked state changes | (e: Object): void | - | ### Radio.RadioItem -基于`List.Item`对`Radio`进行封装,`List.Item`的`extra`属性固定传入`Radio`,其他属性和`List.Item`一致。 -其他 API 和 Radio 相同。 +The encapsulation about `Radio` based on `List.Item`, the property `extra` of `List.Item` will be passed to `Radio`, while other properties remain the same. + +Other APIs are identical with `Radio`.