remove intllib support

This commit is contained in:
tenplus1 2023-08-08 14:16:03 +01:00
parent 787edfd305
commit 2455809475
8 changed files with 21 additions and 182 deletions

View file

@ -5,11 +5,25 @@
-- portal or place pad, portals show a blue flame that you can walk into
-- before it closes (10 seconds), potions can also be thrown for local teleport.
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S = minetest.get_translator and minetest.get_translator("teleport_potion") or
dofile(MP .. "/intllib.lua")
-- translation support
local S
if minetest.get_translator then
S = minetest.get_translator("teleport_potion")
else
S = function(s, a, ...)
if a == nil then
return s
end
a = {a, ...}
return s:gsub("(@?)@(%(?)(%d+)(%)?)", function(e, o, n, c)
if e == ""then
return a[tonumber(n)] .. (o == "" and c or "")
else
return "@" .. o .. n .. c
end
end)
end
end
-- check for MineClone2
local mcl = minetest.get_modpath("mcl_core")
@ -562,4 +576,5 @@ if minetest.get_modpath("lucky_block") then
})
end
print ("[MOD] Teleport Potion loaded")