diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-03 11:02:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-03 11:02:09 +0800 |
commit | 112a45b41a7af5b552d7b296c9dc5ffa042d3561 (patch) | |
tree | dc0e4d0976d7994f33a518a80f6e76f32684fc84 /script/library.lua | |
parent | 0f168c4bf45f5f3b70dd2bcf779a945a29a3fdd9 (diff) | |
download | lua-language-server-112a45b41a7af5b552d7b296c9dc5ffa042d3561.zip |
locale file format changes to lua
Diffstat (limited to 'script/library.lua')
-rw-r--r-- | script/library.lua | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/script/library.lua b/script/library.lua index a48f9537..06b7d8f4 100644 --- a/script/library.lua +++ b/script/library.lua @@ -1,9 +1,9 @@ -local lni = require 'lni' -local fs = require 'bee.filesystem' -local config = require 'config' -local util = require 'utility' -local lang = require 'language' -local client = require 'provider.client' +local fs = require 'bee.filesystem' +local config = require 'config' +local util = require 'utility' +local lang = require 'language' +local client = require 'provider.client' +local lloader = require 'locale-loader' local m = {} @@ -152,10 +152,10 @@ end local function loadMetaLocale(langID, result) result = result or {} - local path = (ROOT / 'locale' / langID / 'meta.lni'):string() - local lniContent = util.loadFile(path) - if lniContent then - xpcall(lni, log.error, lniContent, path, {result}) + local path = (ROOT / 'locale' / langID / 'meta.lua'):string() + local localeContent = util.loadFile(path) + if localeContent then + xpcall(lloader, log.error, localeContent, path, result) end return result end |