Skip to content

Commit

Permalink
doc(i18n): translate special syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-jerry-ye committed Dec 18, 2024
1 parent 5340105 commit 04d669c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions next/locales/zh_CN/LC_MESSAGES/language.po
Original file line number Diff line number Diff line change
Expand Up @@ -4168,17 +4168,18 @@ msgstr ""

#: ../../language/fundamentals.md:1232
msgid "Special Syntax"
msgstr ""
msgstr "特殊语法"

#: ../../language/fundamentals.md:1234
msgid "Pipe operator"
msgstr ""
msgstr "管道运算符"

#: ../../language/fundamentals.md:1236
msgid ""
"MoonBit provides a convenient pipe operator `|>`, which can be used to "
"chain regular function calls:"
msgstr ""
"moonbit提供了一个方便的管道运算符`|>`,可以用于链接常规函数调用:"

#: ../../language/fundamentals.md:1238
msgid ""
Expand All @@ -4191,13 +4192,14 @@ msgstr ""

#: ../../language/fundamentals.md:1245
msgid "Cascade Operator"
msgstr ""
msgstr "级联运算符"

#: ../../language/fundamentals.md:1247
msgid ""
"The cascade operator `..` is used to perform a series of mutable "
"operations on the same value consecutively. The syntax is as follows:"
msgstr ""
"级联运算符`..`用于连续对同一值执行一系列可变操作。 语法如下:"

#: ../../language/fundamentals.md:1250
msgid "x..f()\n"
Expand All @@ -4206,6 +4208,7 @@ msgstr ""
#: ../../language/fundamentals.md:1257
msgid "`x..f()..g()` is equivalent to `{x.f(); x.g(); x}`."
msgstr ""
"`x..f()..g()` 等价于 `{x.f(); x.g(); x}`。"

#: ../../language/fundamentals.md:1259
msgid ""
Expand All @@ -4214,6 +4217,7 @@ msgid ""
" need to perform a series of operations on the same `StringBuilder` "
"value:"
msgstr ""
"考虑以下情况:对于具有诸如`write_string`,`write_char`,`write_object`等方法的`StringBuilder`类型,我们经常需要对同一`StringBuilder`值执行一系列操作:"

#: ../../language/fundamentals.md:1263
msgid ""
Expand All @@ -4234,6 +4238,8 @@ msgid ""
" for consecutive operations without the need to modify the return type of"
" the methods."
msgstr ""
"为了避免重复输入`builder`,其方法通常设计为返回`self`本身,允许使用`.`运算符链接操作。 "
"为了区分不可变和可变操作,在MoonBit中,对于所有返回`Unit`的方法,可以使用级联运算符进行连续操作,而无需修改方法的返回类型。"

#: ../../language/fundamentals.md:1276
msgid ""
Expand All @@ -4247,14 +4253,15 @@ msgstr ""

#: ../../language/fundamentals.md:1283
msgid "TODO syntax"
msgstr ""
msgstr "TODO 语法"

#: ../../language/fundamentals.md:1285
msgid ""
"The `todo` syntax (`...`) is a special construct used to mark sections of"
" code that are not yet implemented or are placeholders for future "
"functionality. For example:"
msgstr ""
"`todo`语法(`...`)是一种特殊构造,用于标记尚未实现或用于未来功能的占位符代码段。 例如:"

#: ../../language/fundamentals.md:1287
msgid ""
Expand Down

0 comments on commit 04d669c

Please sign in to comment.