diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/locale/en-US/script.lni | 3 | ||||
-rw-r--r-- | server/locale/zh-CN/script.lni | 3 | ||||
-rw-r--r-- | server/src/method/workspace/didChangeWorkspaceFolders.lua | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/server/locale/en-US/script.lni b/server/locale/en-US/script.lni index da01d7d5..5b7c76f7 100644 --- a/server/locale/en-US/script.lni +++ b/server/locale/en-US/script.lni @@ -7,3 +7,6 @@ DIAG_UNUSED_LABEL = 'Unused label `{}`.' DIAG_REDEFINED_LOCAL = 'Redefined local `{}`.' 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}.' + +MWS_NOT_SUPPORT = '{} dose not support multi workspace for now, I may need to restart to support the new workspace ...' +MWS_RESTART = 'Restart' diff --git a/server/locale/zh-CN/script.lni b/server/locale/zh-CN/script.lni index 6b322fb4..735f429b 100644 --- a/server/locale/zh-CN/script.lni +++ b/server/locale/zh-CN/script.lni @@ -7,3 +7,6 @@ DIAG_UNUSED_LABEL = '未使用的标签 `{}`。' DIAG_REDEFINED_LOCAL = '重定义局部变量 `{}`。' DIAG_PREVIOUS_CALL = '解析为了上一行的函数调用。你可能需要在前面加一个 `;`。' DIAG_OVER_MAX_ARGS = '函数只接收 {:d} 个参数,但你传了 {:d} 个。' + +MWS_NOT_SUPPORT = '{} 目前还不支持多工作目录,我可能需要重启才能支持新的工作目录...' +MWS_RESTART = '重启' diff --git a/server/src/method/workspace/didChangeWorkspaceFolders.lua b/server/src/method/workspace/didChangeWorkspaceFolders.lua index 6daca4c6..dc8bb4a1 100644 --- a/server/src/method/workspace/didChangeWorkspaceFolders.lua +++ b/server/src/method/workspace/didChangeWorkspaceFolders.lua @@ -1,13 +1,14 @@ local rpc = require 'rpc' +local lang = require 'language' return function () -- 暂不支持多个工作目录,因此当工作目录切换时,暴力结束服务,让前端重启服务 rpc:requestWait('window/showMessageRequest', { type = 3, - message = '[Lua] dose not support multi workspace for now, I may need to restart to support the new workspace ...', + message = lang.script('MWS_NOT_SUPPORT', '[Lua]'), actions = { { - title = 'Restart' + title = lang.script.MWS_RESTART, } } }, function () |