From 39c41a06f4993dc17507fb480fcabbca319ceff7 Mon Sep 17 00:00:00 2001 From: Xanthin Date: Wed, 16 Apr 2014 19:10:00 +0200 Subject: Add german translations for all mods --- wrench/depends.txt | 4 +++- wrench/init.lua | 12 ++++++++++-- wrench/locale/de.txt | 7 +++++++ wrench/locale/template.txt | 5 +++++ 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 wrench/locale/de.txt create mode 100644 wrench/locale/template.txt (limited to 'wrench') diff --git a/wrench/depends.txt b/wrench/depends.txt index f6abc61..0905917 100644 --- a/wrench/depends.txt +++ b/wrench/depends.txt @@ -1,3 +1,5 @@ default technic -technic_chests \ No newline at end of file +technic_chests +intllib? + 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, diff --git a/wrench/locale/de.txt b/wrench/locale/de.txt new file mode 100644 index 0000000..b285cd3 --- /dev/null +++ b/wrench/locale/de.txt @@ -0,0 +1,7 @@ +# German Translation for technic_wrench +# Deutsche Übersetzung von technic_wrench +# by Xanthin + +Wrench = Schraubenschluessel +%s with items = %s mit Gegenstaenden + diff --git a/wrench/locale/template.txt b/wrench/locale/template.txt new file mode 100644 index 0000000..eff2da2 --- /dev/null +++ b/wrench/locale/template.txt @@ -0,0 +1,5 @@ +# technic_wrench translation template + +Wrench = +%s with items = + -- cgit v1.2.3