From c035e34f86ab1d170bf2afcc4f33097a4f184a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=90=E4=BB=AA?= Date: Thu, 27 Apr 2017 21:50:40 +0800 Subject: [PATCH 1/2] Translation NoticeBar --- components/notice-bar/demo/basic.md | 8 ++++---- components/notice-bar/demo/basic.tsx | 18 ++++++++++++------ components/notice-bar/index.en-US.md | 15 ++++++++------- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/components/notice-bar/demo/basic.md b/components/notice-bar/demo/basic.md index e80cc0d1fd..c278e59e26 100644 --- a/components/notice-bar/demo/basic.md +++ b/components/notice-bar/demo/basic.md @@ -13,17 +13,17 @@ const NoticeBarExample = () => (
- 国庆期间余额宝收益和转出到账时间通知:由于国庆到来,余额宝收益到账将延迟,特此通知 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. alert('1')}> - 国庆期间余额宝收益和转出到账时间 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. - 去除 NoticeBar 默认的喇叭图标 + Remove the default icon. }> - 自定义 NoticeBar 前面的小图标 + Customized icon.
); diff --git a/components/notice-bar/demo/basic.tsx b/components/notice-bar/demo/basic.tsx index c9141789ce..941f9b5acb 100644 --- a/components/notice-bar/demo/basic.tsx +++ b/components/notice-bar/demo/basic.tsx @@ -15,24 +15,30 @@ export default class NoticeBarExample extends React.Component { return ( - alert('click')}>国庆期间余额宝收益和转出到账时间 + alert('click')}> + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. + alert('will close')}> - 国庆期间余额宝收益和转出到账时间1 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. - 自定义 NoticeBar 前面的图标 + Customized icon. - alert('link')}>国庆期间余额宝收益和转出到账时间 + alert('link')}> + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. + - 国庆期间余额宝收益和转出到账时间 + + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. + - 去除 NoticeBar 默认的喇叭图标 + Remove the default icon. ); } diff --git a/components/notice-bar/index.en-US.md b/components/notice-bar/index.en-US.md index 77ec75d358..b99b570bc1 100644 --- a/components/notice-bar/index.en-US.md +++ b/components/notice-bar/index.en-US.md @@ -4,10 +4,11 @@ type: Data Display title: NoticeBar --- -在导航栏下方,一般用作系统提醒、活动提醒等通知。 +The NoticeBar is aimed for displaying a system message, event notice and etc. Which is under the navigation bar. -### 规则 -- 需要引起用户关注时使用,重要级别低于 Modal ,高于 Toast。 +### Rules + +- Be used to attract user's attension, the importance level is lower than `Modal` and higher than `Toast`. ## API @@ -15,7 +16,7 @@ Support WEB, React-Native. Properties | Descrition | Type | Default -----------|------------|------|-------- -| mode | 提示类型,可选`closable`,`link` | String | '' | -| icon | notice 前的图标 | React.Element | ``| -| onClick | 点击关闭或者操作区域的回调函数 | (): void | | -| marqueeProps (`web only`) | marquee 参数 | Object | `{loop: false, leading: 500, trailing: 800, fps: 40, style: {}}` | +| mode | Type of NoticeBar, options: `closable` `link` | String | '' | +| icon | To set the icon before notice | React.Element | ``| +| onClick | A callback function, can be executed when you close the notice or click on the operating area | (): void | | +| marqueeProps (`web only`) | marquee params | Object | `{loop: false, leading: 500, trailing: 800, fps: 40, style: {}}` | From 8d860533b0cda10b3b6707a0fcb5f549082f2e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=90=E4=BB=AA?= Date: Fri, 28 Apr 2017 16:14:33 +0800 Subject: [PATCH 2/2] update snap --- .../__tests__/__snapshots__/demo.test.js.snap | 12 ++++++------ .../__tests__/__snapshots__/demo.test.web.js.snap | 8 ++++---- components/notice-bar/index.en-US.md | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/notice-bar/__tests__/__snapshots__/demo.test.js.snap b/components/notice-bar/__tests__/__snapshots__/demo.test.js.snap index c4c857f9d2..35bee6d10c 100644 --- a/components/notice-bar/__tests__/__snapshots__/demo.test.js.snap +++ b/components/notice-bar/__tests__/__snapshots__/demo.test.js.snap @@ -86,7 +86,7 @@ exports[`renders ./components/notice-bar/demo/basic.tsx correctly 1`] = ` ] } > - 国庆期间余额宝收益和转出到账时间 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. - 国庆期间余额宝收益和转出到账时间1 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. - 自定义 NoticeBar 前面的图标 + Customized icon. - 国庆期间余额宝收益和转出到账时间 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. - 国庆期间余额宝收益和转出到账时间 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. - 去除 NoticeBar 默认的喇叭图标 + Remove the default icon. - 国庆期间余额宝收益和转出到账时间通知:由于国庆到来,余额宝收益到账将延迟,特此通知 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. @@ -67,7 +67,7 @@ exports[`renders ./components/notice-bar/demo/basic.md correctly 1`] = ` class="am-notice-bar-marquee" style="position:relative;right:0;white-space:nowrap;display:inline-block;" > - 国庆期间余额宝收益和转出到账时间 + Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day. @@ -100,7 +100,7 @@ exports[`renders ./components/notice-bar/demo/basic.md correctly 1`] = ` class="am-notice-bar-marquee" style="position:relative;right:0;white-space:nowrap;display:inline-block;" > - 去除 NoticeBar 默认的喇叭图标 + Remove the default icon. @@ -146,7 +146,7 @@ exports[`renders ./components/notice-bar/demo/basic.md correctly 1`] = ` class="am-notice-bar-marquee" style="position:relative;right:0;white-space:nowrap;display:inline-block;" > - 自定义 NoticeBar 前面的小图标 + Customized icon. diff --git a/components/notice-bar/index.en-US.md b/components/notice-bar/index.en-US.md index b99b570bc1..9a46eb72e5 100644 --- a/components/notice-bar/index.en-US.md +++ b/components/notice-bar/index.en-US.md @@ -4,7 +4,7 @@ type: Data Display title: NoticeBar --- -The NoticeBar is aimed for displaying a system message, event notice and etc. Which is under the navigation bar. +Component to display a system message, event notice and etc. Which is under the navigation bar. ### Rules