mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-31 02:56:26 -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
|
-- fancy shaped bed
|
||||||
beds.register_bed("beds:fancy_bed", {
|
beds.register_bed("beds:fancy_bed", {
|
||||||
description = "Fancy Bed",
|
description = _("Fancy Bed"),
|
||||||
inventory_image = "beds_bed_fancy.png",
|
inventory_image = "beds_bed_fancy.png",
|
||||||
wield_image = "beds_bed_fancy.png",
|
wield_image = "beds_bed_fancy.png",
|
||||||
tiles = {
|
tiles = {
|
||||||
|
@ -50,7 +50,7 @@ beds.register_bed("beds:fancy_bed", {
|
||||||
|
|
||||||
-- simple shaped bed
|
-- simple shaped bed
|
||||||
beds.register_bed("beds:bed", {
|
beds.register_bed("beds:bed", {
|
||||||
description = "Simple Bed",
|
description = _("Simple Bed"),
|
||||||
inventory_image = "beds_bed.png",
|
inventory_image = "beds_bed.png",
|
||||||
wield_image = "beds_bed.png",
|
wield_image = "beds_bed.png",
|
||||||
tiles = {
|
tiles = {
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
default
|
default
|
||||||
|
i18n
|
||||||
wool
|
wool
|
||||||
|
|
|
@ -136,7 +136,7 @@ function beds.on_rightclick(pos, player)
|
||||||
if beds.player[name] then
|
if beds.player[name] then
|
||||||
lay_down(player, nil, nil, false)
|
lay_down(player, nil, nil, false)
|
||||||
end
|
end
|
||||||
minetest.chat_send_player(name, "You can only sleep at night.")
|
minetest.chat_send_player(name, _("You can only sleep at night."))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ beds.formspec = "size[8,15;true]"..
|
||||||
|
|
||||||
local modpath = minetest.get_modpath("beds")
|
local modpath = minetest.get_modpath("beds")
|
||||||
|
|
||||||
|
i18n.load_mo_file(modpath, "beds")
|
||||||
|
|
||||||
-- load files
|
-- load files
|
||||||
dofile(modpath.."/functions.lua")
|
dofile(modpath.."/functions.lua")
|
||||||
dofile(modpath.."/api.lua")
|
dofile(modpath.."/api.lua")
|
||||||
|
|
Loading…
Add table
Reference in a new issue