Skip to content

Simplify Chinese translation of Scala Tour: tuples.md #1217

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

Merged
merged 5 commits into from
Nov 29, 2018

Conversation

realwunan
Copy link
Contributor

Simplify Chinese translation of Scala Tour: Tuples

```

或者,在 'for' 循环推导中。

Choose a reason for hiding this comment

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

for comprehension 是不是应该翻译为 “for 推导”,@sadhen 沈大大觉得呢?

Copy link
Contributor

Choose a reason for hiding this comment

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

我觉得也应该是 for 推导,循环肯定是错的

Copy link
Contributor Author

Choose a reason for hiding this comment

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

因为以前没有一个固定的翻译,就这么写的,那以后就统一翻译成 for 推导

Copy link
Contributor

Choose a reason for hiding this comment

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

#1223 中翻译为for表达式,我个人感觉更友好些,for 推导感觉不够亲切易懂。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好,看了沈大的翻译,也觉得 for 表达式更好些

类型 Unit 的值 () 在概念上与类型 Tuple0 的值 () 相同。 这种类型只能有一个值,因为它没有元素。

用户有时可能在元组和案例类之间难以选择。 通常,如果元素具有更多含义,则首选案例类。

Choose a reason for hiding this comment

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

case class 一般翻译为 case 类 or 样本类。

Copy link
Contributor

Choose a reason for hiding this comment

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

这里至少要和已有的翻译一致

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我不确定已有的翻译是什么,能帮我指出来哪里有吗,谢谢

Choose a reason for hiding this comment

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

現在已經有很多 Scala 中文書籍,大家對 case class 有比較一致的翻譯,可參考《Scala 實用指南》。

Copy link

Choose a reason for hiding this comment

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

案例类肯定不对

使用 FastHub 从我的 Galaxy Note8 发送

Copy link
Contributor Author

Choose a reason for hiding this comment

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

谢谢 @satansk ,就翻成 case 类,简单明了

```

类型 Unit 的值 () 在概念上与类型 Tuple0 的值 () 相同。 这种类型只能有一个值,因为它没有元素。

Choose a reason for hiding this comment

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

() 可以改为 (),更美观一些。

这种类型可以改为“Tuple0,个人认为更容易理解。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,谢谢

```

或者,在 'for' 循环推导中。
Copy link
Contributor

Choose a reason for hiding this comment

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

我觉得也应该是 for 推导,循环肯定是错的

@da-liii
Copy link
Contributor

da-liii commented Nov 18, 2018

@realwunan 了解一下Markdown对中文的处理。相邻的两段之间其实会加空格。

see #1155

@da-liii
Copy link
Contributor

da-liii commented Nov 24, 2018

@realwunan

可以加一下 Gitter,讨论翻译相关话题

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

Otherwise, LGTM

元组是不可变的。

当我们必须从函数返回多个值时,元组会派上用场。
Copy link
Contributor

Choose a reason for hiding this comment

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

必须-> 需要,这样读起来更顺些

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks a lot.

@liufengyun
Copy link
Contributor

Thanks a lot @realwunan !

@liufengyun liufengyun merged commit 391c656 into scala:master Nov 29, 2018
@realwunan realwunan deleted the tuples branch November 29, 2018 09:12
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