1
0
mirror of https://github.com/minetest-mods/intllib.git synced 2025-07-05 17:40:21 +02:00

Add modname.lang.tr locales support

This commit is contained in:
MoNTE48
2021-02-06 20:13:36 +01:00
parent 016f8af977
commit 0bdd1a301b

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