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: translate Default trait #2447

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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