1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-23 00:20:17 +01:00

MT5 translation for homedecor_bedroom

- add screwdriver in optional_depends
- Fix luacheck warnings
This commit is contained in:
Louis Royer 2020-08-04 20:09:25 +02:00
parent ea73ff6f6e
commit c6e35a4e5c
13 changed files with 147 additions and 19 deletions

View File

@ -1,5 +0,0 @@
homedecor_common
default
basic_materials
unifieddyes
creative

View File

@ -1,7 +1,6 @@
local S = minetest.get_translator("homedecor_bedroom")
local S = homedecor.gettext local sc = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
local function N_(x) return x end
local bed_sbox = { local bed_sbox = {
type = "wallmounted", type = "wallmounted",
@ -49,7 +48,7 @@ homedecor.register("bed_regular", {
selection_box = bed_sbox, selection_box = bed_sbox,
node_box = bed_cbox, node_box = bed_cbox,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.disallow, on_rotate = sc_disallow or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing) after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
if not placer:get_player_control().sneak then if not placer:get_player_control().sneak then
@ -89,7 +88,7 @@ homedecor.register("bed_extended", {
groups = {snappy=3, ud_param2_colorable = 1}, groups = {snappy=3, ud_param2_colorable = 1},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
expand = { forward = "air" }, expand = { forward = "air" },
on_rotate = screwdriver.disallow, on_rotate = sc_disallow or nil,
after_dig_node = function(pos, oldnode, oldmetadata, digger) after_dig_node = function(pos, oldnode, oldmetadata, digger)
homedecor.unextend_bed(pos) homedecor.unextend_bed(pos)
end, end,
@ -119,7 +118,7 @@ homedecor.register("bed_kingsize", {
selection_box = kbed_sbox, selection_box = kbed_sbox,
node_box = kbed_cbox, node_box = kbed_cbox,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
on_rotate = screwdriver.disallow, on_rotate = sc_disallow or nil,
after_place_node = function(pos, placer, itemstack, pointed_thing) after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
end, end,
@ -137,9 +136,9 @@ homedecor.register("bed_kingsize", {
-- end, -- end,
}) })
for _, w in pairs({ N_("mahogany"), N_("oak") }) do for w, d in pairs({ ["mahogany"] = S("mahogany"), ["oak"] = S("oak") }) do
homedecor.register("nightstand_"..w.."_one_drawer", { homedecor.register("nightstand_"..w.."_one_drawer", {
description = S("Nightstand with One Drawer (@1)", S(w)), description = S("Nightstand with One Drawer (@1)", d),
tiles = { 'homedecor_nightstand_'..w..'_tb.png', tiles = { 'homedecor_nightstand_'..w..'_tb.png',
'homedecor_nightstand_'..w..'_tb.png^[transformFY', 'homedecor_nightstand_'..w..'_tb.png^[transformFY',
'homedecor_nightstand_'..w..'_lr.png^[transformFX', 'homedecor_nightstand_'..w..'_lr.png^[transformFX',
@ -168,7 +167,7 @@ for _, w in pairs({ N_("mahogany"), N_("oak") }) do
}) })
homedecor.register("nightstand_"..w.."_two_drawers", { homedecor.register("nightstand_"..w.."_two_drawers", {
description = S("Nightstand with Two Drawers (@1)", S(w)), description = S("Nightstand with Two Drawers (@1)", d),
tiles = { 'homedecor_nightstand_'..w..'_tb.png', tiles = { 'homedecor_nightstand_'..w..'_tb.png',
'homedecor_nightstand_'..w..'_tb.png^[transformFY', 'homedecor_nightstand_'..w..'_tb.png^[transformFY',
'homedecor_nightstand_'..w..'_lr.png^[transformFX', 'homedecor_nightstand_'..w..'_lr.png^[transformFX',
@ -214,19 +213,19 @@ local bedcolors = {
"yellow" "yellow"
} }
homedecor.old_bed_nodes = {} local old_bed_nodes = {}
for _, color in ipairs(bedcolors) do for _, color in ipairs(bedcolors) do
table.insert(homedecor.old_bed_nodes, "homedecor:bed_"..color.."_regular") table.insert(old_bed_nodes, "homedecor:bed_"..color.."_regular")
table.insert(homedecor.old_bed_nodes, "homedecor:bed_"..color.."_extended") table.insert(old_bed_nodes, "homedecor:bed_"..color.."_extended")
table.insert(homedecor.old_bed_nodes, "homedecor:bed_"..color.."_kingsize") table.insert(old_bed_nodes, "homedecor:bed_"..color.."_kingsize")
end end
minetest.register_lbm({ minetest.register_lbm({
name = ":homedecor:convert_beds", name = ":homedecor:convert_beds",
label = "Convert homedecor static bed nodes to use param2 color", label = "Convert homedecor static bed nodes to use param2 color",
run_at_every_load = false, run_at_every_load = false,
nodenames = homedecor.old_bed_nodes, nodenames = old_bed_nodes,
action = function(pos, node) action = function(pos, node)
local name = node.name local name = node.name
local color = string.sub(name, string.find(name, "_") + 1) local color = string.sub(name, string.find(name, "_") + 1)

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=Bett
Bed (king sized)=Breites Doppelbett
Nightstand with One Drawer (@1)=Nachttisch mit einer Schublade (@1)
Nightstand with Two Drawers (@1)=Nachttisch mit zwei Schubladen (@1)
One-drawer Nightstand=Nachttisch mit einer Schublade
Two-drawer Nightstand=Nachttisch mit zwei Schubladen
mahogany=Mahagoni
oak=Eiche

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=Cama
Bed (king sized)=Cama (tamaño grande)
Nightstand with One Drawer (@1)=Mesa de luz con un cajón (@1)
Nightstand with Two Drawers (@1)=Mesa de luz con dos cajones (@1)
One-drawer Nightstand=Mesa de luz con un cajón
Two-drawer Nightstand=Mesa de luz con dos cajones
mahogany=caoba
oak=roble

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=Lit
Bed (king sized)=Grand lit
Nightstand with One Drawer (@1)=Meuble de chevet avec un tiroir (@1)
Nightstand with Two Drawers (@1)=Meuble de chevet avec deux tiroirs (@1)
One-drawer Nightstand=Meuble de chevet avec un tiroir
Two-drawer Nightstand=Meuble de chevet avec deux tiroirs
mahogany=acajou
oak=chêne

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=rosso
Bed (king sized)=
Nightstand with One Drawer (@1)=Comodino in quercia con un cassetto
Nightstand with Two Drawers (@1)=Comodino in quercia con due cassetti
One-drawer Nightstand=Comodino a singolo cassetto
Two-drawer Nightstand=Comodino a doppio cassetto
mahogany=
oak=

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=Katil
Bed (king sized)=Katil Raja
Nightstand with One Drawer (@1)=Kabinet Katil dengan Satu Laci (@1)
Nightstand with Two Drawers (@1)=Kabinet Katil dengan Dua Laci (@1)
One-drawer Nightstand=Kabinet Katil Satu Laci
Two-drawer Nightstand=Kabinet Katil Dua Laci
mahogany=Mahogani
oak=Oak

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=Cama
Bed (king sized)=Cama (tamanho king)
Nightstand with One Drawer (@1)=Mesa de Cabeceira com Gaveta (@1)
Nightstand with Two Drawers (@1)=Mesa de Cabeceira com Duas Gavetas (@1)
One-drawer Nightstand=Mesinha de Uma Gaveta
Two-drawer Nightstand=Mesinha de Duas Gavetas
mahogany=mogno
oak=carvalho

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=Cama
Bed (king sized)=Cama (tamanho king)
Nightstand with One Drawer (@1)=Mesa de Cabeceira com Gaveta (@1)
Nightstand with Two Drawers (@1)=Mesa de Cabeceira com Duas Gavetas (@1)
One-drawer Nightstand=Mesinha de Uma Gaveta
Two-drawer Nightstand=Mesinha de Duas Gavetas
mahogany=mogno
oak=carvalho

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=Кровать
Bed (king sized)=Кровать (большая)
Nightstand with One Drawer (@1)=Тумба с одним ящиком (@1)
Nightstand with Two Drawers (@1)=Тумба с двумя ящиками (@1)
One-drawer Nightstand=Тумба с одним ящиком
Two-drawer Nightstand=Тумба с двумя ящиками
mahogany=красное дерево
oak=дуб

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=床
Bed (king sized)=双人床
Nightstand with One Drawer (@1)=带一个抽屉的床头柜(@1)
Nightstand with Two Drawers (@1)=带两个抽屉的床头柜(@1)
One-drawer Nightstand=单抽屉床头柜
Two-drawer Nightstand=两抽屉床头柜
mahogany=桃花心木
oak=橡木

View File

@ -0,0 +1,13 @@
# textdomain: homedecor_bedroom
### init.lua ###
Bed=
Bed (king sized)=
Nightstand with One Drawer (@1)=
Nightstand with Two Drawers (@1)=
One-drawer Nightstand=
Two-drawer Nightstand=
mahogany=
oak=

View File

@ -0,0 +1,4 @@
name = homedecor_bedroom
description = Homedecor mod: bedroom
depends = homedecor_common, default, basic_materials, unifieddyes, creative
optional_depends = screwdriver