diff options
author | Xanthin <Xanthin@users.noreply.github.com> | 2014-04-16 19:10:00 +0200 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-04-22 16:30:27 -0400 |
commit | 39c41a06f4993dc17507fb480fcabbca319ceff7 (patch) | |
tree | 63f2fad43fa39f2b1d7664a5f75cc8041e18e078 /wrench/init.lua | |
parent | db202503713ddd1084f188a5eac506be665e9c44 (diff) |
Add german translations for all mods
Diffstat (limited to 'wrench/init.lua')
-rw-r--r-- | wrench/init.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/wrench/init.lua b/wrench/init.lua index 0137f17..500f8ac 100644 --- a/wrench/init.lua +++ b/wrench/init.lua @@ -16,6 +16,14 @@ local modpath = minetest.get_modpath(minetest.get_current_modname()) dofile(modpath.."/support.lua") dofile(modpath.."/technic.lua") +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if intllib then + S = intllib.Getter() +else + S = function(s) return s end +end + local function get_meta_type(name, metaname) local def = wrench.registered_nodes[name] if not def or not def.metas or not def.metas[metaname] then @@ -60,7 +68,7 @@ for name, info in pairs(wrench.registered_nodes) do newdef[key] = value end newdef.stack_max = 1 - newdef.description = newdef.description.." with items" + newdef.description = S("%s with items"):format(newdef.description) newdef.groups = {} newdef.groups.not_in_creative_inventory = 1 newdef.on_construct = nil @@ -71,7 +79,7 @@ for name, info in pairs(wrench.registered_nodes) do end minetest.register_tool("wrench:wrench", { - description = "Wrench", + description = S("Wrench"), inventory_image = "technic_wrench.png", tool_capabilities = { full_punch_interval = 0.9, |