-
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
doc(cn): translate tutorial to zh-cn #12
Conversation
ac32d36
to
e8c410a
Compare
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.
tutorial.md L1-L117 review
- 中英文空格问题需要通篇检查一下,中文之间不需要添加空格
- 部分单词如 class 前后文翻译需要保持一致
- 其他一些地方,表述稍有繁琐,可以修改
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.
校对范围 L117-L225
|
||
We will also replace reading `this.state.history` with `this.state.history.slice(0, this.state.stepNumber + 1)`. This ensures that if we "go back in time" and then make a new move from that point, we throw away all the "future" history that would now become incorrect. | ||
我们还把读取 `this.state.history` 换成了读取 `this.state.history.slice(0, this.state.stepNumber + 1)` 的值。如果我们“回到过去”,然后再走一步新棋子,原来的“未来”历史记录就不正确了,这个替换可以保证我们把这些“未来”的不正确的历史记录丢弃掉。 |
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.state.history` 换成了读取 `this.state.history.slice(0, this.state.stepNumber + 1)` 的值。如果我们“回到过去”,然后再走一步新棋子,原来的“未来”历史记录就不正确了,这个替换可以保证我们把这些“未来”的不正确的历史记录丢弃掉。 | |
还需要将 `this.state.history` 替换为 `this.state.history.slice(0, this.state.stepNumber + 1)`。如果我们“悔棋”,然后再走一步新棋子,原来的“未来”历史记录就不正确了,这个替换可以将这些不正确的“未来”历史记录丢弃掉。 |
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.
pending
content/tutorial/tutorial.md
Outdated
@@ -1188,41 +1188,41 @@ We will also replace reading `this.state.history` with `this.state.history.slice | |||
} | |||
``` | |||
|
|||
Finally, we will modify the Game component's `render` method from always rendering the last move to rendering the currently selected move according to `stepNumber`: | |||
最后一步,我们把 Game 组件的 `render` 方法从总是渲染最后一个步骤更改为,根据 stepNumber` 渲染当前选择的步骤。 |
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.
最后一步,我们把 Game 组件的 `render` 方法从总是渲染最后一个步骤更改为,根据 stepNumber` 渲染当前选择的步骤。 | |
最后,修改 Game 组件的 `render` 方法,将代码从始终根据最后一次移动渲染修改为根据当前 `stepNumber` 渲染。 |
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.
不是始终根据最后一次移动啊,from... 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.
@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.
好的 已改
Thank you for the PR! Contributors like you keep React awesome!
Please see the Contribution Guide for guidelines:
https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md
If your PR references an existing issue, please add the issue number below
-->