-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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/strict-mode.md into Chinese #165
Conversation
Deploy preview for cn-reactjs ready! Built with commit 1374d39 |
Deploy preview for zh-hans-reactjs ready! Built with commit 1374d39 |
content/docs/strict-mode.md
Outdated
|
||
Previously, React provided two ways for managing refs: the legacy string ref API and the callback API. Although the string ref API was the more convenient of the two, it had [several downsides](https://github.com/facebook/react/issues/1373) and so our official recommendation was to [use the callback form instead](/docs/refs-and-the-dom.html#legacy-api-string-refs). | ||
以前,React 提供了两种方法管理 ref:过时字符串 ref API 和回调 API。 尽管字符串 ref API 在两者中使用更方便,但是它有 [一些缺点](https://github.com/facebook/react/issues/1373), 因此我们官方推荐 [使用回调方式](/docs/refs-and-the-dom.html#legacy-api-string-refs)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“回调“ -> ”回调函数“
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callback 在glossary词汇表里面确实是翻译成“回调函数”,刚开始我也是这么翻译的,但多念几遍之后,就默默的把“函数”去掉了。这里我重新加回去吧
content/docs/strict-mode.md
Outdated
|
||
You can instead make this explicit by pass a ref to your custom component and pass that along to the DOM using [ref forwarding](/docs/forwarding-refs.html#forwarding-refs-to-dom-components). | ||
你可以通过将 ref 传递给自定义组件并使用 [ref 转发](/docs/forwarding-refs.html#forwarding-refs-to-dom-components) 来将其传递给 DOM 节点。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
”转发“还是”传递“比较好?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个forward貌似很多地方都出现了,有些地方翻译成“转发”,有些地方翻译成“传递”,还有些地方翻译成“转递”,再听听各位意见
content/docs/strict-mode.md
Outdated
|
||
Strict mode can't automatically detect side effects for you, but it can help you spot them by making them a little more deterministic. This is done by intentionally double-invoking the following methods: | ||
严格模式不能自动检测到你的副作用,但它可以帮助你发现它们,使它们更具确定性。这是通过故意双重调用以下方法来完成的: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
”双重“ 总感觉有点怪。”重复“?或者”两次“?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double-invoking 我最刚开始翻译成“两次调用”,然后想想,改成了双重调用;其实翻译成“重复调用”放到句子里面最通顺的,但总觉得double应该是“双”或者“二”的意思,翻译经验不多,再听听各位的意见
content/docs/strict-mode.md
Outdated
|
||
### Detecting legacy context API {#detecting-legacy-context-api} | ||
通过故意双重调用方法(如组件的构造函数),严格模式使得这样的情况更容易被发现。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
收到,我去群里再问问大家意见,之前有咨询过,争取今天把所有问题修复完成
This looks to me a solid translation. Thanks for your contribution! @fonkie 👍 cc @QC-L @hijiangtao |
…ict-mode.md) following Reviewer's advice
No description provided.