summaryrefslogtreecommitdiff
path: root/server/locale
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-26 15:39:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-26 15:39:54 +0800
commit34451392f1929f1aa2103ce63ad6a27693258e18 (patch)
tree2de3cbb527cf7e1a11b2caee75f0b0e5338c9e33 /server/locale
parent34fb2d39e88c2d5cc5e8796011735ee3c30ee8d6 (diff)
downloadlua-language-server-34451392f1929f1aa2103ce63ad6a27693258e18.zip
更新翻译
Diffstat (limited to 'server/locale')
-rw-r--r--server/locale/en-US/libs/lua53/io.lni4
-rw-r--r--server/locale/zh-CN/libs/lua53/file.lni91
-rw-r--r--server/locale/zh-CN/libs/lua53/io.lni132
3 files changed, 225 insertions, 2 deletions
diff --git a/server/locale/en-US/libs/lua53/io.lni b/server/locale/en-US/libs/lua53/io.lni
index f68602b5..c27e9d4d 100644
--- a/server/locale/en-US/libs/lua53/io.lni
+++ b/server/locale/en-US/libs/lua53/io.lni
@@ -47,7 +47,7 @@ code = 'number'
description = 'Reads a string with up to this number of bytes.'
[open]
-description = 'Opens a file, in the mode specified in the string mode.'
+description = 'Opens a file, in the mode specified in the string `mode`.'
[[.enums]]
name = 'mode'
enum = 'r'
@@ -114,7 +114,7 @@ description = 'Reads a string with up to this number of bytes.'
description = 'In case of success, returns a handle for a temporary file.'
[type]
-description = 'Checks whether obj is a valid file handle.'
+description = 'Checks whether `obj` is a valid file handle.'
[[.enums]]
name = 'type'
enum = 'file'
diff --git a/server/locale/zh-CN/libs/lua53/file.lni b/server/locale/zh-CN/libs/lua53/file.lni
new file mode 100644
index 00000000..03b5709a
--- /dev/null
+++ b/server/locale/zh-CN/libs/lua53/file.lni
@@ -0,0 +1,91 @@
+[close]
+description = '关闭 `file`。'
+
+[flush]
+description = '将写入的数据保存到 `file` 中。'
+
+[lines]
+description = [[
+------
+```lua
+for c in file:lines(...) do
+ body
+end
+```
+]]
+[[.enums]]
+name = 'mode'
+enum = 'n'
+description = '读取一个数字,根据 Lua 的转换文法返回浮点数或整数。'
+[[.enums]]
+name = 'mode'
+enum = 'a'
+description = '从当前位置开始读取整个文件。'
+[[.enums]]
+name = 'mode'
+enum = 'l'
+description = '读取一行并忽略行结束标记。'
+[[.enums]]
+name = 'mode'
+enum = 'L'
+description = '读取一行并保留行结束标记。'
+[[.enums]]
+name = 'mode'
+code = 'number'
+description = '读取一个不超过这个数量字节数的字符串。'
+
+[read]
+description = '读文件 `file`, 指定的格式决定了要读什么。'
+[[.enums]]
+name = 'mode'
+enum = 'n'
+description = '读取一个数字,根据 Lua 的转换文法返回浮点数或整数。'
+[[.enums]]
+name = 'mode'
+enum = 'a'
+description = '从当前位置开始读取整个文件。'
+[[.enums]]
+name = 'mode'
+enum = 'l'
+description = '读取一行并忽略行结束标记。'
+[[.enums]]
+name = 'mode'
+enum = 'L'
+description = '读取一行并保留行结束标记。'
+[[.enums]]
+name = 'mode'
+code = 'number'
+description = '读取一个不超过这个数量字节数的字符串。'
+
+[seek]
+description = '设置及获取基于文件开头处计算出的位置。'
+[[.enums]]
+name = 'whence'
+enum = 'set'
+description = '基点为 0 (文件开头)。'
+[[.enums]]
+name = 'whence'
+enum = 'cur'
+description = '基点为当前位置。'
+[[.enums]]
+name = 'whence'
+enum = 'end'
+description = '基点为文件尾。'
+
+[setvbuf]
+description = '设置输出文件的缓冲模式。'
+[[.enums]]
+name = 'mode'
+enum = 'no'
+description = '不缓冲;输出操作立刻生效。'
+[[.enums]]
+name = 'mode'
+enum = 'full'
+description = '完全缓冲;只有在缓存满或调用 flush 时才做输出操作。'
+[[.enums]]
+name = 'mode'
+enum = 'line'
+description = '行缓冲;输出将缓冲到每次换行前。'
+
+[write]
+description = '将参数的值逐个写入 `file`。'
diff --git a/server/locale/zh-CN/libs/lua53/io.lni b/server/locale/zh-CN/libs/lua53/io.lni
new file mode 100644
index 00000000..881017f7
--- /dev/null
+++ b/server/locale/zh-CN/libs/lua53/io.lni
@@ -0,0 +1,132 @@
+[stdin]
+description = '标准输入。'
+
+[stdout]
+description = '标准输出。'
+
+[stderr]
+description = '标准错误。'
+
+[close]
+description = '关闭 `file` 或默认输出文件。'
+
+[flush]
+description = '将写入的数据保存到默认输出文件中。'
+
+[input]
+description = '设置 `file` 为默认输入文件。'
+
+[lines]
+description = [[
+------
+```lua
+for c in io.lines(filename, ...) do
+ body
+end
+```
+]]
+[[.enums]]
+name = 'mode'
+enum = 'n'
+description = '读取一个数字,根据 Lua 的转换文法返回浮点数或整数。'
+[[.enums]]
+name = 'mode'
+enum = 'a'
+description = '从当前位置开始读取整个文件。'
+[[.enums]]
+name = 'mode'
+enum = 'l'
+description = '读取一行并忽略行结束标记。'
+[[.enums]]
+name = 'mode'
+enum = 'L'
+description = '读取一行并保留行结束标记。'
+[[.enums]]
+name = 'mode'
+code = 'number'
+description = '读取一个不超过这个数量字节数的字符串。'
+
+[open]
+description = '用字符串 `mode` 指定的模式打开一个文件。'
+[[.enums]]
+name = 'mode'
+enum = 'r'
+description = '读模式。'
+[[.enums]]
+name = 'mode'
+enum = 'w'
+description = '写模式。'
+[[.enums]]
+name = 'mode'
+enum = 'a'
+description = '追加模式。'
+[[.enums]]
+name = 'mode'
+enum = 'r+'
+description = '更新模式,所有之前的数据都保留。'
+[[.enums]]
+name = 'mode'
+enum = 'w+'
+description = '更新模式,所有之前的数据都删除。'
+[[.enums]]
+name = 'mode'
+enum = 'a+'
+description = '追加更新模式,所有之前的数据都保留,只允许在文件尾部做写入。'
+
+[output]
+description = '设置 `file` 为默认输出文件。'
+
+[popen]
+description = '用一个分离进程开启程序 `prog` 。'
+[[.enums]]
+name = 'mode'
+enum = 'r'
+description = '从这个程序中读取数据。'
+[[.enums]]
+name = 'mode'
+enum = 'w'
+description = '向这个程序写入输入。'
+
+[read]
+description = '读文件 `file`, 指定的格式决定了要读什么。'
+[[.enums]]
+name = 'mode'
+enum = 'n'
+description = '读取一个数字,根据 Lua 的转换文法返回浮点数或整数。'
+[[.enums]]
+name = 'mode'
+enum = 'a'
+description = '从当前位置开始读取整个文件。'
+[[.enums]]
+name = 'mode'
+enum = 'l'
+description = '读取一行并忽略行结束标记。'
+[[.enums]]
+name = 'mode'
+enum = 'L'
+description = '读取一行并保留行结束标记。'
+[[.enums]]
+name = 'mode'
+code = 'number'
+description = '读取一个不超过这个数量字节数的字符串。'
+
+[tmpfile]
+description = '如果成功,返回一个临时文件的句柄。'
+
+[type]
+description = '检查 `obj` 是否是合法的文件句柄。'
+[[.enums]]
+name = 'type'
+enum = 'file'
+description = '是一个打开的文件句柄。'
+[[.enums]]
+name = 'type'
+enum = 'closed file'
+description = '是一个关闭的文件句柄。'
+[[.enums]]
+name = 'type'
+code = 'nil'
+description = '不是文件句柄。'
+
+[write]
+description = '将参数的值逐个写入默认输出文件。'