summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-29 15:45:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-29 15:45:45 +0800
commite2dd5f62ffe0b80a3313ddaa5829d93fefd162a8 (patch)
treecf6290c87397c0ba2ede9ddca21a46877e52e013
parent91242c007da6279443b84cd9a3052adeca6ea312 (diff)
downloadlua-language-server-e2dd5f62ffe0b80a3313ddaa5829d93fefd162a8.zip
漏了翻译
-rw-r--r--server/locale/en-US/script.lni1
-rw-r--r--server/locale/zh-CN/script.lni1
-rw-r--r--server/src/core/diagnostics.lua2
3 files changed, 3 insertions, 1 deletions
diff --git a/server/locale/en-US/script.lni b/server/locale/en-US/script.lni
index c26230ad..65d5743e 100644
--- a/server/locale/en-US/script.lni
+++ b/server/locale/en-US/script.lni
@@ -8,6 +8,7 @@ DIAG_REDEFINED_LOCAL = 'Redefined local `{}`.'
DIAG_PREVIOUS_CALL = 'Parsed as function call for the previous line. It may be necessary to add a `;` before.'
DIAG_OVER_MAX_ARGS = 'The function takes only {:d} parameters, but you passed {:d}.'
DIAG_AMBIGUITY_1 = 'Compute `0 {op} {num}` first. You may need to add a bracket.'
+DIAG_LOWERCASE_GLOBAL = 'Global variable in lowercase initial'
DIAG_DIAGNOSTICS = 'Diagnostics'
DIAG_SYNTAX_CHECK = 'Syntax Check'
diff --git a/server/locale/zh-CN/script.lni b/server/locale/zh-CN/script.lni
index 0b8bec1b..0d9dc6cf 100644
--- a/server/locale/zh-CN/script.lni
+++ b/server/locale/zh-CN/script.lni
@@ -8,6 +8,7 @@ DIAG_REDEFINED_LOCAL = '重定义局部变量 `{}`。'
DIAG_PREVIOUS_CALL = '解析为了上一行的函数调用。你可能需要在前面加一个 `;`。'
DIAG_OVER_MAX_ARGS = '函数只接收 {:d} 个参数,但你传了 {:d} 个。'
DIAG_AMBIGUITY_1 = '会优先运算 `0 {op} {num}`,你可能需要加个括号。'
+DIAG_LOWERCASE_GLOBAL = '首字母小写的全局变量'
DIAG_DIAGNOSTICS = '诊断'
DIAG_SYNTAX_CHECK = '语法检查'
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua
index a5ede80e..d541e8de 100644
--- a/server/src/core/diagnostics.lua
+++ b/server/src/core/diagnostics.lua
@@ -365,7 +365,7 @@ return function (vm, lines, uri)
session:doDiagnostics(session.searchLowercaseGlobal, 'lowercase-global', function ()
return {
level = DiagnosticSeverity.Information,
- message = '首字母小写的全局变量',
+ message = lang.script.DIAG_LOWERCASE_GLOBAL,
}
end)
return session.datas