diff --git a/mods/areas/hud.lua b/mods/areas/hud.lua index ef15966..f0f1ed0 100644 --- a/mods/areas/hud.lua +++ b/mods/areas/hud.lua @@ -1,4 +1,11 @@ --- This is inspired by the landrush mod by Bremaweb +-- intllib support +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 areas.hud = {} @@ -8,8 +15,8 @@ minetest.register_globalstep(function(dtime) local pos = vector.round(player:getpos()) local areaStrings = {} for id, area in pairs(areas:getAreasAtPos(pos)) do - table.insert(areaStrings, ("You are now in: %s") - :format(area.name)) + table.insert(areaStrings, (S("You are here: %s")) + :format(S(area.name))) end local areaString = table.concat(areaStrings, "\n") local hud = areas.hud[name] diff --git a/mods/areas/locale/de.txt b/mods/areas/locale/de.txt new file mode 100644 index 0000000..3ed4e41 --- /dev/null +++ b/mods/areas/locale/de.txt @@ -0,0 +1,25 @@ +# hud.lua +You are here: %s = Sie befinden sich hier: %s + +# Section names +Start room = Startraum +Jumping section = Sprungabschnitt +Pointing section = Zeigeabschnitt +Using section = Benutzen-Abschnitt +Inventory and Chests section = Abschnitt »Inventar und Truhen« +Comestibles section = Abschnitt »Essbare Gegenstände« +Crafting and Tools section = Abschnitt »Fertigung und Werkzeuge« +Smelting section = Verhüttungsabschnitt +Swimming section = Schwimmabschnitt +Diving section = Tauchabschnitt +Waterfall section = Wasserfallabschnitt +Viscosity section = Zähflüssigkeitsabschnitt +Health and Damage section = Abschnitt »Gesundheit und Schaden« +Climbing section = Kletterabschnitt +Mining section = Abbauabschnitt +Special Blocks section = Abschnitt »Besondere Blöcke« +Tutorial Mine = Tutorialmine +Building section = Bauabschnitt +Sneaking section = Schleichabschnitt +Good-Bye room = Abschiedsraum + diff --git a/mods/areas/locale/template.txt b/mods/areas/locale/template.txt new file mode 100644 index 0000000..e388de5 --- /dev/null +++ b/mods/areas/locale/template.txt @@ -0,0 +1,24 @@ +# hud.lua +You are here: %s + +# Section names +Start room +Jumping section +Pointing section +Using section +Inventory and Chests section +Comestibles section +Crafting and Tools section +Smelting section +Swimming section +Diving section +Waterfall section +Viscosity section +Health and Damage section +Climbing section +Mining section +Special Blocks section +Tutorial Mine +Building section +Sneaking section +Good-Bye room