summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/language.lua8
-rw-r--r--server/src/matcher/find_lib.lua4
2 files changed, 6 insertions, 6 deletions
diff --git a/server/src/language.lua b/server/src/language.lua
index da25a0b8..30acdadb 100644
--- a/server/src/language.lua
+++ b/server/src/language.lua
@@ -4,14 +4,14 @@ local function supportLanguage()
local list = {}
for path in (ROOT / 'locale'):list_directory() do
if fs.is_directory(path) then
- list[#list+1] = path:filename():string()
+ list[#list+1] = path:filename():string():lower()
end
end
return list
end
local function osLanguage()
- return ''
+ return LANG:lower()
end
local function getLanguage(id)
@@ -33,8 +33,8 @@ end
local function init()
local id = osLanguage()
local language = getLanguage(id)
- log.info(('Os language: %s'):format(id))
- log.info(('Used language: %s'):format(language))
+ log.info(('VSC language: %s'):format(id))
+ log.info(('LSP language: %s'):format(language))
return language
end
diff --git a/server/src/matcher/find_lib.lua b/server/src/matcher/find_lib.lua
index e2c124ab..e91568fc 100644
--- a/server/src/matcher/find_lib.lua
+++ b/server/src/matcher/find_lib.lua
@@ -96,9 +96,9 @@ local function getLibs()
end
local relative = fs.relative(path, ROOT)
- local locale = loadLocale('enUS', relative)
+ local locale = loadLocale('en-US', relative)
mergeLocale(libs, locale)
- if language ~= 'enUS' then
+ if language ~= 'en-US' then
locale = loadLocale(language, relative)
mergeLocale(libs, locale)
end