Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #72: "[lua]: Couldn't find message for key config.*" console spam. #126

Merged
merged 1 commit into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions build-settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ for dirPath in fs.pairs(fs.path 'server/locale') do
type = 'object',
properties = copyWithNLS(configuration, function (str)
return str:gsub('^%%(.+)%%$', function (key)
if nls[key] then
return nls[key]
else
nls[key] = ''
return ''
if not nls[key] then
nls[key] = "TODO: Needs documentation"
end
return nls[key]
end)
end),
}
Expand Down
64 changes: 32 additions & 32 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.",
"config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.",
"config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.",
"config.diagnostics.circle-doc-class": "",
"config.diagnostics.circle-doc-class": "TODO: Needs documentation",
"config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.",
"config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.",
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
Expand Down Expand Up @@ -70,15 +70,15 @@
"config.diagnostics.ignoredFiles.Enable": "Always diagnose these files.",
"config.diagnostics.ignoredFiles.Opened": "Only when these files are opened will it be diagnosed.",
"config.diagnostics.incomplete-signature-doc": "Incomplete @param or @return annotations for functions.",
"config.diagnostics.inject-field": "",
"config.diagnostics.inject-field": "TODO: Needs documentation",
"config.diagnostics.invisible": "Enable diagnostics for accesses to fields which are invisible.",
"config.diagnostics.libraryFiles": "How to diagnose files loaded via `Lua.workspace.library`.",
"config.diagnostics.libraryFiles.Disable": "These files are not diagnosed.",
"config.diagnostics.libraryFiles.Enable": "Always diagnose these files.",
"config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.",
"config.diagnostics.lowercase-global": "Enable lowercase global variable definition diagnostics.",
"config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator",
"config.diagnostics.missing-fields": "",
"config.diagnostics.missing-fields": "TODO: Needs documentation",
"config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.",
"config.diagnostics.missing-local-export-doc": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.",
"config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.",
Expand Down Expand Up @@ -164,31 +164,31 @@
"config.misc.parameters": "[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.",
"config.nameStyle.config": "Set name style config",
"config.runtime.builtin": "Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.\n\n* `default`: Indicates that the library will be enabled or disabled according to the runtime version\n* `enable`: always enable\n* `disable`: always disable\n",
"config.runtime.builtin.basic": "",
"config.runtime.builtin.bit": "",
"config.runtime.builtin.bit32": "",
"config.runtime.builtin.builtin": "",
"config.runtime.builtin.coroutine": "",
"config.runtime.builtin.debug": "",
"config.runtime.builtin.ffi": "",
"config.runtime.builtin.io": "",
"config.runtime.builtin.jit": "",
"config.runtime.builtin.jit.profile": "",
"config.runtime.builtin.jit.util": "",
"config.runtime.builtin.math": "",
"config.runtime.builtin.os": "",
"config.runtime.builtin.package": "",
"config.runtime.builtin.string": "",
"config.runtime.builtin.string.buffer": "",
"config.runtime.builtin.table": "",
"config.runtime.builtin.table.clear": "",
"config.runtime.builtin.table.new": "",
"config.runtime.builtin.utf8": "",
"config.runtime.builtin.basic": "TODO: Needs documentation",
"config.runtime.builtin.bit": "TODO: Needs documentation",
"config.runtime.builtin.bit32": "TODO: Needs documentation",
"config.runtime.builtin.builtin": "TODO: Needs documentation",
"config.runtime.builtin.coroutine": "TODO: Needs documentation",
"config.runtime.builtin.debug": "TODO: Needs documentation",
"config.runtime.builtin.ffi": "TODO: Needs documentation",
"config.runtime.builtin.io": "TODO: Needs documentation",
"config.runtime.builtin.jit": "TODO: Needs documentation",
"config.runtime.builtin.jit.profile": "TODO: Needs documentation",
"config.runtime.builtin.jit.util": "TODO: Needs documentation",
"config.runtime.builtin.math": "TODO: Needs documentation",
"config.runtime.builtin.os": "TODO: Needs documentation",
"config.runtime.builtin.package": "TODO: Needs documentation",
"config.runtime.builtin.string": "TODO: Needs documentation",
"config.runtime.builtin.string.buffer": "TODO: Needs documentation",
"config.runtime.builtin.table": "TODO: Needs documentation",
"config.runtime.builtin.table.clear": "TODO: Needs documentation",
"config.runtime.builtin.table.new": "TODO: Needs documentation",
"config.runtime.builtin.utf8": "TODO: Needs documentation",
"config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.",
"config.runtime.fileEncoding.ansi": "",
"config.runtime.fileEncoding.utf16be": "",
"config.runtime.fileEncoding.utf16le": "",
"config.runtime.fileEncoding.utf8": "",
"config.runtime.fileEncoding.ansi": "TODO: Needs documentation",
"config.runtime.fileEncoding.utf16be": "TODO: Needs documentation",
"config.runtime.fileEncoding.utf16le": "TODO: Needs documentation",
"config.runtime.fileEncoding.utf8": "TODO: Needs documentation",
"config.runtime.meta": "Format of the directory name of the meta files.",
"config.runtime.nonstandardSymbol": "Supports non-standard symbols. Make sure that your runtime environment supports these symbols.",
"config.runtime.path": "When using `require`, how to find the file based on the input name.\nSetting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.\nif `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.\nIf you want to load files outside the workspace, you need to set `Lua.workspace.library` first.\n",
Expand All @@ -198,11 +198,11 @@
"config.runtime.special": "The custom global variables are regarded as some special built-in variables, and the language server will provide special support\nThe following example shows that 'include' is treated as' require '.\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n",
"config.runtime.unicodeName": "Allows Unicode characters in name.",
"config.runtime.version": "Lua runtime version.",
"config.runtime.version.Lua 5.1": "",
"config.runtime.version.Lua 5.2": "",
"config.runtime.version.Lua 5.3": "",
"config.runtime.version.Lua 5.4": "",
"config.runtime.version.LuaJIT": "",
"config.runtime.version.Lua 5.1": "TODO: Needs documentation",
"config.runtime.version.Lua 5.2": "TODO: Needs documentation",
"config.runtime.version.Lua 5.3": "TODO: Needs documentation",
"config.runtime.version.Lua 5.4": "TODO: Needs documentation",
"config.runtime.version.LuaJIT": "TODO: Needs documentation",
"config.semantic.annotation": "Semantic coloring of type annotations.",
"config.semantic.enable": "Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.",
"config.semantic.keyword": "Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.",
Expand Down
64 changes: 32 additions & 32 deletions package.nls.pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.",
"config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.",
"config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.",
"config.diagnostics.circle-doc-class": "",
"config.diagnostics.circle-doc-class": "TODO: Needs documentation",
"config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.",
"config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.",
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
Expand Down Expand Up @@ -70,15 +70,15 @@
"config.diagnostics.ignoredFiles.Enable": "Always diagnose these files.",
"config.diagnostics.ignoredFiles.Opened": "Only when these files are opened will it be diagnosed.",
"config.diagnostics.incomplete-signature-doc": "Incomplete @param or @return annotations for functions.",
"config.diagnostics.inject-field": "",
"config.diagnostics.inject-field": "TODO: Needs documentation",
"config.diagnostics.invisible": "Enable diagnostics for accesses to fields which are invisible.",
"config.diagnostics.libraryFiles": "How to diagnose files loaded via `Lua.workspace.library`.",
"config.diagnostics.libraryFiles.Disable": "These files are not diagnosed.",
"config.diagnostics.libraryFiles.Enable": "Always diagnose these files.",
"config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.",
"config.diagnostics.lowercase-global": "首字母小写的全局变量定义",
"config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator",
"config.diagnostics.missing-fields": "",
"config.diagnostics.missing-fields": "TODO: Needs documentation",
"config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.",
"config.diagnostics.missing-local-export-doc": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.",
"config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.",
Expand Down Expand Up @@ -164,31 +164,31 @@
"config.misc.parameters": "[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.",
"config.nameStyle.config": "Set name style config",
"config.runtime.builtin": "Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.\n\n* `default`: Indicates that the library will be enabled or disabled according to the runtime version\n* `enable`: always enable\n* `disable`: always disable\n",
"config.runtime.builtin.basic": "",
"config.runtime.builtin.bit": "",
"config.runtime.builtin.bit32": "",
"config.runtime.builtin.builtin": "",
"config.runtime.builtin.coroutine": "",
"config.runtime.builtin.debug": "",
"config.runtime.builtin.ffi": "",
"config.runtime.builtin.io": "",
"config.runtime.builtin.jit": "",
"config.runtime.builtin.jit.profile": "",
"config.runtime.builtin.jit.util": "",
"config.runtime.builtin.math": "",
"config.runtime.builtin.os": "",
"config.runtime.builtin.package": "",
"config.runtime.builtin.string": "",
"config.runtime.builtin.string.buffer": "",
"config.runtime.builtin.table": "",
"config.runtime.builtin.table.clear": "",
"config.runtime.builtin.table.new": "",
"config.runtime.builtin.utf8": "",
"config.runtime.builtin.basic": "TODO: Needs documentation",
"config.runtime.builtin.bit": "TODO: Needs documentation",
"config.runtime.builtin.bit32": "TODO: Needs documentation",
"config.runtime.builtin.builtin": "TODO: Needs documentation",
"config.runtime.builtin.coroutine": "TODO: Needs documentation",
"config.runtime.builtin.debug": "TODO: Needs documentation",
"config.runtime.builtin.ffi": "TODO: Needs documentation",
"config.runtime.builtin.io": "TODO: Needs documentation",
"config.runtime.builtin.jit": "TODO: Needs documentation",
"config.runtime.builtin.jit.profile": "TODO: Needs documentation",
"config.runtime.builtin.jit.util": "TODO: Needs documentation",
"config.runtime.builtin.math": "TODO: Needs documentation",
"config.runtime.builtin.os": "TODO: Needs documentation",
"config.runtime.builtin.package": "TODO: Needs documentation",
"config.runtime.builtin.string": "TODO: Needs documentation",
"config.runtime.builtin.string.buffer": "TODO: Needs documentation",
"config.runtime.builtin.table": "TODO: Needs documentation",
"config.runtime.builtin.table.clear": "TODO: Needs documentation",
"config.runtime.builtin.table.new": "TODO: Needs documentation",
"config.runtime.builtin.utf8": "TODO: Needs documentation",
"config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.",
"config.runtime.fileEncoding.ansi": "",
"config.runtime.fileEncoding.utf16be": "",
"config.runtime.fileEncoding.utf16le": "",
"config.runtime.fileEncoding.utf8": "",
"config.runtime.fileEncoding.ansi": "TODO: Needs documentation",
"config.runtime.fileEncoding.utf16be": "TODO: Needs documentation",
"config.runtime.fileEncoding.utf16le": "TODO: Needs documentation",
"config.runtime.fileEncoding.utf8": "TODO: Needs documentation",
"config.runtime.meta": "Format of the directory name of the meta files.",
"config.runtime.nonstandardSymbol": "Supports non-standard symbols. Make sure that your runtime environment supports these symbols.",
"config.runtime.path": "When using `require`, how to find the file based on the input name.\nSetting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.\nif `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.\nIf you want to load files outside the workspace, you need to set `Lua.workspace.library` first.\n",
Expand All @@ -198,11 +198,11 @@
"config.runtime.special": "The custom global variables are regarded as some special built-in variables, and the language server will provide special support\nThe following example shows that 'include' is treated as' require '.\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n",
"config.runtime.unicodeName": "Allows Unicode characters in name.",
"config.runtime.version": "Lua runtime version.",
"config.runtime.version.Lua 5.1": "",
"config.runtime.version.Lua 5.2": "",
"config.runtime.version.Lua 5.3": "",
"config.runtime.version.Lua 5.4": "",
"config.runtime.version.LuaJIT": "",
"config.runtime.version.Lua 5.1": "TODO: Needs documentation",
"config.runtime.version.Lua 5.2": "TODO: Needs documentation",
"config.runtime.version.Lua 5.3": "TODO: Needs documentation",
"config.runtime.version.Lua 5.4": "TODO: Needs documentation",
"config.runtime.version.LuaJIT": "TODO: Needs documentation",
"config.semantic.annotation": "Semantic coloring of type annotations.",
"config.semantic.enable": "Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.",
"config.semantic.keyword": "Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.",
Expand Down
Loading