mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-28 09:36:27 -04:00
Enable i18n support into mods/beds.
This commit is contained in:
parent
0adc475590
commit
14db98ad23
4 changed files with 6 additions and 3 deletions
|
@ -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 = {
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
default
|
||||
i18n
|
||||
wool
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue