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:
parent
305bdbb29a
commit
d1bccb7753
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user