Skip to content

Commit e6b1535

Browse files
committed
fix missing nls
1 parent 1b6e793 commit e6b1535

File tree

9 files changed

+236
-117
lines changed

9 files changed

+236
-117
lines changed

build-settings.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,14 @@ for dirPath in fs.pairs(fs.path 'server/locale') do
8484
description = 'Setting of sumneko.lua',
8585
type = 'object',
8686
properties = copyWithNLS(configuration, function (str)
87-
return str:gsub('^%%(.+)%%$', nls)
87+
return str:gsub('^%%(.+)%%$', function (key)
88+
if nls[key] then
89+
return nls[key]
90+
else
91+
nls[key] = ''
92+
return ''
93+
end
94+
end)
8895
end),
8996
}
9097

package.nls.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.",
3838
"config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.",
3939
"config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.",
40+
"config.diagnostics.circle-doc-class": "",
4041
"config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.",
4142
"config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.",
4243
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
@@ -154,7 +155,29 @@
154155
"config.misc.executablePath": "Specify the executable path in VSCode.",
155156
"config.misc.parameters": "[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.",
156157
"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",
158+
"config.runtime.builtin.basic": "",
159+
"config.runtime.builtin.bit": "",
160+
"config.runtime.builtin.bit32": "",
161+
"config.runtime.builtin.builtin": "",
162+
"config.runtime.builtin.coroutine": "",
163+
"config.runtime.builtin.debug": "",
164+
"config.runtime.builtin.ffi": "",
165+
"config.runtime.builtin.io": "",
166+
"config.runtime.builtin.jit": "",
167+
"config.runtime.builtin.math": "",
168+
"config.runtime.builtin.os": "",
169+
"config.runtime.builtin.package": "",
170+
"config.runtime.builtin.string": "",
171+
"config.runtime.builtin.string.buffer": "",
172+
"config.runtime.builtin.table": "",
173+
"config.runtime.builtin.table.clear": "",
174+
"config.runtime.builtin.table.new": "",
175+
"config.runtime.builtin.utf8": "",
157176
"config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.",
177+
"config.runtime.fileEncoding.ansi": "",
178+
"config.runtime.fileEncoding.utf16be": "",
179+
"config.runtime.fileEncoding.utf16le": "",
180+
"config.runtime.fileEncoding.utf8": "",
158181
"config.runtime.meta": "Format of the directory name of the meta files.",
159182
"config.runtime.nonstandardSymbol": "Supports non-standard symbols. Make sure that your runtime environment supports these symbols.",
160183
"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",
@@ -164,6 +187,11 @@
164187
"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",
165188
"config.runtime.unicodeName": "Allows Unicode characters in name.",
166189
"config.runtime.version": "Lua runtime version.",
190+
"config.runtime.version.Lua 5.1": "",
191+
"config.runtime.version.Lua 5.2": "",
192+
"config.runtime.version.Lua 5.3": "",
193+
"config.runtime.version.Lua 5.4": "",
194+
"config.runtime.version.LuaJIT": "",
167195
"config.semantic.annotation": "Semantic coloring of type annotations.",
168196
"config.semantic.enable": "Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.",
169197
"config.semantic.keyword": "Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.",

package.nls.pt-br.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.",
3838
"config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.",
3939
"config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.",
40+
"config.diagnostics.circle-doc-class": "",
4041
"config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.",
4142
"config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.",
4243
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
@@ -154,7 +155,29 @@
154155
"config.misc.executablePath": "Specify the executable path in VSCode.",
155156
"config.misc.parameters": "[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.",
156157
"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",
158+
"config.runtime.builtin.basic": "",
159+
"config.runtime.builtin.bit": "",
160+
"config.runtime.builtin.bit32": "",
161+
"config.runtime.builtin.builtin": "",
162+
"config.runtime.builtin.coroutine": "",
163+
"config.runtime.builtin.debug": "",
164+
"config.runtime.builtin.ffi": "",
165+
"config.runtime.builtin.io": "",
166+
"config.runtime.builtin.jit": "",
167+
"config.runtime.builtin.math": "",
168+
"config.runtime.builtin.os": "",
169+
"config.runtime.builtin.package": "",
170+
"config.runtime.builtin.string": "",
171+
"config.runtime.builtin.string.buffer": "",
172+
"config.runtime.builtin.table": "",
173+
"config.runtime.builtin.table.clear": "",
174+
"config.runtime.builtin.table.new": "",
175+
"config.runtime.builtin.utf8": "",
157176
"config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.",
177+
"config.runtime.fileEncoding.ansi": "",
178+
"config.runtime.fileEncoding.utf16be": "",
179+
"config.runtime.fileEncoding.utf16le": "",
180+
"config.runtime.fileEncoding.utf8": "",
158181
"config.runtime.meta": "Format of the directory name of the meta files.",
159182
"config.runtime.nonstandardSymbol": "Supports non-standard symbols. Make sure that your runtime environment supports these symbols.",
160183
"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",
@@ -164,6 +187,11 @@
164187
"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",
165188
"config.runtime.unicodeName": "Allows Unicode characters in name.",
166189
"config.runtime.version": "Lua runtime version.",
190+
"config.runtime.version.Lua 5.1": "",
191+
"config.runtime.version.Lua 5.2": "",
192+
"config.runtime.version.Lua 5.3": "",
193+
"config.runtime.version.Lua 5.4": "",
194+
"config.runtime.version.LuaJIT": "",
167195
"config.semantic.annotation": "Semantic coloring of type annotations.",
168196
"config.semantic.enable": "Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.",
169197
"config.semantic.keyword": "Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.",

package.nls.zh-cn.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.",
3838
"config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.",
3939
"config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.",
40+
"config.diagnostics.circle-doc-class": "",
4041
"config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.",
4142
"config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.",
4243
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
@@ -154,7 +155,29 @@
154155
"config.misc.executablePath": "VSCode中指定可执行文件路径。",
155156
"config.misc.parameters": "VSCode中启动语言服务时的[命令行参数](https://github.com/sumneko/lua-language-server/wiki/Getting-Started#arguments)。",
156157
"config.runtime.builtin": "调整内置库的启用状态,你可以根据实际运行环境禁用掉不存在的库(或重新定义)。\n\n* `default`: 表示库会根据运行版本启用或禁用\n* `enable`: 总是启用\n* `disable`: 总是禁用\n",
158+
"config.runtime.builtin.basic": "",
159+
"config.runtime.builtin.bit": "",
160+
"config.runtime.builtin.bit32": "",
161+
"config.runtime.builtin.builtin": "",
162+
"config.runtime.builtin.coroutine": "",
163+
"config.runtime.builtin.debug": "",
164+
"config.runtime.builtin.ffi": "",
165+
"config.runtime.builtin.io": "",
166+
"config.runtime.builtin.jit": "",
167+
"config.runtime.builtin.math": "",
168+
"config.runtime.builtin.os": "",
169+
"config.runtime.builtin.package": "",
170+
"config.runtime.builtin.string": "",
171+
"config.runtime.builtin.string.buffer": "",
172+
"config.runtime.builtin.table": "",
173+
"config.runtime.builtin.table.clear": "",
174+
"config.runtime.builtin.table.new": "",
175+
"config.runtime.builtin.utf8": "",
157176
"config.runtime.fileEncoding": "文件编码,`ansi` 选项只在 `Windows` 平台下有效。",
177+
"config.runtime.fileEncoding.ansi": "",
178+
"config.runtime.fileEncoding.utf16be": "",
179+
"config.runtime.fileEncoding.utf16le": "",
180+
"config.runtime.fileEncoding.utf8": "",
158181
"config.runtime.meta": "meta文件的目录名称格式。",
159182
"config.runtime.nonstandardSymbol": "支持非标准的符号。请务必确认你的运行环境支持这些符号。",
160183
"config.runtime.path": "当使用 `require` 时,如何根据输入的名字来查找文件。\n此选项设置为 `?/init.lua` 意味着当你输入 `require 'myfile'` 时,会从已加载的文件中搜索 `{workspace}/myfile/init.lua`。\n当 `runtime.pathStrict` 设置为 `false` 时,还会尝试搜索 `${workspace}/**/myfile/init.lua`。\n如果你想要加载工作区以外的文件,你需要先设置 `Lua.workspace.library`。\n",
@@ -164,6 +187,11 @@
164187
"config.runtime.special": "将自定义全局变量视为一些特殊的内置变量,语言服务将提供特殊的支持。\n下面这个例子表示将 `include` 视为 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n",
165188
"config.runtime.unicodeName": "允许在名字中使用 Unicode 字符。",
166189
"config.runtime.version": "Lua运行版本。",
190+
"config.runtime.version.Lua 5.1": "",
191+
"config.runtime.version.Lua 5.2": "",
192+
"config.runtime.version.Lua 5.3": "",
193+
"config.runtime.version.Lua 5.4": "",
194+
"config.runtime.version.LuaJIT": "",
167195
"config.semantic.annotation": "对类型注解进行语义着色。",
168196
"config.semantic.enable": "启用语义着色。你可能需要同时将 `editor.semanticHighlighting.enabled` 设置为 `true` 才能生效。",
169197
"config.semantic.keyword": "对关键字/字面量/运算符进行语义着色。只有当你的编辑器无法进行语法着色时才需要启用此功能。",

package.nls.zh-tw.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.",
3838
"config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.",
3939
"config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.",
40+
"config.diagnostics.circle-doc-class": "",
4041
"config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.",
4142
"config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.",
4243
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
@@ -154,7 +155,29 @@
154155
"config.misc.executablePath": "Specify the executable path in VSCode.",
155156
"config.misc.parameters": "VSCode中啟動語言伺服時的[命令列參數](https://github.com/sumneko/lua-language-server/wiki/Getting-Started#arguments)。",
156157
"config.runtime.builtin": "調整內建庫的啟用狀態,你可以根據實際執行環境停用(或重新定義)不存在的庫。\n\n* `default`: 表示庫會根據執行版本啟用或停用\n* `enable`: 總是啟用\n* `disable`: 總是停用\n",
158+
"config.runtime.builtin.basic": "",
159+
"config.runtime.builtin.bit": "",
160+
"config.runtime.builtin.bit32": "",
161+
"config.runtime.builtin.builtin": "",
162+
"config.runtime.builtin.coroutine": "",
163+
"config.runtime.builtin.debug": "",
164+
"config.runtime.builtin.ffi": "",
165+
"config.runtime.builtin.io": "",
166+
"config.runtime.builtin.jit": "",
167+
"config.runtime.builtin.math": "",
168+
"config.runtime.builtin.os": "",
169+
"config.runtime.builtin.package": "",
170+
"config.runtime.builtin.string": "",
171+
"config.runtime.builtin.string.buffer": "",
172+
"config.runtime.builtin.table": "",
173+
"config.runtime.builtin.table.clear": "",
174+
"config.runtime.builtin.table.new": "",
175+
"config.runtime.builtin.utf8": "",
157176
"config.runtime.fileEncoding": "檔案編碼,選項 `ansi` 只在 `Windows` 平台下有效。",
177+
"config.runtime.fileEncoding.ansi": "",
178+
"config.runtime.fileEncoding.utf16be": "",
179+
"config.runtime.fileEncoding.utf16le": "",
180+
"config.runtime.fileEncoding.utf8": "",
158181
"config.runtime.meta": "meta檔案的目錄名稱格式",
159182
"config.runtime.nonstandardSymbol": "支援非標準的符號。請務必確認你的執行環境支援這些符號。",
160183
"config.runtime.path": "當使用 `require` 時,如何根據輸入的名字來尋找檔案。\n此選項設定為 `?/init.lua` 意味著當你輸入 `require 'myfile'` 時,會從已載入的檔案中搜尋 `{workspace}/myfile/init.lua`。\n當 `runtime.pathStrict` 設定為 `false` 時,還會嘗試搜尋 `${workspace}/**/myfile/init.lua`。\n如果你想要載入工作區以外的檔案,你需要先設定 `Lua.workspace.library`。\n",
@@ -164,6 +187,11 @@
164187
"config.runtime.special": "將自訂全域變數視為一些特殊的內建變數,語言伺服將提供特殊的支援。\n下面這個例子表示將 `include` 視為 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n",
165188
"config.runtime.unicodeName": "允許在名字中使用 Unicode 字元。",
166189
"config.runtime.version": "Lua執行版本。",
190+
"config.runtime.version.Lua 5.1": "",
191+
"config.runtime.version.Lua 5.2": "",
192+
"config.runtime.version.Lua 5.3": "",
193+
"config.runtime.version.Lua 5.4": "",
194+
"config.runtime.version.LuaJIT": "",
167195
"config.semantic.annotation": "對類型註解進行語義著色。",
168196
"config.semantic.enable": "啟用語義著色。你可能需要同時將 `editor.semanticHighlighting.enabled` 設定為 `true` 才能生效。",
169197
"config.semantic.keyword": "對關鍵字/字面常數/運算子進行語義著色。只有當你的編輯器無法進行語法著色時才需要啟用此功能。",

0 commit comments

Comments
 (0)