Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

HuyNVuong
Copy link
Contributor

No description provided.

Copy link
Contributor

@vohoanglong0107 vohoanglong0107 left a 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.

Comment on lines +3357 to +3358
"`. 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 đó:"
Copy link
Contributor

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

Suggested change
"`. 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ử "
Copy link
Contributor

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

Suggested change
"đổ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)."
Copy link
Contributor

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

Comment on lines +3391 to +3392
"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:"
Copy link
Contributor

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:

Suggested change
"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}\""
Copy link
Contributor

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

Comment on lines +3422 to +3423
"`b` vào block bên trong ở ví dụ trên, sau đó thử truy cập biến đó ở block "
"bên ngoài."
Copy link
Contributor

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

Suggested change
"`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."

Comment on lines +3432 to +3433
"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ã."
Copy link
Contributor

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

Suggested change
"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ã."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants