1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-22 14:59:37 +02:00

zh-CN: translate basic-syntax/methods.md and some words in SUMMARY.md (#753)

* zh-CN: translate basic-syntax/methods.md and some words in SUMMARY.md

* Use "构造函数" for "constructor"
This commit is contained in:
wnghl 2023-06-06 21:43:47 +08:00 committed by GitHub
parent 305bdbb29a
commit d1bccb7753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3104,7 +3104,7 @@ msgid ""
"- Add a `Rectangle::new_square(width: u32)` constructor to illustrate that\n"
" constructors can take arbitrary parameters."
msgstr ""
"- 新增一个 `Rectangle::new` 构造并在 `main` 函数中调用它:\n"
"- 新增一个 `Rectangle::new` 构造函数并在 `main` 函数中调用它:\n"
"\n"
" ```rust,editable,compile_fail\n"
" fn new(width: u32, height: u32) -> Rectangle {\n"
@ -3112,7 +3112,7 @@ msgstr ""
" }\n"
" ```\n"
"\n"
"- 新增一个 `Rectangle::new_square(width: u32)` 构造器来说明构造器可以接受任意参数。"
"- 新增一个 `Rectangle::new_square(width: u32)` 构造函数来说明构造函数可以接受任意参数。"
#: src/basic-syntax/functions-interlude.md:1
msgid "# Function Overloading"