Skip to content

Commit 0c9b88d

Browse files
committed
设置加描述
1 parent 04d62d9 commit 0c9b88d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

package/configuration.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ for name, level in pairs(diagDefault) do
251251
scope = 'resource',
252252
type = 'string',
253253
default = level,
254+
description = '%config.diagnostics.' .. name .. '%',
254255
enum = {
255256
'Error',
256257
'Warning',

package/nls-zh-cn.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,23 @@ return {
4343
['config.develop.enable'] = '开发者模式。请勿开启,会影响性能。',
4444
['config.develop.debuggerPort'] = '调试器监听端口。',
4545
['config.develop.debuggerWait'] = '调试器连接之前挂起。',
46+
47+
-- TODO 英文翻译
48+
['config.diagnostics.unused-local'] = '未使用的局部变量',
49+
['config.diagnostics.unused-function'] = '未使用的函数',
50+
['undefined-global'] = '未定义的全局变量',
51+
['global-in-nil-env'] = '不能使用全局变量( `_ENV` 被设置为了 `nil`)',
52+
['unused-label'] = '未使用的标签',
53+
['unused-vararg'] = '未使用的不定参数',
54+
['trailing-space'] = '后置空格',
55+
['redefined-local'] = '重复定义的局部变量',
56+
['newline-call'] = '以 `(` 开始的新行,在语法上被解析为了上一行的函数调用',
57+
['newfield-call'] = '在字面量表中,2行代码之间缺少分隔符,在语法上被解析为了一次索引操作',
58+
['redundant-parameter'] = '函数调用时,传入了多余的参数',
59+
['ambiguity-1'] = '优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` ',
60+
['lowercase-global'] = '首字母小写的全局变量定义',
61+
['undefined-env-child'] = '`_ENV` 被设置为了新的字面量表,但是试图获取的全局变量不再这张表中',
62+
['duplicate-index'] = '在字面量表中重复定义了索引',
63+
['empty-block'] = '空代码块',
64+
['redundant-value'] = '赋值操作时,值的数量比被赋值的对象多',
4665
}

0 commit comments

Comments
 (0)