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/error-boundaries.md into Chinese #153

Merged
merged 36 commits into from
Apr 21, 2019

Conversation

LCINA
Copy link
Contributor

@LCINA LCINA commented Mar 2, 2019

feat: Complete the translation of the error-boundaries.md.
3ad3ca2

@netlify
Copy link

netlify bot commented Mar 2, 2019

Deploy preview for cn-reactjs ready!

Built with commit 0d59fa3

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

@netlify
Copy link

netlify bot commented Mar 2, 2019

Deploy preview for zh-hans-reactjs ready!

Built with commit 0d59fa3

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

@QC-L QC-L added the Pending Review 已翻译,待校对阶段 label Mar 2, 2019
@QC-L QC-L mentioned this pull request Mar 5, 2019
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
hateonion and others added 3 commits March 6, 2019 10:45
fix: translate `introducing-error-boundaries` to “错误边界介绍”.

Co-Authored-By: LCINA <870206584@qq.com>
fix: merge suggestion.

Co-Authored-By: LCINA <870206584@qq.com>
fix: merge suggestion.
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
hateonion and others added 8 commits March 20, 2019 22:55
Co-Authored-By: LCINA <870206584@qq.com>
好,确实有点奇怪

Co-Authored-By: LCINA <870206584@qq.com>
merge

Co-Authored-By: LCINA <870206584@qq.com>
merge

Co-Authored-By: LCINA <870206584@qq.com>
merge

Co-Authored-By: LCINA <870206584@qq.com>
merge

Co-Authored-By: LCINA <870206584@qq.com>
Copy link
Collaborator

@postor postor left a comment

Choose a reason for hiding this comment

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

类组件统一使用 class 组件,详见词汇表

content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
content/docs/error-boundaries.md Outdated Show resolved Hide resolved
@QC-L
Copy link
Member

QC-L commented Mar 27, 2019

@LCINA 有空改下?

@LCINA
Copy link
Contributor Author

LCINA commented Mar 27, 2019

@LCINA 有空改下?

ok

@LCINA LCINA closed this Mar 27, 2019
@QC-L QC-L reopened this Mar 27, 2019
@QC-L
Copy link
Member

QC-L commented Mar 27, 2019

你点错了吧?

postor and others added 3 commits March 27, 2019 14:40
Co-Authored-By: LCINA <870206584@qq.com>
Co-Authored-By: LCINA <870206584@qq.com>
Co-Authored-By: LCINA <870206584@qq.com>
@LCINA
Copy link
Contributor Author

LCINA commented Mar 27, 2019

你点错了吧?

不好意思,已经确认后提交了。

@QC-L
Copy link
Member

QC-L commented Mar 27, 2019

@LCINA 我给你发个邮件,你加下群~

yuqingc and others added 6 commits April 12, 2019 10:00
Co-Authored-By: LCINA <870206584@qq.com>
Co-Authored-By: LCINA <870206584@qq.com>
Co-Authored-By: LCINA <870206584@qq.com>
Co-Authored-By: LCINA <870206584@qq.com>
Co-Authored-By: LCINA <870206584@qq.com>
Co-Authored-By: LCINA <870206584@qq.com>
@yuqingc
Copy link
Member

yuqingc commented Apr 13, 2019

第 3 行的 titile 也需要翻译的。


A class component becomes an error boundary if it defines either (or both) of the lifecycle methods [`static getDerivedStateFromError()`](/docs/react-component.html#static-getderivedstatefromerror) or [`componentDidCatch()`](/docs/react-component.html#componentdidcatch). Use `static getDerivedStateFromError()` to render a fallback UI after an error has been thrown. Use `componentDidCatch()` to log error information.
如果一个 class 组件中定义了 [`static getDerivedStateFromError()`](/docs/react-component.html#static-getderivedstatefromerror) [`componentDidCatch()`](/docs/react-component.html#componentdidcatch) 这两个生命周期方法中的任意一个(或两个)时,那么它就变成一个错误边界 (error boundary)。当抛出错误后,请使用 `static getDerivedStateFromError()` 渲染备用 UI ,使用 `componentDidCatch()` 打印错误信息。
Copy link
Collaborator

Choose a reason for hiding this comment

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

前面已经出现了许多次 error boundary ,在这里进行原文注解有些迟了,要注解的话不如挪到正文首次出现的地方?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已做更新。


Error boundaries are React components that **catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI** instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.
错误边界并不会使整个组件树崩溃,它是 **用于捕获子组件树中任意位置的 JavaScript 错误,记录错误并显示一个备用 UI** 的 React 组件。 错误边界在渲染期间、生命周期方法和整个组件树的构造函数中捕获错误。
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

content/docs/error-boundaries.md Outdated Show resolved Hide resolved
yuqingc
yuqingc previously approved these changes Apr 20, 2019
Co-Authored-By: LCINA <870206584@qq.com>
@LCINA LCINA dismissed stale reviews from yuqingc via ae13c1a April 20, 2019 13:17
Co-Authored-By: LCINA <870206584@qq.com>
@QC-L QC-L changed the title error-boundaries.md docs(cn): translate content/docs/error-boundaries.md into Chinese Apr 21, 2019
@QC-L QC-L merged commit b65c10e into reactjs:master Apr 21, 2019
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 Modify 已校对,待修改阶段
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants