Skip to content
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

docs(cn): translate content/docs/optimizing-performance.md into Chinese #120

Merged
merged 8 commits into from Mar 20, 2019

Conversation

zombieJ
Copy link
Collaborator

@zombieJ zombieJ commented Feb 18, 2019

No description provided.

@netlify
Copy link

netlify bot commented Feb 18, 2019

Deploy preview for cn-reactjs ready!

Built with commit e2f69d5

https://deploy-preview-120--cn-reactjs.netlify.com

@QC-L QC-L added the Pending Review 已翻译,待校对阶段 label Feb 19, 2019
@QC-L QC-L mentioned this pull request Feb 19, 2019
Copy link
Collaborator

@LeoEatle LeoEatle left a comment

Choose a reason for hiding this comment

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

LGTM
总体上没啥问题,有些地方感觉可以改进一下

content/docs/optimizing-performance.md Outdated Show resolved Hide resolved
content/docs/optimizing-performance.md Outdated Show resolved Hide resolved
content/docs/optimizing-performance.md Outdated Show resolved Hide resolved
content/docs/optimizing-performance.md Outdated Show resolved Hide resolved
content/docs/optimizing-performance.md Outdated Show resolved Hide resolved
content/docs/optimizing-performance.md Outdated Show resolved Hide resolved
content/docs/optimizing-performance.md Outdated Show resolved Hide resolved
Co-Authored-By: zombieJ <smith3816@gmail.com>
LeoEatle
LeoEatle previously approved these changes Feb 20, 2019
Copy link
Collaborator

@LeoEatle LeoEatle left a comment

Choose a reason for hiding this comment

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

Approved

@seognil
Copy link
Contributor

seognil commented Feb 20, 2019

@QC-L

注意行号保持一致

(共五处)
8 9 => 9
188 => 188 189 190
207 208 209 => 207
313 => 313 314 315
391 391 => 391

以下纠错为对齐的行号

错别字

142
Note:
注意:

162
游览器
浏览器

194 195 217 218
浏览器拓展
浏览器扩展

的地得

182
在生产环境中组件相对会渲染的更快些
在生产环境中组件会相对渲染得更快些

205 (+改进)
并奇迹般的降低重新渲染组件的时间消耗
并奇迹般地降低重新渲染组件消耗的时间

162 (+改进)
你可以在支持的浏览器中可视化了解
你可以通过支持的浏览器可视化地了解

215
你可以通过 React 开发者工具可视化查看
你可以通过 React 开发者工具可视化地查看

435
不可变数据结构使你可以方便的追踪对象的变化
不可变数据结构使你可以方便地追踪对象的变化

翻译错误/部分意思丢失

168
它们会干扰度量结果
他们会严重干扰度量结果

200
react-dom 的生产分析包可以在 react-dom/profiling 中找到
react-dom 的生产分析包也可以在 react-dom/profiling 中找到

315
下面是一个并不完整的样例:
以下代码并不正确:

375
你可以改写代码来避免可变对象的产生,同时很方便的操作对象。
你可以用类似的方式改写代码来避免可变对象的产生。

争议

用词一致性
160 172
性能 - Performance
Chrome 性能标签
Chrome 开发者工具的 Performance 标签

固定用法
(共8处)
Chrome 开发者工具
React 开发者工具

开发工具 => 开发者工具

消歧义
170
确保你是在开发模式下运行应用。
确保你是在 React 的开发模式下运行应用。

行文顺序/流畅性改进(待定)

9
UI 更新需要对 DOM 进行操作,而 React 内部通过几种巧妙的技术以最小化操作 DOM 来降低性能损耗。
UI 更新需要昂贵的 DOM 操作,而 React 内部使用几种巧妙的技术以便最小化 DOM 操作次数。

25
推荐在开发你的应用时使用开发模式,而在你为用户部署应用时使用生产模式。
推荐你在开发应用时使用开发模式,而在为用户部署应用时使用生产模式。

27
你可以在下面看到几种生产构建的使用说明。
你可以在下面看到几种为应用构建生产版本的操作说明。

43
我们提供了可以在生产环境使用的 React 和 React DOM 的单个文件:
我们提供了可以在生产环境使用的单文件版 React 和 React DOM:

189
你可以在这篇博客《介绍 React 分析器》中了解概述。
你可以在《介绍 React 分析器》这篇博客中了解概述。

243
它覆写了 shouldComponentUpdate() 来对当前和之前的 props 和 state 进行浅比较。
它用当前与之前 props 和 state 的浅比较覆写了 shouldComponentUpdate() 的实现。

247
代表是否返回的 React 元素相同
代表返回的 React 元素是否相同

措辞细节/流畅性改进(待定)

9
对于大部分应用而言,使用 React 不需要特别去优化就已拥有高性能的用户界面。
对于大部分应用而言,使用 React 时无需专门优化就已拥有高性能的用户界面。

17
如果你浏览一个使用 React 生产版本的网站
如果你浏览一个基于 React 生产版本的网站

21
如果你浏览一个使用 React 开发模式的网站
如果你浏览一个基于 React 开发模式的网站

31
如果你的项目是通过[]开发,运行
如果你的项目是通过[]开发的,执行

37
这段脚本
这段命令

70 104 138 158
注意
请注意,

90
举例:
举个例子:

101
这个包名叫做 uglify-js
这个包的名字叫做 uglify-js

166
在 Chrome 如下操作:
在 Chrome 中进行如下操作:

180
你可以通过查阅[这篇文章]以获取更详尽的指导。
你可以查阅[这篇文章]以获取更详尽的指导。

182
当然了,这能帮助你查看是否有不相关的组件被错误的更新,以及你的 UI 更新深度和频率。
当然了,这能帮助你查看是否有不相关的组件被错误地更新,以及 UI 更新的深度和频率。

184
我们期待有更多的浏览器来支持它。
我们期待有更多浏览器能支持它。

186
使用开发者工具的分析器对组件进行分析
使用开发者工具中的分析器对组件进行分析

190
你同样可以[在 YouTube 上]观看分析器的视频指导。
你也可以[在 YouTube 上]观看分析器的视频指导。

201
可以通过[fb.me/react-profiling]来了解
通过查阅[fb.me/react-profiling]来了解

205
这项技术会在有限的时间内仅渲染少量的数据,
这项技术会在有限的时间内仅渲染有限的内容,

211
React 构建并维护了一套内部的 UI 渲染陈述
React 构建并维护了一套内部的 UI 渲染描述

211
该陈述使得
该描述使得

213
当一个组件的 props 或者 state 变更,
当一个组件的 props 或 state 变更,

213
React 会将最新返回的元素与之前的记录的元素进行对比,来决定是否有必要更新真实的 DOM。
React 会将最新返回的元素与之前渲染的元素进行对比,以此决定是否有必要更新真实的 DOM。

365
this syntax is available by default
该运算符默认已经支持了
该语法已经默认支持了

393
以使得不改变对象的更新变得更方便
以使得更新不可变对象变得更方便

Copy link
Contributor

@seognil seognil left a comment

Choose a reason for hiding this comment

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

@netlify
Copy link

netlify bot commented Feb 21, 2019

Deploy preview for zh-hans-reactjs ready!

Built with commit e2f69d5

https://deploy-preview-120--zh-hans-reactjs.netlify.com

Copy link
Member

@QC-L QC-L left a comment

Choose a reason for hiding this comment

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

LGTM

@QC-L QC-L added Pending Re-Review 已修改,待审校阶段 and removed Pending Review 已翻译,待校对阶段 labels Feb 21, 2019
Copy link
Collaborator

@LeoEatle LeoEatle left a comment

Choose a reason for hiding this comment

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

LGTM

@QC-L QC-L merged commit 97387a0 into reactjs:master Mar 20, 2019
@zombieJ zombieJ deleted the optimizing-performance branch March 20, 2019 08:56
OhIAmFine pushed a commit to OhIAmFine/zh-hans.reactjs.org that referenced this pull request May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending Re-Review 已修改,待审校阶段
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants