Skip to content

看教程过程中感觉有些不顺的地方#584

Merged
bemself merged 12 commits intojavascript-tutorial:masterfrom
yyxygit:fix-yyxygit
Jan 14, 2020
Merged

看教程过程中感觉有些不顺的地方#584
bemself merged 12 commits intojavascript-tutorial:masterfrom
yyxygit:fix-yyxygit

Conversation

@yyxygit
Copy link
Copy Markdown
Contributor

@yyxygit yyxygit commented Jan 7, 2020

目标章节:

1-js/04-object-basics/06-constructor-new/
1-js/05-data-types/01-primitives-methods/
1-js/05-data-types/02-number/

当前上游最新 commit:da7c9de7

所做更改如下:

文件名 参考上游 commit 更改(理由)
task.md d3dbf3b 一行翻译
solution.md d3dbf3b 与英文版同步
article.md d3dbf3b 一行翻译
article.md d3dbf3b 同步英文版示例,更新翻译

@javascript-translate-bot javascript-translate-bot requested a review from a team January 7, 2020 05:55
@yyxygit yyxygit changed the title tiny update 看教程过程中感觉有些不顺的地方 Jan 7, 2020
Copy link
Copy Markdown
Collaborator

@bemself bemself left a comment

Choose a reason for hiding this comment

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

感谢校正,校对完成~

Comment thread 1-js/04-object-basics/06-constructor-new/2-calculator-constructor/task.md Outdated
Comment thread 1-js/04-object-basics/06-constructor-new/article.md Outdated
Comment thread 1-js/05-data-types/01-primitives-methods/1-string-new-property/solution.md Outdated
Comment thread 1-js/05-data-types/01-primitives-methods/1-string-new-property/solution.md Outdated
Comment thread 1-js/05-data-types/01-primitives-methods/article.md Outdated
Comment thread 1-js/05-data-types/02-number/article.md Outdated
Comment thread 1-js/05-data-types/02-number/article.md Outdated
Comment thread 1-js/05-data-types/02-number/article.md Outdated
@javascript-translate-bot
Copy link
Copy Markdown

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@yyxygit
Copy link
Copy Markdown
Contributor Author

yyxygit commented Jan 8, 2020

客气啦,其实也不知道改的有没问题 😓

@bemself
Copy link
Copy Markdown
Collaborator

bemself commented Jan 12, 2020 via email

@yyxygit
Copy link
Copy Markdown
Contributor Author

yyxygit commented Jan 12, 2020

@bemself push上来了,292de64

@bemself
Copy link
Copy Markdown
Collaborator

bemself commented Jan 12, 2020

@yyxygit 好像有冲突文件呢, 您查看解决一下? 另外看到多出来2个文件(之前是5个好像), 回网我看下多出来的文件修改~

@yyxygit
Copy link
Copy Markdown
Contributor Author

yyxygit commented Jan 12, 2020

@bemself 在github上解决冲突了,然后点击了merge,您看是这样处理吗?
是的,之前有提交了其他文件修改,Map&Set那节参考《ES标准入门》第三版(阮一峰)对应Map章节翻译
ps:太客气了,不需要用“您”啊 😓 明显您才是前辈

@bemself
Copy link
Copy Markdown
Collaborator

bemself commented Jan 12, 2020

@yyxygit 👍 等回网看下新增加的文件. 另外提醒一下那个done的标记不是写在"commit message"里, 而是像我们现在这样对话的 "issue comment"里面.

P.S. 那好,俺以后不用您了, 不过俺也不是前辈, 大家一起学习拉

@yyxygit
Copy link
Copy Markdown
Contributor Author

yyxygit commented Jan 12, 2020

/done
@bemself 好的,一起学习 :)

Copy link
Copy Markdown
Collaborator

@bemself bemself left a comment

Choose a reason for hiding this comment

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

@yyxygit 感谢,校对完成~
其中有一些是以前的翻译里的,看到就顺便麻烦你也顺便改一下了~
另外想提醒一下,尽量每个 PR 在独立的分支里,提了之后如有其它文章的改动可放新分支提新 PR~

在我们学习了那些之后,我们将回到对象,在<info:prototypes><info:classes>章节中深入介绍它们。
```
在我们学习了那些之后,我们将回到对象,在 <info:prototypes><info:classes> 章节中深入介绍它们。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这一行貌似被删掉了?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

218 行 添加了<>前后空格
219 行 有三个反引号
没有删掉啊?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@yyxygit 219 行的三个反引号我这边显示删掉了呢,截图如下~
image

Copy link
Copy Markdown
Contributor Author

@yyxygit yyxygit Jan 14, 2020

Choose a reason for hiding this comment

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

@bemself webstorm 分支 fix-yyxygit里是有的,pull了分支代码就没了,
再提交以下吧

```

正如我们看到的那样,`Map` 的键可以被转化为字符串而不是像普通对象那样不能转化, 任何类型的键都是可能的.
如我们所见,与对象不同,键不会转换为字符串。键(key)可以是任何类型。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这里出现两次键, 而这个带英文注释的“键(key)”放在后面。建议:

  • (key)放在第一个键的后面,第二个键就不需要了
  • 另外查一下,如果前文已经有过(key)注释了,这里也就不需要了~

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

收到,搜过中文网页了,全页没有 ”键(key)“形式注释过,42行改为:

如我们所见,与对象不同,键(key)不会转换为字符串。键可以是任何类型。

这样?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@yyxygit 是的~


使用对象作为键是 `Map` 最出名也是最重要的特点. 对于字符键, `Object` (普通对象)能正常使用, 但是使用键就会产生意料之外的效果.

使用对象作为键是 `Map` 最值得注意和重要的功能之一。对于字符串键, `Object` (普通对象)能正常使用,但对于对象键则不能。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
使用对象作为键是 `Map` 最值得注意和重要的功能之一。对于字符串键, `Object` (普通对象)能正常使用,但对于对象键则不能。
使用对象作为键是 `Map` 最值得注意和重要的功能之一。对于字符串键,`Object`(普通对象)能正常使用,但对于对象键则不能。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@yyxygit 对的,如果前后有全角中文标点符号,可以不加空格

- `map.entries()` -- returns an iterable for entries `[key, value]`, it's used by default in `for..of`.
- `map.keys()` -- 返回键名的遍历器,
- `map.values()` -- 返回键值的遍历器,
- `map.entries()` -- 返回实体 `[key, value]` 的遍历器,默认在for..of中使用。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- `map.entries()` -- 返回实体 `[key, value]` 的遍历器,默认在for..of中使用
- `map.entries()` 返回实体 `[key, value]` 的遍历器,默认在 `for..of` 中使用

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

请问,英文中两个半角中划线 --
替换成一个全角中文中划线?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@yyxygit 是的,英文中两个半角中划线 -- 替换成一个全角中文中划线

- `map.values()` -- returns an iterable for values,
- `map.entries()` -- returns an iterable for entries `[key, value]`, it's used by default in `for..of`.
- `map.keys()` -- 返回键名的遍历器,
- `map.values()` -- 返回键值的遍历器,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- `map.values()` -- 返回键值的遍历器,
- `map.values()` 返回键值的遍历器,

- `map.keys()` -- returns an iterable for keys,
- `map.values()` -- returns an iterable for values,
- `map.entries()` -- returns an iterable for entries `[key, value]`, it's used by default in `for..of`.
- `map.keys()` -- 返回键名的遍历器,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- `map.keys()` -- 返回键名的遍历器,
- `map.keys()` 返回键名的遍历器,

@@ -325,4 +325,4 @@ set.forEach((value, valueAgain, set) => {
- `set.clear()` -- 清空 set。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- `set.clear()` -- 清空 set。
- `set.clear()` 清空 set。

@@ -325,4 +325,4 @@ set.forEach((value, valueAgain, set) => {
- `set.clear()` -- 清空 set。
- `set.size` -- 返回当前全部元素的数量。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- `set.size` -- 返回当前全部元素的数量。
- `set.size` 返回当前全部元素的数量。

@javascript-translate-bot
Copy link
Copy Markdown

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@yyxygit
Copy link
Copy Markdown
Contributor Author

yyxygit commented Jan 14, 2020

/done

Copy link
Copy Markdown
Collaborator

@bemself bemself left a comment

Choose a reason for hiding this comment

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

感谢翻译,校对完成~ Map 文件中有些历史遗留问题,不在本 PR 里面改了,回头我单开一个 PR 更正

@bemself bemself merged commit 487b2bc into javascript-tutorial:master Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants