-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
_zh-cn/tour/tuples.md
Outdated
``` | ||
|
||
或者,在 'for' 循环推导中。 |
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.
for comprehension 是不是应该翻译为 “for 推导”,@sadhen 沈大大觉得呢?
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.
我觉得也应该是 for 推导,循环肯定是错的
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.
因为以前没有一个固定的翻译,就这么写的,那以后就统一翻译成 for 推导
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.
#1223 中翻译为for表达式
,我个人感觉更友好些,for 推导
感觉不够亲切易懂。
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.
好,看了沈大的翻译,也觉得 for 表达式更好些
_zh-cn/tour/tuples.md
Outdated
类型 Unit 的值 () 在概念上与类型 Tuple0 的值 () 相同。 这种类型只能有一个值,因为它没有元素。 | ||
|
||
用户有时可能在元组和案例类之间难以选择。 通常,如果元素具有更多含义,则首选案例类。 |
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.
case class 一般翻译为 case 类 or 样本类。
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.
現在已經有很多 Scala 中文書籍,大家對 case class 有比較一致的翻譯,可參考《Scala 實用指南》。
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.
案例类肯定不对
使用 FastHub 从我的 Galaxy Note8 发送
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.
谢谢 @satansk ,就翻成 case 类,简单明了
_zh-cn/tour/tuples.md
Outdated
``` | ||
|
||
类型 Unit 的值 () 在概念上与类型 Tuple0 的值 () 相同。 这种类型只能有一个值,因为它没有元素。 |
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.
() 可以改为 ()
,更美观一些。
这种类型可以改为“Tuple0
,个人认为更容易理解。
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.
好的,谢谢
_zh-cn/tour/tuples.md
Outdated
``` | ||
|
||
或者,在 'for' 循环推导中。 |
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.
我觉得也应该是 for 推导,循环肯定是错的
@realwunan 了解一下Markdown对中文的处理。相邻的两段之间其实会加空格。 see #1155 |
可以加一下 Gitter,讨论翻译相关话题 |
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.
Otherwise, LGTM
_zh-cn/tour/tuples.md
Outdated
元组是不可变的。 | ||
|
||
当我们必须从函数返回多个值时,元组会派上用场。 |
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.
Thanks a lot.
…iufengyun's suggestion
Thanks a lot @realwunan ! |
Simplify Chinese translation of Scala Tour: Tuples