mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-19 22:19:29 +02:00
vi: block-n-scopes/...md translations (#2073)
This commit is contained in:
parent
1a1480ea04
commit
176e9502e2
37
po/vi.po
37
po/vi.po
@ -3395,7 +3395,7 @@ msgstr ""
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes.md
|
||||
msgid "Blocks"
|
||||
msgstr ""
|
||||
msgstr "Blocks (khối lệnh)"
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes.md
|
||||
msgid ""
|
||||
@ -3403,60 +3403,73 @@ msgid ""
|
||||
"Each block has a value and a type, which are those of the last expression of "
|
||||
"the block:"
|
||||
msgstr ""
|
||||
"Mỗi block trong Rust chứa một chuỗi những biểu thức, được bao bọc bởi dấu `{}"
|
||||
"`. 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 "\"y: {y}\""
|
||||
msgstr ""
|
||||
msgstr "\"y: {y}\""
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes.md
|
||||
msgid ""
|
||||
"If the last expression ends with `;`, then the resulting value and type is "
|
||||
"`()`."
|
||||
msgstr ""
|
||||
"Nếu biểu thức cuối cùng kết thúc bằng dấu `;`, giá trị trả về và kiểu dữ "
|
||||
"liệu sẽ là `()`."
|
||||
|
||||
#: 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 hoặc loại bỏ dấu `;` hoặc "
|
||||
"sử dụng lệnh `return`"
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid "A variable's scope is limited to the enclosing block."
|
||||
msgstr ""
|
||||
msgstr "Mỗi scope của một biến đều được giới hạn trong một block (khối lệnh)."
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid ""
|
||||
"You can shadow variables, both those from outer scopes and variables from "
|
||||
"the same scope:"
|
||||
msgstr ""
|
||||
"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 một scope:"
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid "\"before: {a}\""
|
||||
msgstr ""
|
||||
msgstr "\"ban đầu: {a}\""
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md src/generics/exercise.md
|
||||
#: src/generics/solution.md src/std-traits/from-and-into.md
|
||||
#: src/lifetimes/solution.md
|
||||
msgid "\"hello\""
|
||||
msgstr ""
|
||||
msgstr "\"hello\""
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid "\"inner scope: {a}\""
|
||||
msgstr ""
|
||||
msgstr "\"inner scope (phạm vi bên trong): {a}\""
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid "\"shadowed in inner scope: {a}\""
|
||||
msgstr ""
|
||||
msgstr "\"được shadow bên trong phạm vi: {a}\""
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid "\"after: {a}\""
|
||||
msgstr ""
|
||||
msgstr "\"sau cùng: {a}\""
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid ""
|
||||
"Show that a variable's scope is limited by adding a `b` in the inner block "
|
||||
"in the last example, and then trying to access it outside that block."
|
||||
msgstr ""
|
||||
"Trình bày rằng mỗi phạm vi của một biến bị giới hạn bằng cách thêm một biến "
|
||||
"`b` vào block bên trong ở ví dụ trên, sau đó thử truy cập biến đó từ bên "
|
||||
"ngoài block."
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid ""
|
||||
@ -3464,16 +3477,24 @@ msgid ""
|
||||
"variable's memory locations exist at the same time. Both are available under "
|
||||
"the same name, depending where you use it in the code."
|
||||
msgstr ""
|
||||
"Shadow khác với mutation (đột biến), bởi vì sau khi shadow tất cả các vị trí "
|
||||
"bộ nhớ của biến đó cùng đồng thời tồn tại. Tất cả đề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ã."
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid "A shadowing variable can have a different type."
|
||||
msgstr ""
|
||||
"Mỗi một shadowing variable (biến bóng) đều có thể có một kiểu dữ liệu khác "
|
||||
"nhau"
|
||||
|
||||
#: src/control-flow-basics/blocks-and-scopes/scopes.md
|
||||
msgid ""
|
||||
"Shadowing looks obscure at first, but is convenient for holding on to values "
|
||||
"after `.unwrap()`."
|
||||
msgstr ""
|
||||
"Shadowing có thể khó hiểu ban đầu, nhưng hữu dụng trong việc giữ giá trị sau "
|
||||
"khi `.unwrap()`."
|
||||
|
||||
#: src/control-flow-basics/functions.md
|
||||
msgid ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user