diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-26 16:16:45 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-26 16:16:45 +0800 |
commit | 0462ce6d61acba1827d8618e4ee9127a610bd094 (patch) | |
tree | aad0d66b8cc5c7099fe04e54e0567357ce043a22 | |
parent | 34451392f1929f1aa2103ce63ad6a27693258e18 (diff) | |
download | lua-language-server-0462ce6d61acba1827d8618e4ee9127a610bd094.zip |
更新翻译
-rw-r--r-- | server/locale/en-US/libs/lua53/math.lni | 2 | ||||
-rw-r--r-- | server/locale/en-US/libs/lua53/string.lni | 14 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua53/math.lni | 95 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua53/os.lni | 32 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua53/package.lni | 23 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua53/string.lni | 58 |
6 files changed, 216 insertions, 8 deletions
diff --git a/server/locale/en-US/libs/lua53/math.lni b/server/locale/en-US/libs/lua53/math.lni index b704b143..fccdd4cf 100644 --- a/server/locale/en-US/libs/lua53/math.lni +++ b/server/locale/en-US/libs/lua53/math.lni @@ -50,7 +50,7 @@ description = 'An integer with the minimum value for an integer.' description = 'Returns the integral part of `x` and the fractional part of `x`.' [pi] -description = 'The value of `π`.' +description = 'The value of *π*.' [rad] description = 'Converts the angle `x` from degrees to radians.' diff --git a/server/locale/en-US/libs/lua53/string.lni b/server/locale/en-US/libs/lua53/string.lni index a5d4bcc5..633afdf8 100644 --- a/server/locale/en-US/libs/lua53/string.lni +++ b/server/locale/en-US/libs/lua53/string.lni @@ -5,10 +5,10 @@ description = 'Returns the internal numeric codes of the characters `s[i], s[i+1 description = 'Returns a string with length equal to the number of arguments, in which each character has the internal numeric code equal to its corresponding argument.' [dump] -description = 'Returns a string containing a binary representation (a binary chunk) of the given function.' +description = 'Returns a string containing a binary representation (a *binary chunk*) of the given function.' [find] -description = 'Looks for the first match of `pattern` in the string.' +description = 'Looks for the first match of [`pattern`](https://www.lua.org/manual/5.3/manual.html#6.4.1) in the string.' [format] description = 'Returns a formatted version of its variable number of arguments following the description given in its first argument.' @@ -25,7 +25,7 @@ end ]] [gsub] -description = 'Returns a copy of s in which all (or the first `n`, if given) occurrences of the `pattern` have been replaced by a replacement string specified by `repl`.' +description = 'Returns a copy of s in which all (or the first `n`, if given) occurrences of the [`pattern`](https://www.lua.org/manual/5.3/manual.html#6.4.1) have been replaced by a replacement string specified by `repl`.' [len] description = 'Returns its length.' @@ -34,10 +34,10 @@ description = 'Returns its length.' description = 'Returns a copy of this string with all uppercase letters changed to lowercase.' [match] -description = 'Looks for the first match of `pattern` in the string.' +description = 'Looks for the first match of [`pattern`](https://www.lua.org/manual/5.3/manual.html#6.4.1) in the string.' [pack] -description = 'Returns a binary string containing the values `v1, v2, etc.` packed (that is, serialized in binary form) according to the format string `fmt`.' +description = 'Returns a binary string containing the values `v1`, `v2`, etc. packed (that is, serialized in binary form) according to the format string [`fmt`](https://www.lua.org/manual/5.3/manual.html#6.4.2).' [packsize] description = 'Returns the size of a string resulting from `string.pack` with the given format.' @@ -46,13 +46,13 @@ description = 'Returns the size of a string resulting from `string.pack` with th description = 'Returns a string that is the concatenation of `n` copies of the string `s` separated by the string `sep`.' [reverse] -description = 'Returns a string that is the string s reversed.' +description = 'Returns a string that is the string `s` reversed.' [sub] description = 'Returns the substring of the string that starts at `i` and continues until `j`.' [unpack] -description = 'Returns the values packed in string according to the format string `fmt`.' +description = 'Returns the values packed in string according to the format string [`fmt`](https://www.lua.org/manual/5.3/manual.html#6.4.2).' [upper] description = 'Returns a copy of this string with all lowercase letters changed to uppercase.' diff --git a/server/locale/zh-CN/libs/lua53/math.lni b/server/locale/zh-CN/libs/lua53/math.lni new file mode 100644 index 00000000..4e23a281 --- /dev/null +++ b/server/locale/zh-CN/libs/lua53/math.lni @@ -0,0 +1,95 @@ +[abs] +description = '返回 `x` 的绝对值。' + +[acos] +description = '返回 `x` 的反余弦值(用弧度表示)。' + +[asin] +description = '返回 `x` 的反正弦值(用弧度表示)。' + +[atan] +description = '返回 `y/x` 的反正切值(用弧度表示)。' + +[ceil] +description = '返回不小于 `x` 的最小整数值。' + +[cos] +description = '返回 `x` 的余弦(假定参数是弧度)。' + +[deg] +description = '将角 `x` 从弧度转换为角度。' + +[exp] +description = '返回 `e^x` 的值 (e 为自然对数的底)。' + +[floor] +description = '返回不大于 `x` 的最大整数值。' + +[fmod] +description = '返回 `x` 除以 `y`,将商向零圆整后的余数。' + +[huge] +description = '一个比任何数字值都大的浮点数。' + +[log] +description = '返回以指定底的 `x` 的对数。' + +[max] +description = '返回参数中最大的值, 大小由 Lua 操作 `<` 决定。' + +[maxinteger] +description = '最大值的整数。' + +[min] +description = '返回参数中最小的值, 大小由 Lua 操作 `<` 决定。' + +[mininteger] +description = '最小值的整数。' + +[modf] +description = '返回 `x` 的整数部分和小数部分。' + +[pi] +description = '*π* 的值。' + +[rad] +description = '将角 `x` 从角度转换为弧度。' + +[random] +description = [[ +* `math.random()`: 返回 [0,1) 区间内一致分布的浮点伪随机数。 +* `math.random(n)`: 返回 [1, n] 区间内一致分布的整数伪随机数。 +* `math.random(m, n)`: 返回 [m, n] 区间内一致分布的整数伪随机数。 +]] + +[randomseed] +description = '把 `x` 设为伪随机数发生器的“种子”: 相同的种子产生相同的随机数列。' + +[sin] +description = '返回 `x` 的正弦值(假定参数是弧度)。' + +[sqrt] +description = '返回 `x` 的平方根。' + +[tan] +description = '返回 `x` 的正切值(假定参数是弧度)。' + +[tointeger] +description = '如果 `x` 可以转换为一个整数, 返回该整数。' + +[type] +[[.enums]] +name = 'type' +enum = 'integer' +description = '`x` 是一个整数。' +[[.enums]] +name = 'type' +enum = 'float' +description = '`x` 是一个浮点数。' +[[.enums]] +name = 'type' +code = 'nil' +description = '`x` 不是一个数字。' + +[ult] +description = '如果整数 `m` 和 `n` 以无符号整数形式比较, `m` 在 `n` 之下,返回布尔真否则返回假。' diff --git a/server/locale/zh-CN/libs/lua53/os.lni b/server/locale/zh-CN/libs/lua53/os.lni new file mode 100644 index 00000000..4bfd2780 --- /dev/null +++ b/server/locale/zh-CN/libs/lua53/os.lni @@ -0,0 +1,32 @@ +[clock] +description = '返回程序使用的按秒计 CPU 时间的近似值。' + +[data] +description = '返回一个包含日期及时刻的字符串或表。 格式化方法取决于所给字符串 `format`。' + +[difftime] +description = '返回以秒计算的时刻 `t1` 到 `t2` 的差值。' + +[execute] +description = '调用系统解释器执行 `command`。' + +[exit] +description = '调用 ISO C 函数 `exit` 终止宿主程序。' + +[getenv] +description = '返回进程环境变量 `varname` 的值。' + +[remove] +description = '删除指定名字的文件。' + +[rename] +description = '将名字为 `oldname` 的文件或目录更名为 `newname`。' + +[setlocale] +description = '设置程序的当前区域。' + +[time] +description = '当不传参数时,返回当前时刻。 如果传入一张表,就返回由这张表表示的时刻。' + +[tmpname] +description = '返回一个可用于临时文件的文件名字符串。' diff --git a/server/locale/zh-CN/libs/lua53/package.lni b/server/locale/zh-CN/libs/lua53/package.lni new file mode 100644 index 00000000..d9bfe997 --- /dev/null +++ b/server/locale/zh-CN/libs/lua53/package.lni @@ -0,0 +1,23 @@ +[config] +description = '一个描述有一些为包管理准备的编译期配置信息的串。' + +[cpath] +description = '这个路径被 `require` 在 C 加载器中做搜索时用到。' + +[loaded] +description = '用于 `require` 控制哪些模块已经被加载的表。' + +[loadlib] +description = '让宿主程序动态链接 C 库 `libname` 。' + +[path] +description = '这个路径被 `require` 在 Lua 加载器中做搜索时用到。' + +[preload] +description = '保存有一些特殊模块的加载器。' + +[searchers] +description = '用于 `require` 控制如何加载模块的表。' + +[searchpath] +description = '在指定 `path` 中搜索指定的 `name` 。' diff --git a/server/locale/zh-CN/libs/lua53/string.lni b/server/locale/zh-CN/libs/lua53/string.lni new file mode 100644 index 00000000..cc582783 --- /dev/null +++ b/server/locale/zh-CN/libs/lua53/string.lni @@ -0,0 +1,58 @@ +[byte] +description = '返回字符 `s[i]`, `s[i+1]`, ... ,`s[j]` 的内部数字编码。' + +[char] +description = '接收零或更多的整数。 返回和参数数量相同长度的字符串。 其中每个字符的内部编码值等于对应的参数值。' + +[dump] +description = '返回包含有以二进制方式表示的(一个 *二进制代码块* )指定函数的字符串。' + +[find] +description = '查找第一个字符串中匹配到的 [`pattern`](https://cloudwu.github.io/lua53doc/manual.html#6.4.1)。' + +[format] +description = '返回不定数量参数的格式化版本,格式化串为第一个参数。' + +[gmatch] +description = [[ +---------- +```lua +s = "hello world from Lua" +for w in string.gmatch(s, "%a+") do + print(w) +end +``` +]] + +[gsub] +description = '将字符串中,所有的(或是在 `n` 给出时的前 `n` 个) [`pattern`](https://cloudwu.github.io/lua53doc/manual.html#6.4.1) 都替换成 `repl` ,并返回其副本。' + +[len] +description = '返回其长度。' + +[lower] +description = '将其中的大写字符都转为小写后返回其副本。' + +[match] +description = '在字符串中找到第一个能用 [`pattern`](https://cloudwu.github.io/lua53doc/manual.html#6.4.1) 匹配到的部分。' + +[pack] +description = '返回一个打包了(即以二进制形式序列化) `v1`, `v2` 等值的二进制字符串。 字符串 [`fmt`](https://cloudwu.github.io/lua53doc/manual.html#6.4.2) 为打包格式。' + +[packsize] +description = '返回以指定格式用 `string.pack` 打包的字符串的长度。' + +[rep] +description = '返回 `n` 个字符串 `s` 以字符串 `sep` 为分割符连在一起的字符串。' + +[reverse] +description = '返回字符串的翻转串。' + +[sub] +description = '返回字符串的子串, 该子串从 `i` 开始到 `j` 为止。' + +[unpack] +description = '返回以格式 [`fmt`](https://cloudwu.github.io/lua53doc/manual.html#6.4.2) 打包在字符串中的值。' + +[upper] +description = '接收一个字符串,将其中的小写字符都转为大写后返回其副本。' |