-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
vi: block-n-scopes/...md translations #2073
base: main
Are you sure you want to change the base?
Conversation
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.
I think the translation is really good, just left a few comment on some portion to make the translation clearer.
"`. Mỗi block có một giá trị và một kiểu dữ liệu, và là biểu thức cuối cùng " | ||
"của block đó:" |
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 bit is a little bit unclear, I suggest the following
"`. Mỗi block có một giá trị và một kiểu dữ liệu, và là biểu thức cuối cùng " | |
"của block đó:" | |
"`. Mỗi block có một giá trị và một kiểu dữ liệu tương ứng với biểu thức cuối cùng " | |
"của block đó:" |
|
||
#: src/control-flow-basics/blocks-and-scopes.md | ||
msgid "" | ||
"You can show how the value of the block changes by changing the last line in " | ||
"the block. For instance, adding/removing a semicolon or using a `return`." | ||
msgstr "" | ||
"Giáo viên có thể trình bày rằng giá trị của block thay đổi bằng cách thay " | ||
"đổi dòng cuối cùng của block đó. Ví dụ, thêm vào / loại bỏ dấu `;` hoặc sử " |
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.
I don't often see Vietnamese people use /
within sentences. In my opinion, the following alternatives should be clearer
"đổi dòng cuối cùng của block đó. Ví dụ, thêm vào / loại bỏ dấu `;` hoặc sử " | |
"đổi dòng cuối cùng của block đó. Ví dụ, thêm vào hoặc loại bỏ dấu `;`, hoặc sử " |
|
||
#: src/control-flow-basics/blocks-and-scopes/scopes.md | ||
msgid "A variable's scope is limited to the enclosing block." | ||
msgstr "" | ||
"Mỗi phạm vi của một biến đều được giới hạn trong một block (khối lệnh)." |
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.
I think we should retain the original meaning of scope
instead of translating it to phạm vi
. This makes it clearer that we are referring to a Rust's term, which implies the following: The variable is destroy when the program go outside the block
"Học viên có thể shadow (che khuất) các biến, bao gồm các biến ở ngoài phạm " | ||
"vi và các biến ở trong cùng phạm vi:" |
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.
Similar to the previous point, I think scope
should be kept as is. Please let me know if you have a different opinion.
In this context, I don't think You
refers to the student of the class, but rather the users of Rust in general.
Additionally, there is an extra space that needs to be removed here:
"Học viên có thể shadow (che khuất) các biến, bao gồm các biến ở ngoài phạm " | |
"vi và các biến ở trong cùng phạm vi:" | |
"Học viên có thể shadow (che khuất) các biến, bao gồm các biến ở ngoài phạm " | |
"vi và các biến ở trong cùng phạm vi:" |
|
||
#: src/control-flow-basics/blocks-and-scopes/scopes.md | ||
msgid "\"inner scope: {a}\"" | ||
msgstr "" | ||
msgstr "\"phạm vi bên trong: {a}\"" |
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.
I don't know about this. What do you think @daivinhtran
"`b` vào block bên trong ở ví dụ trên, sau đó thử truy cập biến đó ở block " | ||
"bên ngoài." |
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.
I believe this should be
"`b` vào block bên trong ở ví dụ trên, sau đó thử truy cập biến đó ở block " | |
"bên ngoài." | |
"`b` vào block bên trong ở ví dụ trên, sau đó thử truy cập biến đó từ bên ngoài block." |
"bộ nhớ của biến đó cùng đồng thời tồn tại. Tất cả đều sẵn sàng dưới cùng một " | ||
"tên, chỉ tùy thuộc học viên sử dụng chúng ở đâu trong mã." |
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.
I think the second sentence could be translated like this for a clearer meaning
"bộ nhớ của biến đó cùng đồng thời tồn tại. Tất cả đều sẵn sàng dưới cùng một " | |
"tên, chỉ tùy thuộc học viên sử dụng chúng ở đâu trong mã." | |
"bộ nhớ của biến đó cùng đồng thời tồn tại. Tất cả biến đều tồn tại dưới cùng một " | |
"tên, biến nào được sử dụng trong chương trình tùy thuộc vào việc học viên sử dụng chúng ở đâu trong mã." |
No description provided.