Add `modname.lang.tr` locales support

This commit is contained in:
MoNTE48 2021-02-06 20:13:36 +01:00
parent 016f8af977
commit 0bdd1a301b
1 changed files with 2 additions and 1 deletions

View File

@ -201,7 +201,8 @@ function intllib.get_strings(modname, langcode)
local modpath = minetest.get_modpath(modname)
msgstr = { }
for _, l in ipairs(get_locales(langcode)) do
local t = intllib.load_strings(modpath.."/locale/"..l..".txt") or { }
local t = intllib.load_strings(modpath.."/locale/"..modname.."."..l..".tr")
or intllib.load_strings(modpath.."/locale/"..l..".txt") or { }
for k, v in pairs(t) do
msgstr[k] = msgstr[k] or v
end