forked from mtcontrib/minetest_returnmirror
Use new intllib format strings
This commit is contained in:
parent
fce311abb8
commit
e1d5d72236
4
init.lua
4
init.lua
|
@ -2,7 +2,7 @@ local S
|
||||||
if (minetest.get_modpath("intllib")) then
|
if (minetest.get_modpath("intllib")) then
|
||||||
S = intllib.Getter()
|
S = intllib.Getter()
|
||||||
else
|
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
|
end
|
||||||
|
|
||||||
local returnmirror = {}
|
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.")
|
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
|
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.")
|
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
|
else
|
||||||
longdesc = S("This item allows to teleport its user back to a previously set location.")
|
longdesc = S("This item allows to teleport its user back to a previously set location.")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user