Skip to content

Commit

Permalink
vi: translate Default trait
Browse files Browse the repository at this point in the history
  • Loading branch information
vohoanglong0107 committed Oct 20, 2024
1 parent 3d1339c commit 042882d
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions po/vi.po
Original file line number Diff line number Diff line change
Expand Up @@ -6911,72 +6911,86 @@ msgstr "\"Dữ liệu đã được ghi: {:?}\""

#: src/std-traits/default.md
msgid "The `Default` Trait"
msgstr ""
msgstr "Trait `Default`"

#: src/std-traits/default.md
msgid ""
"[`Default`](https://doc.rust-lang.org/std/default/trait.Default.html) trait "
"produces a default value for a type."
msgstr ""
"Kiểu dữ liệu implement trait [`Default`](https://doc.rust-lang.org/std/"
"default/trait.Default.html) sẽ sở hữu một giá trị mặc định."

#: src/std-traits/default.md
msgid "\"John Smith\""
msgstr ""
msgstr "\"John Smith\""

#: src/std-traits/default.md
msgid "\"{default_struct:#?}\""
msgstr ""
msgstr "\"{default_struct:#?}\""

#: src/std-traits/default.md
msgid "\"Y is set!\""
msgstr ""
msgstr "\"Biến Y đã được gán!\""

#: src/std-traits/default.md
msgid "\"{almost_default_struct:#?}\""
msgstr ""
msgstr "\"{almost_default_struct:#?}\""

#: src/std-traits/default.md src/lifetimes/exercise.md
#: src/lifetimes/solution.md
msgid "\"{:#?}\""
msgstr ""
msgstr "\"{:#?}\""

#: src/std-traits/default.md
msgid ""
"It can be implemented directly or it can be derived via `#[derive(Default)]`."
msgstr ""
"Người dùng có thể trực tiếp implement trait này, hoặc derive trait này bằng "
"`#[derive(Default)]`."

#: src/std-traits/default.md
msgid ""
"A derived implementation will produce a value where all fields are set to "
"their default values."
msgstr ""
"Khi derive trait này, từng miền của giá trị mặc định được tạo ra sẽ được gán "
"bằng giá trị mặc định của kiểu dữ liệu tương ứng."

#: src/std-traits/default.md
msgid "This means all types in the struct must implement `Default` too."
msgstr ""
msgstr "Vì vậy tất cả các miền của struct cũng phải implement `Default`."

#: src/std-traits/default.md
msgid ""
"Standard Rust types often implement `Default` with reasonable values (e.g. "
"`0`, `\"\"`, etc)."
msgstr ""
"Kiểu dữ liệu chuẩn của Rust thường hay implement trait `Default` (như `0`, "
"`\"\"`, vân vân)."

#: src/std-traits/default.md
msgid "The partial struct initialization works nicely with default."
msgstr ""
msgstr "Trait này rất hữu dụng khi ta cần khởi tạo struct chỉ với một ít miền."

#: src/std-traits/default.md
msgid ""
"The Rust standard library is aware that types can implement `Default` and "
"provides convenience methods that use it."
msgstr ""
"Vì các kiểu dữ liệu thường hay implment `Default`, thư viện chuẩn của Rust "
"cũng cung cấp một số hàm giúp người dùng có thể tận dụng giá trị mặc định "
"của biến."

#: src/std-traits/default.md
msgid ""
"The `..` syntax is called [struct update syntax](https://doc.rust-lang.org/"
"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-"
"with-struct-update-syntax)."
msgstr ""
"Dấu `..` còn được gọi là [ký hiệu update struct](https://doc.rust-lang.org/"
"book/ch05-01-defining-structs.html#creating-instances-from-other-instances-"
"with-struct-update-syntax)."

#: src/std-traits/closures.md
msgid ""
Expand Down

0 comments on commit 042882d

Please sign in to comment.