Use new intllib format strings

This commit is contained in:
Wuzzy 2016-11-09 02:33:44 +01:00
parent fce311abb8
commit e1d5d72236
1 changed files with 2 additions and 2 deletions

View File

@ -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