diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-26 16:29:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-26 16:29:13 +0800 |
commit | 161602cb6359d4b826545a990b592dbf12a22700 (patch) | |
tree | 292932433d463a22ffdedbce7df9c6c9603a97dc /server | |
parent | 906cae5e170b2146bcf1decc5f5dc188b0e63ae1 (diff) | |
download | lua-language-server-161602cb6359d4b826545a990b592dbf12a22700.zip |
支持中文了
Diffstat (limited to 'server')
-rw-r--r-- | server/locale/en-US/libs/lua53/table.lni | 6 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua53/table.lni | 36 | ||||
-rw-r--r-- | server/locale/zh-CN/libs/lua53/utf8.lni | 24 |
3 files changed, 63 insertions, 3 deletions
diff --git a/server/locale/en-US/libs/lua53/table.lni b/server/locale/en-US/libs/lua53/table.lni index 234be1ae..5f5454d3 100644 --- a/server/locale/en-US/libs/lua53/table.lni +++ b/server/locale/en-US/libs/lua53/table.lni @@ -7,7 +7,7 @@ return list[i]..sep..list[i+1] ··· sep..list[j] ]] [insert] -description = 'Inserts element value at position `pos` in list.' +description = 'Inserts element `value` at position `pos` in `list`.' [move] description = [[ @@ -19,13 +19,13 @@ return a2 ]] [pack] -description = 'Returns a new table with all arguments stored into keys `1, 2, etc`. and with a field `n` with the total number of arguments.' +description = 'Returns a new table with all arguments stored into keys `1`, `2`, etc. and with a field `"n"` with the total number of arguments.' [remove] description = 'Removes from `list` the element at position `pos`, returning the value of the removed element.' [sort] -description = 'Sorts list elements in a given order, **in-place**, from `list[1]` to `list[#list]`.' +description = 'Sorts list elements in a given order, *in-place*, from `list[1]` to `list[#list]`.' [unpack] description = [[ diff --git a/server/locale/zh-CN/libs/lua53/table.lni b/server/locale/zh-CN/libs/lua53/table.lni new file mode 100644 index 00000000..57b6588b --- /dev/null +++ b/server/locale/zh-CN/libs/lua53/table.lni @@ -0,0 +1,36 @@ +[concat] +description = [[ +-------- +```lua +return list[i]..sep..list[i+1] ··· sep..list[j] +``` +]] + +[insert] +description = '在 `list` 的位置 `pos` 处插入元素 `value`。' + +[move] +description = [[ +将元素从表 `a1` 移到表 `a2`。 +```lua +a2[t],··· = a1[f],···,a1[e] +return a2 +``` +]] + +[pack] +description = '返回用所有参数以键 `1`,`2`, 等填充的新表, 并将 `"n"` 这个域设为参数的总数。' + +[remove] +description = '移除 `list` 中 `pos` 位置上的元素,并返回这个被移除的值。' + +[sort] +description = '在表内从 `list[1]` 到 `list[#list]` *原地* 对其间元素按指定次序排序。' + +[unpack] +description = [[ +------- +```lua +return list[i], list[i+1], ···, list[j] +``` +]] diff --git a/server/locale/zh-CN/libs/lua53/utf8.lni b/server/locale/zh-CN/libs/lua53/utf8.lni new file mode 100644 index 00000000..0af45153 --- /dev/null +++ b/server/locale/zh-CN/libs/lua53/utf8.lni @@ -0,0 +1,24 @@ +[char] +description = '接收零或多个整数, 将每个整数转换成对应的 UTF-8 字节序列,并返回这些序列连接到一起的字符串。' + +[charpattern] +description = '用于精确匹配到一个 UTF-8 字节序列的模式,它假定处理的对象是一个合法的 UTF-8 字符串。' + +[codes] +description = [[ +-------- +```lua +for p, c in utf8.codes(s) do + body +end +``` +]] + +[codepoint] +description = '以整数形式返回 `s` 中 从位置 `i` 到 `j` 间(包括两端) 所有字符的编号。' + +[len] +description = '返回字符串 `s` 中 从位置 `i` 到 `j` 间 (包括两端) UTF-8 字符的个数。' + +[offset] +description = '返回编码在 `s` 中的第 `n` 个字符的开始位置(按字节数) (从位置 `i` 处开始统计)。' |