summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-07-23 14:55:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-07-23 14:55:32 +0800
commitbbe054ceeb542330732a510ca87dfe45c63b30f1 (patch)
treec988cf36a6c9b230d2b15b3905b32044a9a8747b
parent9d0be3adf375639eb2477492d48a7cd6f1aa09f7 (diff)
downloadlua-language-server-bbe054ceeb542330732a510ca87dfe45c63b30f1.zip
更新翻译
-rw-r--r--server/locale/zh-CN/script.lni19
-rw-r--r--server/src/core/code_action.lua2
-rw-r--r--server/src/parser/ast.lua2
3 files changed, 21 insertions, 2 deletions
diff --git a/server/locale/zh-CN/script.lni b/server/locale/zh-CN/script.lni
index c41fd367..ece955c6 100644
--- a/server/locale/zh-CN/script.lni
+++ b/server/locale/zh-CN/script.lni
@@ -62,6 +62,15 @@ PARSER_UNEXPECT_DOTS = '`...`只能在不定参函数中使用。'
PARSER_UNKNOWN_TAG = '不支持的标签。'
PARSER_MULTI_TAG = '只能设置一个标签。'
PARSER_UNEXPECT_LFUNC_NAME = '局部函数只能使用标识符作为名称。'
+PARSER_ERR_LCOMMENT_END = '应使用`{symbol}`来关闭多行注释。'
+PARSER_ERR_C_LONG_COMMENT = 'Lua应使用`--[[ ]]`来进行多行注释。'
+PARSER_ERR_LSTRING_END = '应使用`{symbol}`来关闭长字符串。'
+PARSER_ERR_ASSIGN_AS_EQ = '应使用`=`来进行赋值操作。'
+PARSER_ERR_EQ_AS_ASSIGN = '应使用`==`来进行等于判断。'
+PARSER_ERR_UEQ = '应使用`~=`来进行不等于判断。'
+PARSER_ERR_THEN_AS_DO = '应使用`then`。'
+PARSER_ERR_DO_AS_THEN = '应使用`do`。'
+PARSER_MISS_END = '缺少对应的`end`。'
SYMBOL_ANONYMOUS = '<匿名函数>'
@@ -80,6 +89,16 @@ ACTION_ADD_BRACKETS = '添加括号。'
ACTION_RUNTIME_VERSION = '修改运行版本为 {} 。'
ACTION_OPEN_LIBRARY = '加载 {} 中的全局变量。'
ACTION_ADD_DO_END = '添加 `do ... end` 。'
+ACTION_FIX_LCOMMENT_END = '改用正确的多行注释关闭符号。'
+ACTION_ADD_LCOMMENT_END = '关闭多行注释。'
+ACTION_FIX_C_LONG_COMMENT = '修改为Lua的多行注释格式。'
+ACTION_FIX_LSTRING_END = '改用正确的长字符串关闭符号。'
+ACTION_ADD_LSTRING_END = '关闭长字符串。'
+ACTION_FIX_ASSIGN_AS_EQ = '改为`=`。'
+ACTION_FIX_EQ_AS_ASSIGN = '改为`==`。'
+ACTION_FIX_UEQ = '改为`~=`。'
+ACTION_FIX_THEN_AS_DO = '改为`then`。'
+ACTION_FIX_DO_AS_THEN = '改为`do`。'
COMMAND_DISABLE_DIAG = '禁用诊断'
COMMAND_MARK_GLOBAL = '标记全局变量'
diff --git a/server/src/core/code_action.lua b/server/src/core/code_action.lua
index b28bda34..9f3e0338 100644
--- a/server/src/core/code_action.lua
+++ b/server/src/core/code_action.lua
@@ -236,7 +236,7 @@ local function solveSyntaxByFix(uri, err, lines, callback)
}
end
callback {
- title = lang.script[err.fix.title],
+ title = lang.script['ACTION_' .. err.fix.title],
kind = 'quickfix',
edit = {
changes = {
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua
index 204802c5..019cbb5c 100644
--- a/server/src/parser/ast.lua
+++ b/server/src/parser/ast.lua
@@ -1865,7 +1865,7 @@ local Defs = {
start = start,
finish = finish - 1,
fix = {
- title = 'ERR_DO_AS_THEN',
+ title = 'FIX_DO_AS_THEN',
{
start = start,
finish = finish - 1,