diff options
author | Wuzzy <almikes@aol.com> | 2016-08-05 16:58:00 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-08-05 16:58:00 +0200 |
commit | 7e084c50d2fb71b07002e5061d3edb28597a6a28 (patch) | |
tree | 1eba0a6fcd02c43898e02abd518b4d98e9f5c6e1 | |
parent | 5ea402b3f83313f8efb167dc28cc7e737ed2d9c0 (diff) |
Add intllib support and German
-rw-r--r-- | depends.txt | 1 | ||||
-rw-r--r-- | init.lua | 10 | ||||
-rw-r--r-- | locale/de.txt | 1 | ||||
-rw-r--r-- | locale/template.txt | 1 |
4 files changed, 12 insertions, 1 deletions
diff --git a/depends.txt b/depends.txt index 03053ad..0367a67 100644 --- a/depends.txt +++ b/depends.txt @@ -1,4 +1,5 @@ hudbars +intllib? default? flowers? animalmaterials? @@ -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 + if minetest.setting_getbool("enable_damage") then hbhunger = {} @@ -39,7 +47,7 @@ end dofile(minetest.get_modpath("hbhunger").."/hunger.lua") -- register satiation hudbar -hb.register_hudbar("satiation", 0xFFFFFF, "Satiation", { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false) +hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false) -- update hud elemtens if value has changed local function update_hud(player) diff --git a/locale/de.txt b/locale/de.txt new file mode 100644 index 0000000..3a06d93 --- /dev/null +++ b/locale/de.txt @@ -0,0 +1 @@ +Satiation = Sättigung diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..37a578d --- /dev/null +++ b/locale/template.txt @@ -0,0 +1 @@ +Satiation |