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/warnings/dont-call-proptypes.md into Chinese #115

Merged
merged 4 commits into from Mar 20, 2019
Merged

docs(cn): translate content/warnings/dont-call-proptypes.md into Chinese #115

merged 4 commits into from Mar 20, 2019

Conversation

seognil
Copy link
Contributor

@seognil seognil commented Feb 17, 2019

https://stackblitz.com/edit/react-dont-call-proptypes
warning (crash) 重现

call XX
这里的 call 应该是指 JS 里的函数/方法调用
那么我统一翻译成 调用 XX 函数

@seognil seognil changed the title docs(cn): content/warnings/dont-call-proptypes.md into Chinese docs(cn): translate content/warnings/dont-call-proptypes.md into Chinese Feb 17, 2019
@netlify
Copy link

netlify bot commented Feb 17, 2019

Deploy preview for cn-reactjs ready!

Built with commit 649991f

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

@seognil seognil mentioned this pull request Feb 17, 2019
@QC-L QC-L added the Pending Review 已翻译,待校对阶段 label Feb 17, 2019
LeoEatle
LeoEatle previously approved these changes 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
没什么大问题,有个错别字修下就行


In a future major release of React, the code that implements PropType validation functions will be stripped in production. Once this happens, any code that calls these functions manually (that isn't stripped in production) will throw an error.
在 React 未来的主要版本(major release)中。执行 PropType 校验函数的代码应该从生成环境中剥离。此时,任何手动调用这些函数的代码(还没从生产环境中剥离的)都会产生报错。
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
在 React 未来的主要版本(major release)中。执行 PropType 校验函数的代码应该从生成环境中剥离。此时,任何手动调用这些函数的代码(还没从生产环境中剥离的)都会产生报错。
在 React 未来的主要版本(major release)中。执行 PropType 校验函数的代码应该从生产环境中剥离。此时,任何手动调用这些函数的代码(还没从生产环境中剥离的)都会产生报错。


Inspect the stack trace produced by the warning. You will find the component definition responsible for the PropTypes direct call. Most likely, the issue is due to third-party PropTypes that wrap React’s PropTypes, for example:
检查警告产生的堆栈跟踪。你将找到涉及 PropTypes 直接调用的组件定义。最有可能的是,问题是由包装(wrap)了 React PropTypes 的第三方的 PropTypes 导致的,举个例子:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
检查警告产生的堆栈跟踪。你将找到涉及 PropTypes 直接调用的组件定义。最有可能的是,问题是由包装(wrap)了 React PropTypes 的第三方的 PropTypes 导致的,举个例子:
检查警告产生的堆栈跟踪。你将找到涉及 PropTypes 直接调用的组件定义。很有可能问题是由包装(wrap)了 React PropTypes 的第三方的 PropTypes 导致的,举个例子:

感觉这样口语化一些

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

@netlify
Copy link

netlify bot commented Mar 20, 2019

Deploy preview for zh-hans-reactjs ready!

Built with commit 649991f

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

@QC-L QC-L merged commit 7b0f88f into reactjs:master Mar 20, 2019
OhIAmFine pushed a commit to OhIAmFine/zh-hans.reactjs.org that referenced this pull request May 6, 2019
…ese (reactjs#115)

https://stackblitz.com/edit/react-dont-call-proptypes
warning (crash) 重现

call XX
这里的 call 应该是指 JS 里的函数/方法调用
那么我统一翻译成 `调用 XX 函数`
@awxiaoxian2020 awxiaoxian2020 removed the Pending Review 已翻译,待校对阶段 label Feb 23, 2023
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.

5 participants