diff --git a/next/locales/zh_CN/LC_MESSAGES/index.po b/next/locales/zh_CN/LC_MESSAGES/index.po index 3e64ff67..228f6259 100644 --- a/next/locales/zh_CN/LC_MESSAGES/index.po +++ b/next/locales/zh_CN/LC_MESSAGES/index.po @@ -4,7 +4,6 @@ # package. # FIRST AUTHOR , 2024. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: MoonBit Document \n" @@ -40,9 +39,8 @@ msgstr "" "试用;无需安装,也不依赖任何服务器" #: ../../index.md:7 -#, fuzzy msgid "**Get started**" -msgstr "开始使用" +msgstr "**开始**" #: ../../index.md:9 msgid "[Tutorials](./tutorial/index.md): Follow tutorials to start your journey" @@ -58,5 +56,5 @@ msgstr "[语言](./language/index.md): 详细语言规范介绍" msgid "" "[Toolchains](./toolchain/index.md): Introduction to all the toolchains " "making developing MoonBit a unique experience." -msgstr "[工具链](./toolchain/index.md): 介绍所有工具链,使 MoonBit 的开发成为独特体验。" +msgstr "[工具链](./toolchain/index.md): 介绍所有工具链。这些工具使得 MoonBit 的开发成为独特体验。" diff --git a/next/locales/zh_CN/LC_MESSAGES/language.po b/next/locales/zh_CN/LC_MESSAGES/language.po index 48130724..043729c4 100644 --- a/next/locales/zh_CN/LC_MESSAGES/language.po +++ b/next/locales/zh_CN/LC_MESSAGES/language.po @@ -1451,22 +1451,22 @@ msgstr "" #: ../../language/fundamentals.md:1 msgid "Fundamentals" -msgstr "" +msgstr "基础" #: ../../language/fundamentals.md:3 msgid "Built-in Data Structures" -msgstr "" +msgstr "内置数据结构" #: ../../language/fundamentals.md:5 msgid "Boolean" -msgstr "" +msgstr "布尔值" #: ../../language/fundamentals.md:7 msgid "" "MoonBit has a built-in boolean type, which has two values: `true` and " "`false`. The boolean type is used in conditional expressions and control " "structures." -msgstr "" +msgstr "MoonBit 有一个内置的布尔类型,它有两个值:`true` 和 `false`。布尔类型用于条件表达式和控制结构。" #: ../../language/fundamentals.md:9 msgid "" @@ -1479,23 +1479,23 @@ msgstr "" #: ../../language/fundamentals.md:16 msgid "Number" -msgstr "" +msgstr "数字" #: ../../language/fundamentals.md:18 msgid "MoonBit have integer type and floating point type:" -msgstr "" +msgstr "MoonBit 有整数类型和浮点类型:" #: ../../language/fundamentals.md:9 msgid "type" -msgstr "" +msgstr "类型" #: ../../language/fundamentals.md:9 ../../language/fundamentals.md:115 msgid "description" -msgstr "" +msgstr "描述" #: ../../language/fundamentals.md:9 msgid "example" -msgstr "" +msgstr "示例" #: ../../language/fundamentals.md:9 msgid "`Int`" @@ -1503,7 +1503,7 @@ msgstr "" #: ../../language/fundamentals.md:9 msgid "32-bit signed integer" -msgstr "" +msgstr "32 位有符号整数" #: ../../language/fundamentals.md:9 msgid "`42`" @@ -1515,7 +1515,7 @@ msgstr "" #: ../../language/fundamentals.md:9 msgid "64-bit signed integer" -msgstr "" +msgstr "64 位有符号整数" #: ../../language/fundamentals.md:9 msgid "`1000L`" @@ -1527,7 +1527,7 @@ msgstr "" #: ../../language/fundamentals.md:9 msgid "32-bit unsigned integer" -msgstr "" +msgstr "32 位无符号整数" #: ../../language/fundamentals.md:9 msgid "`14U`" @@ -1539,7 +1539,7 @@ msgstr "" #: ../../language/fundamentals.md:9 msgid "64-bit unsigned integer" -msgstr "" +msgstr "64 位无符号整数" #: ../../language/fundamentals.md:9 msgid "`14UL`" @@ -1551,7 +1551,7 @@ msgstr "" #: ../../language/fundamentals.md:9 msgid "64-bit floating point, defined by IEEE754" -msgstr "" +msgstr "64 位浮点数,由 IEEE754 定义" #: ../../language/fundamentals.md:9 msgid "`3.14`" @@ -1563,7 +1563,7 @@ msgstr "" #: ../../language/fundamentals.md:9 msgid "32-bit floating point" -msgstr "" +msgstr "32 位浮点数" #: ../../language/fundamentals.md:9 msgid "`(3.14 : Float)`" @@ -1575,7 +1575,7 @@ msgstr "" #: ../../language/fundamentals.md:9 msgid "represents numeric values larger than other types" -msgstr "" +msgstr "表示比其他类型更大的数值" #: ../../language/fundamentals.md:9 msgid "`10000000000000000000000N`" @@ -1585,24 +1585,24 @@ msgstr "" msgid "" "MoonBit also supports numeric literals, including decimal, binary, octal," " and hexadecimal numbers." -msgstr "" +msgstr "MoonBit 还支持数字字面量,包括十进制、二进制、八进制和十六进制数字。" #: ../../language/fundamentals.md:32 msgid "" "To improve readability, you may place underscores in the middle of " "numeric literals such as `1_000_000`. Note that underscores can be placed" " anywhere within a number, not just every three digits." -msgstr "" +msgstr "为了提高可读性,您可以在数字字面量中间放置下划线,例如 `1_000_000`。请注意,下划线可以放在数字中的任何位置,而不仅仅是每三位数字。" #: ../../language/fundamentals.md:34 msgid "Decimal numbers can have underscore between the numbers." -msgstr "" +msgstr "十进制数之间可以有下划线。" #: ../../language/fundamentals.md:36 msgid "" "By default, an int literal is signed 32-bit number. For unsigned numbers," " a postfix `U` is needed; for 64-bit numbers, a postfix `L` is needed." -msgstr "" +msgstr "默认情况下,整数字面量是有符号的 32 位数字。对于无符号数字,需要后缀 `U`;对于 64 位数字,需要后缀 `L`。" #: ../../language/fundamentals.md:38 msgid "" @@ -1617,7 +1617,7 @@ msgstr "" msgid "" "A binary number has a leading zero followed by a letter \"B\", i.e. " "`0b`/`0B`. Note that the digits after `0b`/`0B` must be `0` or `1`." -msgstr "" +msgstr "二进制数有一个前导零,后跟字母 \"B\",即 `0b`/`0B`。请注意,`0b`/`0B` 后的数字必须是 `0` 或 `1`。" #: ../../language/fundamentals.md:48 msgid "" @@ -1631,6 +1631,7 @@ msgid "" "`0o`/`0O`. Note that the digits after `0o`/`0O` must be in the range from" " `0` through `7`:" msgstr "" +"八进制数有一个前导零,后跟字母 \"O\",即 `0o`/`0O`。请注意,`0o`/`0O` 后的数字必须在 `0` 到 `7` 的范围内:" #: ../../language/fundamentals.md:58 msgid "" @@ -1644,6 +1645,7 @@ msgid "" "`0x`/`0X`. Note that the digits after the `0x`/`0X` must be in the range " "`0123456789ABCDEF`." msgstr "" +"十六进制数有一个前导零,后跟字母 \"X\",即 `0x`/`0X`。请注意,`0x`/`0X` 后的数字必须在 `0123456789ABCDEF` 范围内。" #: ../../language/fundamentals.md:68 msgid "" @@ -1656,6 +1658,7 @@ msgid "" "A floating-point number literal is 64-bit floating-point number. To " "define a float, type annotation is needed." msgstr "" +"浮点数字面量是 64 位浮点数。要定义一个浮点数,需要类型注释。" #: ../../language/fundamentals.md:77 msgid "" @@ -1669,6 +1672,7 @@ msgid "" "A 64-bit floating-point number can also be defined using hexadecimal " "format:" msgstr "" +"64 位浮点数也可以使用十六进制格式定义:" #: ../../language/fundamentals.md:86 msgid "let hex_double = 0x1.2P3 // (1.0 + 2 / 16) * 2^(+3) == 9\n" @@ -1677,6 +1681,7 @@ msgstr "" #: ../../language/fundamentals.md:93 msgid "Overloaded literal" msgstr "" +"重载字面量" #: ../../language/fundamentals.md:95 msgid "" @@ -1684,6 +1689,7 @@ msgid "" "literal, and there is no need to specify the type of number via letter " "postfix:" msgstr "" +"当期望的类型已知时,MoonBit 可以自动重载字面量,无需通过字母后缀指定数字的类型:" #: ../../language/fundamentals.md:97 msgid "" @@ -1697,13 +1703,13 @@ msgstr "" #: ../../language/fundamentals.md:104 msgid "String" -msgstr "" +msgstr "字符串" #: ../../language/fundamentals.md:106 msgid "" "`String` holds a sequence of UTF-16 code units. You can use double quotes" " to create a string, or use `#|` to write a multi-line string." -msgstr "" +msgstr "`String` 包含一系列 UTF-16 码点。您可以使用双引号创建字符串,或使用 `#|` 编写多行字符串。" #: ../../language/fundamentals.md:108 msgid "" @@ -1731,10 +1737,11 @@ msgid "" "In double quotes string, a backslash followed by certain special " "characters forms an escape sequence:" msgstr "" +"在双引号字符串中,反斜杠后跟某些特殊字符形成转义序列:" #: ../../language/fundamentals.md:115 msgid "escape sequences" -msgstr "" +msgstr "转义序列" #: ../../language/fundamentals.md:115 msgid "`\\n`,`\\r`,`\\t`,`\\b`" @@ -1742,7 +1749,7 @@ msgstr "" #: ../../language/fundamentals.md:115 msgid "New line, Carriage return, Horizontal tab, Backspace" -msgstr "" +msgstr "换行,回车,水平制表符,退格" #: ../../language/fundamentals.md:115 msgid "`\\\\`" @@ -1750,7 +1757,7 @@ msgstr "" #: ../../language/fundamentals.md:115 msgid "Backslash" -msgstr "" +msgstr "反斜杠" #: ../../language/fundamentals.md:115 msgid "`\\x41`" @@ -1758,7 +1765,7 @@ msgstr "" #: ../../language/fundamentals.md:115 msgid "Hexadecimal escape sequence" -msgstr "" +msgstr "十六进制转义序列" #: ../../language/fundamentals.md:115 msgid "`\\o102`" @@ -1766,7 +1773,7 @@ msgstr "" #: ../../language/fundamentals.md:115 msgid "Octal escape sequence" -msgstr "" +msgstr "八进制转义序列" #: ../../language/fundamentals.md:115 msgid "`\\u5154`,`\\u{1F600}`" @@ -1774,7 +1781,7 @@ msgstr "" #: ../../language/fundamentals.md:115 msgid "Unicode escape sequence" -msgstr "" +msgstr "Unicode 转义序列" #: ../../language/fundamentals.md:129 msgid "" @@ -1784,6 +1791,7 @@ msgid "" "values into the text. Variables used for string interpolation must " "support the `to_string` method." msgstr "" +"MoonBit 支持字符串插值。它允许您在插值字符串中替换变量。此功能通过直接将变量值嵌入文本来简化构建动态字符串的过程。用于字符串插值的变量必须支持 `to_string` 方法。" #: ../../language/fundamentals.md:131 msgid "" @@ -1797,6 +1805,7 @@ msgid "" "enable interpolation for a specific line by changing the leading `#|` to " "`$|`:" msgstr "" +"多行字符串默认不支持插值,但您可以通过将前导 `#|` 更改为 `$|` 来为特定行启用插值:" #: ../../language/fundamentals.md:140 msgid "" @@ -1820,11 +1829,11 @@ msgstr "" #: ../../language/fundamentals.md:151 msgid "Char" -msgstr "" +msgstr "字符" #: ../../language/fundamentals.md:153 msgid "`Char` represents a Unicode code point." -msgstr "" +msgstr "`Char` 表示一个 Unicode 码点。" #: ../../language/fundamentals.md:155 msgid "" @@ -1837,7 +1846,7 @@ msgstr "" #: ../../language/fundamentals.md:162 msgid "Byte(s)" -msgstr "" +msgstr "字节" #: ../../language/fundamentals.md:164 msgid "" @@ -1845,6 +1854,7 @@ msgid "" "escape enclosed in single quotes `'`, and preceded by the character `b`. " "Byte literals are of type `Byte`. For example:" msgstr "" +"MoonBit 中的字节字面量是一个 ASCII 字符或一个转义字符,用单引号 `'` 括起来,并在前面加上字符 `b`。字节字面量的类型是 `Byte`。例如:" #: ../../language/fundamentals.md:166 msgid "" @@ -1867,6 +1877,7 @@ msgid "" "A `Bytes` is a sequence of bytes. Similar to byte, bytes literals have " "the form of `b\"...\"`. For example:" msgstr "" +"`Bytes` 是一系列字节。与字节类似,字节字面量的形式是 `b\"...\"`。例如:" #: ../../language/fundamentals.md:180 msgid "" @@ -1879,7 +1890,7 @@ msgstr "" #: ../../language/fundamentals.md:186 msgid "Tuple" -msgstr "" +msgstr "元组" #: ../../language/fundamentals.md:188 msgid "" @@ -1888,6 +1899,7 @@ msgid "" "matters; for example, `(1,true)` and `(true,1)` have different types. " "Here's an example:" msgstr "" +"元组是使用圆括号 `()` 构造的有限值集合,元素之间用逗号 `,` 分隔。元素的顺序很重要;例如,`(1,true)` 和 `(true,1)` 有不同的类型。以下是一个示例:" #: ../../language/fundamentals.md:190 msgid "" @@ -1913,7 +1925,7 @@ msgstr "" #: ../../language/fundamentals.md:202 msgid "Tuples can be accessed via pattern matching or index:" -msgstr "" +msgstr "元组可以通过模式匹配或索引访问:" #: ../../language/fundamentals.md:204 msgid "" @@ -1934,12 +1946,14 @@ msgstr "" #: ../../language/fundamentals.md:212 msgid "A `Ref[T]` is a mutable reference containing a value `val` of type `T`." msgstr "" +"`Ref[T]` 是一个包含类型 `T` 的值 `val` 的可变引用。" #: ../../language/fundamentals.md:214 msgid "" "It can be constructed using `{ val : x }`, and can be accessed using " "`ref.val`. See [struct](#struct) for detailed explanation." msgstr "" +"可以使用 `{ val : x }` 构造它,并可以使用 `ref.val` 访问它。有关详细说明,请参见[结构体](#struct)。" #: ../../language/fundamentals.md:216 msgid "" @@ -1955,29 +1969,33 @@ msgstr "" #: ../../language/fundamentals.md:222 msgid "Option and Result" -msgstr "" +msgstr "Option 和 Result" #: ../../language/fundamentals.md:224 msgid "" "`Option` and `Result` are the most common types to represent a possible " "error or failure in MoonBit." msgstr "" +"`Option` 和 `Result` 是 MoonBit 中表示可能的错误或失败的最常见类型。" #: ../../language/fundamentals.md:226 msgid "" "`Option[T]` represents a possibly missing value of type `T`. It can be " "abbreviated as `T?`." msgstr "" +"`Option[T]` 表示可能缺失的类型 `T` 的值。它可以缩写为 `T?`。" #: ../../language/fundamentals.md:227 msgid "" "`Result[T, E]` represents either a value of type `T` or an error of type " "`E`." msgstr "" +"`Result[T, E]` 表示类型 `T` 的值或类型 `E` 的错误。" #: ../../language/fundamentals.md:229 msgid "See [enum](#enum) for detailed explanation." msgstr "" +"有关详细说明,请参见[枚举](#enum)。" #: ../../language/fundamentals.md:231 msgid "" @@ -1999,13 +2017,14 @@ msgstr "" #: ../../language/fundamentals.md:237 msgid "Array" -msgstr "" +msgstr "数组" #: ../../language/fundamentals.md:239 msgid "" "An array is a finite sequence of values constructed using square brackets" " `[]`, with elements separated by commas `,`. For example:" msgstr "" +"数组是使用方括号 `[]` 构造的有限值序列,元素之间用逗号 `,` 分隔。例如:" #: ../../language/fundamentals.md:241 msgid "let numbers = [1, 2, 3, 4]\n" @@ -2016,6 +2035,7 @@ msgid "" "You can use `numbers[x]` to refer to the xth element. The index starts " "from zero." msgstr "" +"您可以使用 `numbers[x]` 来引用第 x 个元素。索引从零开始。" #: ../../language/fundamentals.md:250 msgid "" @@ -2031,20 +2051,24 @@ msgstr "" #: ../../language/fundamentals.md:257 msgid "There are `Array[T]` and `FixedArray[T]`:" msgstr "" +"有 `Array[T]` 和 `FixedArray[T]`:" #: ../../language/fundamentals.md:259 msgid "`Array[T]` can grow in size, while" msgstr "" +"`Array[T]` 可以增长,而" #: ../../language/fundamentals.md:260 msgid "" "`FixedArray[T]` has a fixed size, thus it needs to be created with " "initial value." msgstr "" +"`FixedArray[T]` 有固定的大小,因此需要使用初始值创建。" #: ../../language/fundamentals.md:263 msgid "A common pitfall is creating `FixedArray` with the same initial value:" msgstr "" +"一个常见的陷阱是使用相同的初始值创建 `FixedArray`:" #: ../../language/fundamentals.md:265 msgid "" @@ -2062,6 +2086,7 @@ msgid "" "`FixedArray[Int]` in this case). One should use `FixedArray::makei()` " "instead which creates an object for each index." msgstr "" +"这是因为所有单元格引用相同的对象(在这种情况下是 `FixedArray[Int]`)。应该使用 `FixedArray::makei()`,它为每个索引创建一个对象。" #: ../../language/fundamentals.md:274 msgid "" @@ -2080,6 +2105,7 @@ msgid "" "When the expected type is known, MoonBit can automatically overload " "array, otherwise `Array[T]` is created:" msgstr "" +"当期望的类型已知时,MoonBit 可以自动重载数组,否则将创建 `Array[T]`:" #: ../../language/fundamentals.md:285 msgid "" @@ -2099,6 +2125,7 @@ msgid "" "a view of array `data`, referencing elements from `start` to `end` " "(exclusive). Both `start` and `end` indices can be omitted." msgstr "" +"类似于其他语言中的 `slice`,视图是对集合的特定段的引用。您可以使用 `data[start:end]` 创建数组 `data` 的视图,引用从 `start` 到 `end`(不包括)的元素。`start` 和 `end` 索引都可以省略。" #: ../../language/fundamentals.md:298 msgid "" @@ -2114,7 +2141,7 @@ msgstr "" #: ../../language/fundamentals.md:304 msgid "Map" -msgstr "" +msgstr "Map" #: ../../language/fundamentals.md:306 msgid "" @@ -2122,6 +2149,7 @@ msgid "" " called `Map` in its standard library. `Map`s can be created via a " "convenient literal syntax:" msgstr "" +"MoonBit 在其标准库中提供了一个保留插入顺序的哈希映射数据结构,称为 `Map`。`Map` 可以通过方便的字面量语法创建:" #: ../../language/fundamentals.md:309 msgid "let map : Map[String, Int] = { \"x\": 1, \"y\": 2, \"z\": 3 }\n" @@ -2133,10 +2161,12 @@ msgid "" " destructed elegantly with pattern matching, see [Map Pattern](#map-" "pattern)." msgstr "" +"目前,映射字面量语法中的键必须是常量。`Map` 也可以通过模式匹配优雅地解构,参见 [Map 模式](#map-pattern)。" #: ../../language/fundamentals.md:317 msgid "Json literal" msgstr "" +"Json 字面量" #: ../../language/fundamentals.md:319 msgid "" @@ -2144,6 +2174,7 @@ msgid "" "the expected type of an expression is `Json`, number, string, array and " "map literals can be directly used to create json data:" msgstr "" +"MoonBit 通过重载字面量支持方便的 json 处理。当表达式的期望类型是 `Json` 时,数字、字符串、数组和映射字面量可以直接用于创建 json 数据:" #: ../../language/fundamentals.md:322 msgid "" @@ -2157,6 +2188,7 @@ msgstr "" #: ../../language/fundamentals.md:328 msgid "Json values can be pattern matched too, see [Json Pattern](#json-pattern)." msgstr "" +"Json 值也可以进行模式匹配,参见 [Json 模式](#json-pattern)。" #: ../../language/fundamentals.md:330 msgid "Functions"