diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-08-06 16:00:27 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-08-06 16:00:27 +0800 |
commit | 58d09d2cec471f09821488c84268c20e92fa16c5 (patch) | |
tree | daaa1979e0c33936004958dc2c47d0f96430342e | |
parent | 842f98c6045f337ae30df559b451b65295f99f86 (diff) | |
download | lua-language-server-58d09d2cec471f09821488c84268c20e92fa16c5.zip |
加上翻译
-rw-r--r-- | server/locale/en-US/script.lni | 1 | ||||
-rw-r--r-- | server/locale/zh-CN/script.lni | 1 | ||||
-rw-r--r-- | server/src/core/diagnostics.lua | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/server/locale/en-US/script.lni b/server/locale/en-US/script.lni index ae64c2e3..9149d961 100644 --- a/server/locale/en-US/script.lni +++ b/server/locale/en-US/script.lni @@ -8,6 +8,7 @@ DIAG_UNUSED_LABEL = 'Unused label `{}`.' DIAG_UNUSED_VARARG = 'Unused vararg.' DIAG_REDEFINED_LOCAL = 'Redefined local `{}`.' DIAG_DUPLICATE_INDEX = 'Duplicate index `{}`.' +DIAG_DUPLICATE_METHOD = 'Duplicate method `{}`.' 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_OVER_MAX_ARGS = 'Only has {} variables, but you set {} values.' diff --git a/server/locale/zh-CN/script.lni b/server/locale/zh-CN/script.lni index 37fa9c28..b1bd3a31 100644 --- a/server/locale/zh-CN/script.lni +++ b/server/locale/zh-CN/script.lni @@ -8,6 +8,7 @@ DIAG_UNUSED_LABEL = '未使用的标签 `{}`。' DIAG_UNUSED_VARARG = '未使用的不定参数。' DIAG_REDEFINED_LOCAL = '重定义局部变量 `{}`。' DIAG_DUPLICATE_INDEX = '重复的索引 `{}`。' +DIAG_DUPLICATE_METHOD = '重复的方法 `{}`。' DIAG_PREVIOUS_CALL = '解析为了上一行的函数调用。你可能需要在前面加一个 `;`。' DIAG_OVER_MAX_ARGS = '函数只接收 {:d} 个参数,但你传了 {:d} 个。' DIAG_OVER_MAX_VALUES = '只有 {} 个变量,但你设置了 {} 个值。' diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua index 1d636e07..549ddc77 100644 --- a/server/src/core/diagnostics.lua +++ b/server/src/core/diagnostics.lua @@ -879,7 +879,7 @@ return function (vm, lines, uri) -- 往表里面塞重复的method session:doDiagnostics(session.searchDuplicateMethod, 'duplicate-method', function (key, related) return { - message = lang.script('DIAG_DUPLICATE_FIELD', key), + message = lang.script('DIAG_DUPLICATE_METHOD', key), related = related, } end) |