diff --git a/init.lua b/init.lua index 2d082f7..d0690de 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,7 @@ local S if (minetest.get_modpath("intllib")) then S = intllib.Getter() else - S = function ( s ) return s end + S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end end local returnmirror = {} @@ -64,7 +64,7 @@ if minetest.get_modpath("doc_items") then usagehelp = S("Rightclick to set the mirror's teleport location. Leftclick to immediately teleport back to the mirror's teleport location.") if minetest.get_modpath("mana") ~= nil then longdesc = S("This item allows to teleport the user back to a previously set location, at the cost of mana.") - usagehelp = usagehelp .. " " .. string.format(S("Setting the teleport location costs %d mana, teleporting costs %d mana."), returnmirror.cost_set, returnmirror.cost_teleport) + usagehelp = usagehelp .. " " .. S("Setting the teleport location costs @1 mana, teleporting costs @2 mana.", returnmirror.cost_set, returnmirror.cost_teleport) else longdesc = S("This item allows to teleport its user back to a previously set location.") end