forked from mtcontrib/minetest_returnmirror
Add intllib support and German translation
This commit is contained in:
parent
512dbfd1fa
commit
c324e71984
|
@ -1,2 +1,3 @@
|
||||||
mana?
|
mana?
|
||||||
|
intllib?
|
||||||
doc_items?
|
doc_items?
|
||||||
|
|
20
init.lua
20
init.lua
|
@ -1,3 +1,11 @@
|
||||||
|
local S
|
||||||
|
if (minetest.get_modpath("intllib")) then
|
||||||
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
|
else
|
||||||
|
S = function ( s ) return s end
|
||||||
|
end
|
||||||
|
|
||||||
returnmirror = {}
|
returnmirror = {}
|
||||||
returnmirror.cost_teleport = 200
|
returnmirror.cost_teleport = 200
|
||||||
returnmirror.cost_set = 20
|
returnmirror.cost_set = 20
|
||||||
|
@ -53,7 +61,7 @@ returnmirror.set_position_active = function(itemstack, user, pointed_thing)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_tool("returnmirror:mirror_inactive", {
|
minetest.register_tool("returnmirror:mirror_inactive", {
|
||||||
description = "Mirror of Returning",
|
description = S("Mirror of Returning"),
|
||||||
inventory_image = "returnmirror_mirror_inactive.png",
|
inventory_image = "returnmirror_mirror_inactive.png",
|
||||||
wield_image = "returnmirror_mirror_inactive.png",
|
wield_image = "returnmirror_mirror_inactive.png",
|
||||||
tool_capabilities = {},
|
tool_capabilities = {},
|
||||||
|
@ -66,7 +74,7 @@ minetest.register_tool("returnmirror:mirror_inactive", {
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("returnmirror:mirror_active", {
|
minetest.register_tool("returnmirror:mirror_active", {
|
||||||
description = "Mirror of Returning",
|
description = S("Mirror of Returning"),
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
inventory_image = "returnmirror_mirror_active.png",
|
inventory_image = "returnmirror_mirror_active.png",
|
||||||
wield_image = "returnmirror_mirror_active.png",
|
wield_image = "returnmirror_mirror_active.png",
|
||||||
|
@ -124,12 +132,12 @@ minetest.register_alias("returnmirror:mirror_inactive", "returnmirror:returnmirr
|
||||||
|
|
||||||
if minetest.get_modpath("doc_items") ~= nil then
|
if minetest.get_modpath("doc_items") ~= nil then
|
||||||
local longdesc, usagehelp
|
local longdesc, usagehelp
|
||||||
usagehelp = "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 ="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("Setting the teleport location costs %d mana, teleporting costs %d mana.", returnmirror.cost_set, returnmirror.cost_teleport)
|
usagehelp = usagehelp .. " " .. string.format(S("Setting the teleport location costs %d mana, teleporting costs %d mana."), returnmirror.cost_set, returnmirror.cost_teleport)
|
||||||
else
|
else
|
||||||
longdesc = "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
|
||||||
|
|
||||||
doc.sub.items.set_items_longdesc({
|
doc.sub.items.set_items_longdesc({
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
Mirror of Returning = Spiegel der Rückkehr
|
||||||
|
Rightclick to set the mirror's teleport location. Leftclick to immediately teleport back to the mirror's teleport location. = Rechtsklicken, um die Teleportationsposition des Spiegels zu setzen. Linksklicken, um eine sofortige Teleportation zur Teleportationsposition des Spiegels vorzunehmen.
|
||||||
|
Setting the teleport location costs %d mana, teleporting costs %d mana. = Das Setzen der Teleportationsposition kostet %d Mana. Das Teleportieren kostet %d Mana.
|
||||||
|
This item allows to teleport its user back to a previously set location. = Dieser Gegenstand ermöglicht es seinem Benutzer, sich zu einer zuvor gesetzen Position zurück zu teleportieren.
|
||||||
|
This item allows to teleport the user back to a previously set location, at the cost of mana. = Dieser Gegenstand ermöglicht es dem Benutzer, sich auf Kosten von Mana zu einer zuvor gesetzten Position zurück zu teleportieren.
|
|
@ -0,0 +1,5 @@
|
||||||
|
Mirror of Returning =
|
||||||
|
Rightclick to set the mirror's teleport location. Leftclick to immediately teleport back to the mirror's teleport location. =
|
||||||
|
Setting the teleport location costs %d mana, teleporting costs %d mana. =
|
||||||
|
This item allows to teleport its user back to a previously set location. =
|
||||||
|
This item allows to teleport the user back to a previously set location, at the cost of mana. =
|
Loading…
Reference in New Issue