Skip to content

Commit a96c788

Browse files
committed
Translation(zh): optimize continue (:5194)
1 parent 2ebc28a commit a96c788

File tree

1 file changed

+28
-33
lines changed

1 file changed

+28
-33
lines changed

po/zh.po

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4994,22 +4994,23 @@ msgstr ""
49944994

49954995
#: src/flow_control/let_else.md:4
49964996
msgid "🛈 stable since: rust 1.65"
4997-
msgstr "🛈 自 rust 1.65 版本起稳定"
4997+
msgstr "🛈 自 Rust 1.65 版本起稳定"
49984998

49994999
#: src/flow_control/let_else.md:6
50005000
msgid ""
50015001
"🛈 you can target specific edition by compiling like this `rustc --"
50025002
"edition=2021 main.rs`"
50035003
msgstr ""
5004-
"🛈 你可以通过这样编译来指定特定版本 `rustc --edition=2021 main.rs`"
5004+
"🛈 你可以通过这种方式编译来指定特定版本:`rustc --edition=2021 main.rs`"
50055005

50065006
#: src/flow_control/let_else.md:10
50075007
msgid ""
50085008
"With `let`\\-`else`, a refutable pattern can match and bind variables in the "
50095009
"surrounding scope like a normal `let`, or else diverge (e.g. `break`, "
50105010
"`return`, `panic!`) when the pattern doesn't match."
50115011
msgstr ""
5012-
"使用 `let`\\-`else`,可反驳模式可以像普通的 `let` 一样匹配并绑定周围作用域中的变量,或者在模式不匹配时发散(例如 `break`、`return`、`panic!`)。"
5012+
"`let`-`else` 语法允许可能失败的模式匹配像普通 `let` 一样绑定变量到当前作用域,"
5013+
"或在匹配失败时执行中断操作(如 `break`、`return`、`panic!`)。"
50135014

50145015
#: src/flow_control/let_else.md:18 src/flow_control/let_else.md:41
50155016
#: src/std/str.md:41
@@ -5038,30 +5039,32 @@ msgid ""
50385039
"`match` or `if let`\\-`else` expressions. You could previously approximate "
50395040
"these patterns with an unfortunate bit of repetition and an outer `let`:"
50405041
msgstr ""
5041-
"名称绑定的作用域是使其与 `match` 或 `if let`\\-`else` 表达式不同的主要原因。你之前可以通过一些冗余的重复和外部的 `let` 来近似这些模式:"
5042+
"名称绑定的作用域是使其区别于 `match` 或 `if let`-`else` 表达式的主要特点。"
5043+
"在此之前,你可能需要通过一些冗余的重复和外部 `let` 来近似实现这些模式:"
50425044

50435045
#: src/flow_control/let_else.md:59
50445046
msgid ""
50455047
"[option](../std/option.md), [match](./match.md), [if let](./if_let.md) and "
50465048
"the [let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html)."
50475049
msgstr ""
5048-
"[option](../std/option.md)[match](./match.md)[if let](./if_let.md) 和 "
5050+
"[Option](../std/option.md)[match](./match.md)[if let](./if_let.md) 和 "
50495051
"[let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html)。"
50505052

50515053
#: src/flow_control/while_let.md:3
50525054
msgid ""
50535055
"Similar to `if let`, `while let` can make awkward `match` sequences more "
50545056
"tolerable. Consider the following sequence that increments `i`:"
50555057
msgstr ""
5056-
"与 `if let` 类似,`while let` 可以使别扭的 `match` 序列更易于处理。考虑下面这个递增 `i` 的序列:"
5058+
"与 `if let` 类似,`while let` 可以简化繁琐的 `match` 序列。"
5059+
"让我们来看一个递增 `i` 的例子:"
50575060

50585061
#: src/flow_control/while_let.md:9
50595062
msgid "// Repeatedly try this test.\n"
5060-
msgstr "// 重复尝试这个测试。\n"
5063+
msgstr "// 重复执行此测试。\n"
50615064

50625065
#: src/flow_control/while_let.md:13
50635066
msgid "// If `optional` destructures, evaluate the block.\n"
5064-
msgstr "// 如果 `optional` 解构成功,就执行语句块。\n"
5067+
msgstr "// 如果 `optional` 解构成功,则执行代码块。\n"
50655068

50665069
#: src/flow_control/while_let.md:16 src/flow_control/while_let.md:42
50675070
msgid "\"Greater than 9, quit!\""
@@ -5081,41 +5084,33 @@ msgstr "// 当解构失败时退出循环:\n"
50815084

50825085
#: src/flow_control/while_let.md:26
50835086
msgid "// ^ Why should this be required? There must be a better way!\n"
5084-
msgstr "// ^ 为什么这是必需的?一定有更好的方法!\n"
5087+
msgstr "// ^ 为什么需要这样?一定有更好的方法!\n"
50855088

50865089
#: src/flow_control/while_let.md:31
50875090
msgid "Using `while let` makes this sequence much nicer:"
5088-
msgstr "使用 `while let` 使这个序列更加优雅:"
5091+
msgstr "使用 `while let` 可以让这个序列更加简洁:"
50895092

50905093
#: src/flow_control/while_let.md:38
50915094
msgid ""
50925095
"// This reads: \"while `let` destructures `optional` into\n"
50935096
" // `Some(i)`, evaluate the block (`{}`). Else `break`.\n"
50945097
msgstr ""
5095-
"// 这读作:当 `let` `optional` 解构成 `Some(i)` 时,\n"
5096-
" // 执行语句块(`{}`)。否则 `break`。\n"
5098+
"// 这段代码的含义是:当 `let` `optional` 解构为 `Some(i)` 时,\n"
5099+
" // 执行代码块 `{}`否则 `break`。\n"
50975100

50985101
#: src/flow_control/while_let.md:48
50995102
msgid ""
51005103
"// ^ Less rightward drift and doesn't require\n"
51015104
" // explicitly handling the failing case.\n"
51025105
msgstr ""
5103-
5104-
#: src/flow_control/while_let.md:48
5105-
msgid ""
5106-
"// ^ Less rightward drift and doesn't require\n"
5107-
" // explicitly handling the failing case.\n"
5108-
msgstr ""
5109-
"// ^ 减少了向右偏移,并且不需要\n"
5110-
" // 显式处理失败的情况。\n"
5106+
"// ^ 减少了代码缩进右移,无需显式处理失败情况\n"
51115107

51125108
#: src/flow_control/while_let.md:51
51135109
msgid ""
51145110
"// ^ `if let` had additional optional `else`/`else if`\n"
51155111
" // clauses. `while let` does not have these.\n"
51165112
msgstr ""
5117-
"// ^ `if let` 有额外的可选 `else`/`else if`\n"
5118-
" // 子句。`while let` 没有这些。\n"
5113+
"// ^ `if let` 可以有额外的 `else`/`else if` 子句,`while let` 则没有。\n"
51195114

51205115
#: src/flow_control/while_let.md:58
51215116
msgid ""
@@ -5131,31 +5126,31 @@ msgid ""
51315126
"annotated, just like variables, and, if the function returns a value, the "
51325127
"return type must be specified after an arrow `->`."
51335128
msgstr ""
5134-
"函数使用 `fn` 关键字声明。它的参数需要标注类型,就像变量一样,如果函数返回一个值,"
5135-
"返回类型必须在箭头 `->` 之后指定。"
5129+
"函数使用 `fn` 关键字声明。函数参数需要标注类型,就像变量一样"
5130+
"如果函数返回值,则必须在箭头 `->` 后指定返回类型。"
51365131

51375132
#: src/fn.md:7
51385133
msgid ""
51395134
"The final expression in the function will be used as return value. "
51405135
"Alternatively, the `return` statement can be used to return a value earlier "
51415136
"from within the function, even from inside loops or `if` statements."
51425137
msgstr ""
5143-
"函数中的最后一个表达式将被用作返回值。或者,可以使用 `return` 语句从函数内部提前返回一个值,"
5144-
"甚至可以从循环或 `if` 语句内部返回。"
5138+
"函数的最后一个表达式将作为返回值。另外,可以使用 `return` 语句在函数内部提前返回值,"
5139+
"甚至可以在循环或 `if` 语句内部使用。"
51455140

51465141
#: src/fn.md:11
51475142
msgid "Let's rewrite FizzBuzz using functions!"
5148-
msgstr "让我们用函数重写 FizzBuzz!"
5143+
msgstr "让我们用函数重写 FizzBuzz!"
51495144

51505145
#: src/fn.md:14
51515146
msgid ""
51525147
"// Unlike C/C++, there's no restriction on the order of function definitions\n"
51535148
msgstr ""
5154-
"// 与 C/C++ 不同,函数定义的顺序没有限制\n"
5149+
"// 与 C/C++ 不同,Rust 中函数定义的顺序没有限制\n"
51555150

51565151
#: src/fn.md:16
51575152
msgid "// We can use this function here, and define it somewhere later\n"
5158-
msgstr "// 我们可以在这里使用这个函数,并在稍后的某个地方定义它\n"
5153+
msgstr "// 我们可以在这里使用函数,并在稍后的某处定义它\n"
51595154

51605155
#: src/fn.md:19
51615156
msgid "// Function that returns a boolean value\n"
@@ -5167,14 +5162,14 @@ msgstr "// 特殊情况,提前返回\n"
51675162

51685163
#: src/fn.md:27
51695164
msgid "// This is an expression, the `return` keyword is not necessary here\n"
5170-
msgstr "// 这是一个表达式,这里不需要 `return` 关键字\n"
5165+
msgstr "// 这是一个表达式,此处不需要 `return` 关键字\n"
51715166

51725167
#: src/fn.md:30
51735168
msgid ""
51745169
"// Functions that \"don't\" return a value, actually return the unit type "
51755170
"`()`\n"
51765171
msgstr ""
5177-
"// \"不\"返回值的函数实际上返回单元类型 `()`\n"
5172+
"// \"无返回值\"的函数实际上返回单元类型 `()`\n"
51785173

51795174
#: src/fn.md:43
51805175
msgid ""
@@ -5194,8 +5189,8 @@ msgid ""
51945189
"are defined on a type generally, while methods are associated functions that "
51955190
"are called on a particular instance of a type."
51965191
msgstr ""
5197-
"有些函数与特定类型相关联。这些函数有两种形式:关联函数和方法。关联函数是在类型上定义的函数,"
5198-
"而方法是在类型的特定实例上调用的关联函数。"
5192+
"某些函数与特定类型相关联。这些函数有两种形式:关联函数和方法。"
5193+
"关联函数是在类型上定义的函数,而方法是在类型的特定实例上调用的关联函数。"
51995194

52005195
#: src/fn/methods.md:13
52015196
msgid ""

0 commit comments

Comments
 (0)