diff options
author | AndreaWalchshoferSCCH <122894794+AndreaWalchshoferSCCH@users.noreply.github.com> | 2023-03-22 09:00:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 09:00:56 +0100 |
commit | 759e2f8c303ed9985b1a7cb9ad4886d705576476 (patch) | |
tree | b46768fb781b04e65e5aca9890e23a7adc0c7513 /locale | |
parent | 5b6542e8ff276a195c502cc2479b53685429eb2e (diff) | |
download | lua-language-server-759e2f8c303ed9985b1a7cb9ad4886d705576476.zip |
Add diagnostic warning about any global (#1)
* Add warning for any global variable via diagnostic
* Add messages in en-US
TODO: add messages in languages other than en-us as well
* fallback: enable/disable diagnostics w/ annotation
* Add tests for the new diagnostic
* Add diagnostic and group to config.md
Diffstat (limited to 'locale')
-rw-r--r-- | locale/en-us/script.lua | 2 | ||||
-rw-r--r-- | locale/en-us/setting.lua | 2 | ||||
-rw-r--r-- | locale/pt-br/script.lua | 2 | ||||
-rw-r--r-- | locale/pt-br/setting.lua | 2 | ||||
-rw-r--r-- | locale/zh-cn/script.lua | 2 | ||||
-rw-r--r-- | locale/zh-cn/setting.lua | 2 | ||||
-rw-r--r-- | locale/zh-tw/script.lua | 2 | ||||
-rw-r--r-- | locale/zh-tw/setting.lua | 2 |
8 files changed, 16 insertions, 0 deletions
diff --git a/locale/en-us/script.lua b/locale/en-us/script.lua index 4b74fa51..2a13214f 100644 --- a/locale/en-us/script.lua +++ b/locale/en-us/script.lua @@ -150,6 +150,8 @@ DIAG_INVISIBLE_PROTECTED = 'Field `{field}` is protected, it can only be accessed in class `{class}` and its subclasses.' DIAG_INVISIBLE_PACKAGE = 'Field `{field}` can only be accessed in same file `{uri}`.' +DIAG_GLOBAL_ELEMENT = +'Element is global.' MWS_NOT_SUPPORT = '{} does not support multi workspace for now, I may need to restart to support the new workspace ...' diff --git a/locale/en-us/setting.lua b/locale/en-us/setting.lua index 18840e94..9f606cd7 100644 --- a/locale/en-us/setting.lua +++ b/locale/en-us/setting.lua @@ -415,6 +415,8 @@ config.diagnostics['unknown-operator'] = 'Enable diagnostics for unknown operators.' config.diagnostics['unreachable-code'] = 'Enable diagnostics for unreachable code.' +config.diagnostics['global-element'] = +'Enable diagnostics to warn about global elements.' config.typeFormat.config = 'Configures the formatting behavior while typing Lua code.' config.typeFormat.config.auto_complete_end = diff --git a/locale/pt-br/script.lua b/locale/pt-br/script.lua index d2a7c314..affcd893 100644 --- a/locale/pt-br/script.lua +++ b/locale/pt-br/script.lua @@ -150,6 +150,8 @@ DIAG_INVISIBLE_PROTECTED = -- TODO: need translate! 'Field `{field}` is protected, it can only be accessed in class `{class}` and its subclasses.' DIAG_INVISIBLE_PACKAGE = -- TODO: need translate! 'Field `{field}` can only be accessed in same file `{uri}`.' +DIAG_GLOBAL_ELEMENT = -- TODO: need translate! +'Element is global.' MWS_NOT_SUPPORT = '{} não é suportado múltiplos espaços de trabalho por enquanto, posso precisar reiniciar para estabelecer um novo espaço de trabalho ...' diff --git a/locale/pt-br/setting.lua b/locale/pt-br/setting.lua index 75904872..95f26b76 100644 --- a/locale/pt-br/setting.lua +++ b/locale/pt-br/setting.lua @@ -415,6 +415,8 @@ config.diagnostics['unknown-operator'] = -- TODO: need translate! 'Enable diagnostics for unknown operators.' config.diagnostics['unreachable-code'] = -- TODO: need translate! 'Enable diagnostics for unreachable code.' +config.diagnostics['global-element'] = -- TODO: need translate! +'Enable diagnostics to warn about global elements.' config.typeFormat.config = -- TODO: need translate! 'Configures the formatting behavior while typing Lua code.' config.typeFormat.config.auto_complete_end = -- TODO: need translate! diff --git a/locale/zh-cn/script.lua b/locale/zh-cn/script.lua index 531b54ae..f6f639ea 100644 --- a/locale/zh-cn/script.lua +++ b/locale/zh-cn/script.lua @@ -150,6 +150,8 @@ DIAG_INVISIBLE_PROTECTED = '字段 `{field}` 受到保护,只能在 `{class}` 类极其子类中才能访问。' DIAG_INVISIBLE_PACKAGE = '字段 `{field}` 只能在相同的文件 `{uri}` 中才能访问。' +DIAG_GLOBAL_ELEMENT = -- TODO: need translate! +'Element is global.' MWS_NOT_SUPPORT = '{} 目前还不支持多工作目录,我可能需要重启才能支持新的工作目录...' diff --git a/locale/zh-cn/setting.lua b/locale/zh-cn/setting.lua index d488ac3f..731190e2 100644 --- a/locale/zh-cn/setting.lua +++ b/locale/zh-cn/setting.lua @@ -414,6 +414,8 @@ config.diagnostics['unknown-operator'] = -- TODO: need translate! 'Enable diagnostics for unknown operators.' config.diagnostics['unreachable-code'] = -- TODO: need translate! 'Enable diagnostics for unreachable code.' +config.diagnostics['global-element'] = -- TODO: need translate! +'Enable diagnostics to warn about global elements.' config.typeFormat.config = -- TODO: need translate! 'Configures the formatting behavior while typing Lua code.' config.typeFormat.config.auto_complete_end = -- TODO: need translate! diff --git a/locale/zh-tw/script.lua b/locale/zh-tw/script.lua index d6e93a43..4d9a89ad 100644 --- a/locale/zh-tw/script.lua +++ b/locale/zh-tw/script.lua @@ -150,6 +150,8 @@ DIAG_INVISIBLE_PROTECTED = -- TODO: need translate! 'Field `{field}` is protected, it can only be accessed in class `{class}` and its subclasses.' DIAG_INVISIBLE_PACKAGE = -- TODO: need translate! 'Field `{field}` can only be accessed in same file `{uri}`.' +DIAG_GLOBAL_ELEMENT = -- TODO: need translate! +'Element is global.' MWS_NOT_SUPPORT = '{} 目前還不支援多工作目錄,我可能需要重新啟動才能支援新的工作目錄...' diff --git a/locale/zh-tw/setting.lua b/locale/zh-tw/setting.lua index 8c74668d..fd363d3f 100644 --- a/locale/zh-tw/setting.lua +++ b/locale/zh-tw/setting.lua @@ -414,6 +414,8 @@ config.diagnostics['unknown-operator'] = -- TODO: need translate! 'Enable diagnostics for unknown operators.' config.diagnostics['unreachable-code'] = -- TODO: need translate! 'Enable diagnostics for unreachable code.' +config.diagnostics['global-element'] = -- TODO: need translate! +'Enable diagnostics to warn about global elements.' config.typeFormat.config = -- TODO: need translate! 'Configures the formatting behavior while typing Lua code.' config.typeFormat.config.auto_complete_end = -- TODO: need translate! |