5.x translator check with placeholder if not found
This commit is contained in:
parent
dfcdc24dfd
commit
38f9e3e10e
16
init.lua
16
init.lua
@ -10,7 +10,21 @@ Tweaked by TenPlus1 and Security improvements by Krock
|
||||
|
||||
]]--
|
||||
|
||||
local S = minetest.get_translator("sfinv_bags")
|
||||
|
||||
-- translator check for backwards compatibility
|
||||
local S
|
||||
|
||||
if minetest.get_translator then
|
||||
S = minetest.get_translator("sfinv_bags")
|
||||
else
|
||||
S = function(str, ...)
|
||||
local args = {...}
|
||||
return str:gsub("@%d+", function(match)
|
||||
return args[tonumber(match:sub(2))]
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function get_player_bag_stack(player, i)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user