Skip to content

add chinese version readme #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 11, 2018
Merged

add chinese version readme #86

merged 7 commits into from
Jun 11, 2018

Conversation

Gavin-Gong
Copy link
Contributor

No description provided.

@yyx990803
Copy link
Member

@Jinjiang 有空的话帮忙润色一下吧

README-CN.md Outdated

[English](README.md) | 简体中文

[RxJS v6](https://github.com/ReactiveX/rxjs) 集成到 Vue.js.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RxJS v6 集成到 Vue.js

README-CN.md Outdated

[RxJS v6](https://github.com/ReactiveX/rxjs) 集成到 Vue.js.

> **相比 5.0 的破坏式更新**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

破坏式更新 -> 不兼容变更

README-CN.md Outdated

#### NPM + ES2015

**`rxjs` 需要作为`peer dependency`引入.**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

peer dependency 的反引号不是必要的,且左右两边建议加空格

README-CN.md Outdated
Vue.use(VueRx);
```

使用 webpack 打包, 默认会使用`dist/vue-rx.esm.js`. 这样引入最小数量的 Rx 操作符并且保证了最小的打包体积
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用 webpack 打包, 默认会使用dist/vue-rx.esm.js
⬇️
webpack 打包时会默认使用 dist/vue-rx.esm.js

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

句尾漏了句号

README-CN.md Outdated

#### 全局脚本

如果要在浏览器环境使用, 需要引入 UMD 构建版本 `dist/vue-rx.js`. 在浏览器环境中, UMD 版本默认 `window.rxjs` 已经存在, 因此确保在 Vue.js 和 RxJS 之后引入 `vue-rx.js`. 如果`window.Vue`存在的话, `vue-rx`会自动安装,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在浏览器环境中, UMD 版本默认 window.rxjs 已经存在, 因此确保……
⬇️
浏览器中的 UMD 构建版本会假设 window.rxjs 已经存在, 因此你需要确保……

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果window.Vue存在的话, vue-rx会自动安装
⬇️
如果 window.Vue 存在的话, vue-rx 会自动安装

README-CN.md Outdated
a: 1
},
subscriptions() {
// 用 Rx 操作符声明地映射成另一个属性
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

声明地 -> 声明式地

README-CN.md Outdated

#### `$eventToObservable(event)`

转化 vue.$on (包括声明周期事件) 到 Observables. 值会以 `{ name, msg }` 的格式触发:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vue.$on -> vue.$on

README-CN.md Outdated
}
});

// vm.$once vue-rx 版本
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vm.$oncevue-rx 版本
注释中的代码也建议加反引号
下同

README-CN.md Outdated

#### `$fromDOMEvent(selector, event)`

这是一个添加到实例的原型方法. 可以用它根据实例内部元素的 DOM 事件创建 observable. 与 `Rx.Observable.fromEvent` 类似. 甚至在 DOM 渲染前, 在 `subscriptions` 函数中使用都是有用的.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rx.Observable.fromEvent 类似. 甚至在 DOM 渲染前, 在 subscriptions 函数中使用都是有用的.
⬇️
Rx.Observable.fromEvent 类似, 但是在 subscriptions 函数内部很有用, 包括在 DOM 被真正渲染前.

README-CN.md Outdated

转化函数调用为输出调用参数的 observable 队列.

这是一个添加到实例的原型方法. 用来根据函数名创建一个共享的, 热的 observable. 这个函数会被赋值到 vm 方法上去.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

会被赋值到 vm 方法上去
⬇️
会被赋值为一个 vm 方法

@Jinjiang
Copy link
Member

Jinjiang commented Jun 6, 2018

给了一些个人建议
另外中文官网有一份现成的翻译约定 https://github.com/vuejs/cn.vuejs.org/wiki
如果觉得有帮助的话可以参考一下,目前一些细节格式上,比如标点符号和空格的用法,不太一致
谢谢🤝

@Gavin-Gong
Copy link
Contributor Author

@Jinjiang 感谢大佬 Review, 根据给的建议修改了一下, 如果有错误的地方还请指教

README-CN.md Outdated

### 安装

#### NPM + ES2015

**`rxjs` 需要作为`peer dependency`引入.**
**`rxjs` 需要作为 peer dependency 引入。**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里“作为 peer dependency 引入”用了全角空格吗?用半角就可以了

README-CN.md Outdated
@@ -25,11 +25,11 @@ import VueRx from 'vue-rx';
Vue.use(VueRx);
```

使用 webpack 打包, 默认会使用`dist/vue-rx.esm.js`. 这样引入最小数量的 Rx 操作符并且保证了最小的打包体积
webpack 打包默认会使用`dist/vue-rx.esm.js` 这样引入最小数量的 Rx 操作符并且保证了最小的打包体积
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

标点符号和中文之间不需要空格,下同

README-CN.md Outdated
@@ -147,18 +147,18 @@ const plusData$ = this.plus$.pipe(pluck('data'));
}">+</button>
```

查看 [实例](https://github.com/vuejs/vue-rx/blob/master/example/counter.html).
更具体的用法请查阅 [实例](https://github.com/vuejs/vue-rx/blob/master/example/counter.html)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

两个汉字之间不需要空格,即便右侧是一个链接,下同

@Jinjiang
Copy link
Member

还有一些格式上的细节建议🤝

@Gavin-Gong
Copy link
Contributor Author

@Jinjiang 根据建议调整了下, 翻译真是个细心活😄。还得多多学习。

@yyx990803 yyx990803 merged commit 81d2dca into vuejs:master Jun 11, 2018
@yyx990803
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants