mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-24 07:21:05 +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"
|
"- Add a `Rectangle::new_square(width: u32)` constructor to illustrate that\n"
|
||||||
" constructors can take arbitrary parameters."
|
" constructors can take arbitrary parameters."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"- 新增一个 `Rectangle::new` 构造器并在 `main` 函数中调用它:\n"
|
"- 新增一个 `Rectangle::new` 构造函数并在 `main` 函数中调用它:\n"
|
||||||
"\n"
|
"\n"
|
||||||
" ```rust,editable,compile_fail\n"
|
" ```rust,editable,compile_fail\n"
|
||||||
" fn new(width: u32, height: u32) -> Rectangle {\n"
|
" fn new(width: u32, height: u32) -> Rectangle {\n"
|
||||||
@ -3112,7 +3112,7 @@ msgstr ""
|
|||||||
" }\n"
|
" }\n"
|
||||||
" ```\n"
|
" ```\n"
|
||||||
"\n"
|
"\n"
|
||||||
"- 新增一个 `Rectangle::new_square(width: u32)` 构造器来说明构造器可以接受任意参数。"
|
"- 新增一个 `Rectangle::new_square(width: u32)` 构造函数来说明构造函数可以接受任意参数。"
|
||||||
|
|
||||||
#: src/basic-syntax/functions-interlude.md:1
|
#: src/basic-syntax/functions-interlude.md:1
|
||||||
msgid "# Function Overloading"
|
msgid "# Function Overloading"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user