1
0
mirror of https://codeberg.org/tenplus1/mobs_monster.git synced 2025-07-04 17:30:21 +02:00

remove intllib

This commit is contained in:
tenplus1
2023-08-08 16:51:31 +01:00
parent 7a5d019d8a
commit 0c4794c446
12 changed files with 8 additions and 314 deletions

View File

@ -4,23 +4,14 @@ local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
-- Check for translation method
local S
if minetest.get_translator ~= nil then
if minetest.get_translator then
S = minetest.get_translator("mobs_monster") -- 5.x translation function
else
if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then
S = intllib.make_gettext_pair() -- new gettext method
else
S = intllib.Getter() -- old text file method
end
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end