summaryrefslogtreecommitdiff
path: root/script/config
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-08 17:27:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-08 17:27:32 +0800
commit3eff278428432a6e21ee71c1434d64390652bad9 (patch)
tree677299189d8d8047d57b39404c2dd036a1dc9c80 /script/config
parent812f57e1811b110e44f1b7064880ca8da9b2f328 (diff)
downloadlua-language-server-3eff278428432a6e21ee71c1434d64390652bad9.zip
locale
Diffstat (limited to 'script/config')
-rw-r--r--script/config/loader.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/script/config/loader.lua b/script/config/loader.lua
index 435b00d1..b0e8b6db 100644
--- a/script/config/loader.lua
+++ b/script/config/loader.lua
@@ -26,13 +26,13 @@ function m.loadLocalConfig(filename)
local ext = path:extension():string():lower()
local buf = fsu.loadFile(path)
if not buf then
- errorMessage(lang.script('无法读取设置文件:{}', path:string()))
+ errorMessage(lang.script('CONFIG_LOAD_FAILED', path:string()))
return
end
if ext == '.json' then
local suc, res = pcall(json.decode, buf)
if not suc then
- errorMessage(lang.script('设置文件加载错误:{}', res))
+ errorMessage(lang.script('CONFIG_LOAD_ERROR', res))
return
end
return res
@@ -41,12 +41,12 @@ function m.loadLocalConfig(filename)
return assert(load(buf, '@' .. path:string(), 't'))()
end)
if not suc then
- errorMessage(lang.script('设置文件加载错误:{}', res))
+ errorMessage(lang.script('CONFIG_LOAD_ERROR', res))
return
end
return res
else
- errorMessage(lang.script('设置文件必须是lua或json格式:{}', path:string()))
+ errorMessage(lang.script('CONFIG_TYPE_ERROR', path:string()))
return
end
end