forked from mtcontrib/minetest_hbarmor
Update to 5.0.0 translation system
This commit is contained in:
parent
fa0ed391c6
commit
79e9343331
9
init.lua
9
init.lua
@ -1,9 +1,4 @@
|
|||||||
local S
|
local S = minetest.get_translator("hbarmor")
|
||||||
if (minetest.get_modpath("intllib")) then
|
|
||||||
S = intllib.Getter()
|
|
||||||
else
|
|
||||||
S = function ( s ) return s end
|
|
||||||
end
|
|
||||||
|
|
||||||
if (not armor) or (not armor.def) then
|
if (not armor) or (not armor.def) then
|
||||||
minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!")
|
minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!")
|
||||||
@ -65,7 +60,7 @@ local function custom_hud(player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--register and define armor HUD bar
|
--register and define armor HUD bar
|
||||||
hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, S("%s: %d%%"))
|
hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, S("@1: @2%"))
|
||||||
|
|
||||||
function hbarmor.get_armor(player)
|
function hbarmor.get_armor(player)
|
||||||
if not player or not armor.def then
|
if not player or not armor.def then
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
Armor = Panzerung
|
|
||||||
%s: %d%% = %s: %d%%
|
|
3
locale/hbarmor.de.tr
Normal file
3
locale/hbarmor.de.tr
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# textdomain:hbarmor
|
||||||
|
Armor=Panzerung
|
||||||
|
@1: @2%=@1: @2%
|
3
locale/hbarmor.it.tr
Normal file
3
locale/hbarmor.it.tr
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# textdomain:hbarmor
|
||||||
|
Armor=Armatura
|
||||||
|
@1: @2%=@1:@2%
|
@ -1,4 +0,0 @@
|
|||||||
Armor = Armatura
|
|
||||||
|
|
||||||
# Format string for displaying the armor. E.g. "Armor: 100%"
|
|
||||||
%s: %d%% =
|
|
@ -1,4 +1,5 @@
|
|||||||
Armor =
|
# textdomain:hbarmor
|
||||||
|
Armor=
|
||||||
|
|
||||||
# Format string for displaying the armor. E.g. "Armor: 100%"
|
# Format string for displaying the armor. E.g. "Armor: 100%"
|
||||||
%s: %d%% =
|
@1: @2%=
|
||||||
|
1
mod.conf
1
mod.conf
@ -1,4 +1,3 @@
|
|||||||
name = hbarmor
|
name = hbarmor
|
||||||
description = Adds a HUD bar displaying the current damage of the player's armor.
|
description = Adds a HUD bar displaying the current damage of the player's armor.
|
||||||
depends = hudbars, 3d_armor
|
depends = hudbars, 3d_armor
|
||||||
optional_depends = intllib
|
|
||||||
|
Loading…
Reference in New Issue
Block a user