From 19780b832cd1d5d30b70cf38c13665f60d56182c Mon Sep 17 00:00:00 2001 From: Hank Chen Date: Tue, 13 Jun 2023 20:47:08 +0800 Subject: [PATCH] zh-TW: translation for src/control-flow/if-expressions.md (#801) * zh-TW: translation for src/control-flow/if-expressions.md * zh-TW: add translation for src/SUMMARY.md:98 --- po/zh-TW.po | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/po/zh-TW.po b/po/zh-TW.po index 26936244..5c36c01e 100644 --- a/po/zh-TW.po +++ b/po/zh-TW.po @@ -324,7 +324,7 @@ msgstr "" #: src/SUMMARY.md:98 msgid "if expressions" -msgstr "" +msgstr "if 表達式" #: src/SUMMARY.md:99 msgid "if let expressions" @@ -5947,7 +5947,7 @@ msgstr "" #: src/control-flow/if-expressions.md:1 msgid "# `if` expressions" -msgstr "" +msgstr "# `if` 表達式" #: src/control-flow/if-expressions.md:3 msgid "" @@ -5956,6 +5956,8 @@ msgid "" "expressions)\n" "exactly like `if` statements in other languages:" msgstr "" +"你可以像在其他語言中使用 `if` 陳述式那樣地使用 [`if` 表達式](https://doc." +"rust-lang.org/reference/expressions/if-expr.html#if-expressions):" #: src/control-flow/if-expressions.md:7 msgid "" @@ -5976,6 +5978,8 @@ msgid "" "In addition, you can use `if` as an expression. The last expression of each\n" "block becomes the value of the `if` expression:" msgstr "" +"此外,你也可以將 `if` 當作表達式使用。每個區塊中的最後一行式子將成為 `if` 表" +"達式的賦值:" #: src/control-flow/if-expressions.md:22 msgid "" @@ -5997,6 +6001,8 @@ msgid "" "branch blocks must have the same type. Consider showing what happens if you " "add `;` after `x / 2` in the second example." msgstr "" +"因為 `if` 被當作表達式使用,它必須擁有一個特定的型別,因此兩個分支區塊必須擁" +"有同樣的型別。試著在第二個範例中的 `x / 2` 之後加上 `;`,並觀察其結果。" #: src/control-flow/if-let-expressions.md:1 msgid "# `if let` expressions"