-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
docs(cn): translate content/docs/forwarding-refs.md into Chinese #118
Conversation
Deploy preview for cn-reactjs ready! Built with commit 13d2793 |
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.
赞👍!
指出了一些小错误,提供了一部分额外建议。还需要对某些格式问题做约定……
引号和英文空格问题可以先无视,麻烦啦!
…description to make the doc easier to understand.
2. Update glossary translation. 3. Update format.
Deploy preview for zh-hans-reactjs ready! Built with commit 13d2793 |
content/docs/forwarding-refs.md
Outdated
|
||
For example, the following component will appear as "*ForwardRef*" in the DevTools: | ||
示例,以下组件将在 DevTools 中显示为 “*ForwardRef*”: |
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.
中文全角符号两侧不需要空格。
示例,以下组件将在 DevTools 中显示为 “*ForwardRef*”: | |
示例,以下组件将在 DevTools 中显示为“*ForwardRef*”: |
@robertying @yuqingc 感谢两位大佬~ |
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.
some suggestion
content/docs/forwarding-refs.md
Outdated
|
||
**When you start using `forwardRef` in a component library, you should treat it as a breaking change and release a new major version of your library.** This is because your library likely has an observably different behavior (such as what refs get assigned to, and what types are exported), and this can break apps and other libraries that depend on the old behavior. | ||
**当你开始在组件库中使用 `forwardRef` 时,你应当将其作为一个破坏性更改,并发布库的一个新的主板本。** 这是因为你的库可能会有明显不同的行为(例如 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.
**当你开始在组件库中使用 `forwardRef` 时,你应当将其作为一个破坏性更改,并发布库的一个新的主板本。** 这是因为你的库可能会有明显不同的行为(例如 refs 被分配给了什么,以及导出了什么类型),并且这样可能会导致依赖旧行为的应用和其他库崩溃。 | |
**当你开始在组件库中使用 `forwardRef` 时,你应当将其视为一个破坏性更改,并发布库的一个新的主版本。** 这是因为你的库可能会有明显不同的行为(例如 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.
what refs get assigned to
字面上理解 应该是指什么, 但是此处用谁好像更通顺一点。但在不影响表意的情况下,个人倾向于更遵照直译,大佬怎么看?
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.
这里需要注意一下“主板本”=>“主版本”
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.
@yhsunshining 主版本改下
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.
2. Modify part description.
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.
ok
Translate content/docs/forwarding-refs.md into Chinese.