summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--locale/en-us/script.lua4
-rw-r--r--locale/zh-cn/script.lua4
-rw-r--r--script/core/command/autoRequire.lua4
3 files changed, 8 insertions, 4 deletions
diff --git a/locale/en-us/script.lua b/locale/en-us/script.lua
index 9844936d..16a3ffa5 100644
--- a/locale/en-us/script.lua
+++ b/locale/en-us/script.lua
@@ -198,7 +198,9 @@ COMMAND_UNICODE_NAME = 'Allow Unicode characters.'
COMMAND_JSON_TO_LUA = 'Convert JSON to Lua'
COMMAND_JSON_TO_LUA_FAILED = 'Convert JSON to Lua failed: {}'
-COMPLETION_IMPORT_FROM = 'Import from {}'
+COMPLETION_IMPORT_FROM = 'Import from {}'
+COMPLETION_DISABLE_AUTO_REQUIRE = 'Disable auto require'
+COMPLETION_ASK_AUTO_REQUIRE = 'Add the code at the top of the file to require this file?'
DEBUG_MEMORY_LEAK = "{} I'm sorry for the serious memory leak. The language service will be restarted soon."
DEBUG_RESTART_NOW = 'Restart now'
diff --git a/locale/zh-cn/script.lua b/locale/zh-cn/script.lua
index 80892b57..3a60c691 100644
--- a/locale/zh-cn/script.lua
+++ b/locale/zh-cn/script.lua
@@ -197,7 +197,9 @@ COMMAND_UNICODE_NAME = '允许使用 Unicode 字符'
COMMAND_JSON_TO_LUA = 'JSON 转 Lua'
COMMAND_JSON_TO_LUA_FAILED = 'JSON 转 Lua 失败:{}'
-COMPLETION_IMPORT_FROM = '从 {} 中导入'
+COMPLETION_IMPORT_FROM = '从 {} 中导入'
+COMPLETION_DISABLE_AUTO_REQUIRE = '禁用自动require'
+COMPLETION_ASK_AUTO_REQUIRE = '在文件顶部添加代码 require 此文件?'
DEBUG_MEMORY_LEAK = '{} 很抱歉发生了严重的内存泄漏,语言服务即将重启。'
DEBUG_RESTART_NOW = '立即重启'
diff --git a/script/core/command/autoRequire.lua b/script/core/command/autoRequire.lua
index 947e78aa..89dc4376 100644
--- a/script/core/command/autoRequire.lua
+++ b/script/core/command/autoRequire.lua
@@ -46,11 +46,11 @@ local function askAutoRequire(visiblePaths)
nameMap[select] = expect
selects[#selects+1] = select
end
- local disable = lang.script('禁用自动require')
+ local disable = lang.script.COMPLETION_DISABLE_AUTO_REQUIRE
selects[#selects+1] = disable
local result = client.awaitRequestMessage('Info'
- , lang.script('在文件顶部添加代码 require 此文件?')
+ , lang.script.COMPLETION_ASK_AUTO_REQUIRE
, selects
)
if not result then