fix: language priority (#525)

This commit is contained in:
natural-harmonia-gropius
2023-04-25 15:36:21 +08:00
committed by GitHub
parent 398947d931
commit 55087ca3fa

View File

@@ -39,8 +39,9 @@ end
function make_locale() function make_locale()
local translations = {} local translations = {}
for _, lang in ipairs(get_languages()) do local languages = get_languages()
for i = #languages, 1, -1 do
lang = languages[i]
if (lang:match('.json$')) then if (lang:match('.json$')) then
table_assign(translations, get_locale_from_json(lang)) table_assign(translations, get_locale_from_json(lang))
else else