Enable i18n support into mods/beds.

This commit is contained in:
Fab 2015-03-19 20:45:55 +01:00
parent 0adc475590
commit 14db98ad23
4 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,6 @@
-- fancy shaped bed
beds.register_bed("beds:fancy_bed", {
description = "Fancy Bed",
description = _("Fancy Bed"),
inventory_image = "beds_bed_fancy.png",
wield_image = "beds_bed_fancy.png",
tiles = {
@ -50,7 +50,7 @@ beds.register_bed("beds:fancy_bed", {
-- simple shaped bed
beds.register_bed("beds:bed", {
description = "Simple Bed",
description = _("Simple Bed"),
inventory_image = "beds_bed.png",
wield_image = "beds_bed.png",
tiles = {

View file

@ -1,2 +1,3 @@
default
i18n
wool

View file

@ -136,7 +136,7 @@ function beds.on_rightclick(pos, player)
if beds.player[name] then
lay_down(player, nil, nil, false)
end
minetest.chat_send_player(name, "You can only sleep at night.")
minetest.chat_send_player(name, _("You can only sleep at night."))
return
end

View file

@ -9,6 +9,8 @@ beds.formspec = "size[8,15;true]"..
local modpath = minetest.get_modpath("beds")
i18n.load_mo_file(modpath, "beds")
-- load files
dofile(modpath.."/functions.lua")
dofile(modpath.."/api.lua")