1
0
mirror of https://github.com/minetest-mods/intllib.git synced 2025-06-28 14:16:05 +02:00

Add modname.lang.tr locales support (#32)

This commit is contained in:
Maksim
2021-02-23 18:11:54 +01:00
committed by GitHub
parent 016f8af977
commit 6ebdc5388d

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