forked from mtcontrib/minetest_hudbars
Add intllib support
This commit is contained in:
parent
f06e3c362f
commit
1786ae2cab
@ -0,0 +1 @@
|
||||
intllib?
|
12
init.lua
12
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
|
||||
|
||||
hb = {}
|
||||
|
||||
hb.hudtables = {}
|
||||
@ -425,8 +433,8 @@ end
|
||||
|
||||
--register built-in HUD bars
|
||||
if minetest.setting_getbool("enable_damage") or hb.settings.forceload_default_hudbars then
|
||||
hb.register_hudbar("health", 0xFFFFFF, "Health", { bar = "hudbars_bar_health.png", icon = "hudbars_icon_health.png", bgicon = "hudbars_bgicon_health.png" }, 20, 20, false)
|
||||
hb.register_hudbar("breath", 0xFFFFFF, "Breath", { bar = "hudbars_bar_breath.png", icon = "hudbars_icon_breath.png" }, 10, 10, true)
|
||||
hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = "hudbars_icon_health.png", bgicon = "hudbars_bgicon_health.png" }, 20, 20, false)
|
||||
hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = "hudbars_icon_breath.png" }, 10, 10, true)
|
||||
end
|
||||
|
||||
local function hide_builtin(player)
|
||||
|
2
locale/de.txt
Normal file
2
locale/de.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Health = Leben
|
||||
Breath = Atem
|
2
locale/template.txt
Normal file
2
locale/template.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Health
|
||||
Breath
|
Loading…
Reference in New Issue
Block a user