Fix translation of wrought iron blocks

Note: nodes to convert from steel blocks to wroughtiron blocks now
require to be added manually since doing this automatically breaks
translations.
This commit is contained in:
Louis 2020-02-18 14:32:36 +01:00
parent 8c7e636ceb
commit 026c1ae6fe
9 changed files with 78 additions and 41 deletions

View File

@ -47,6 +47,12 @@ Stainless Steel Block=Edelstahlblock
Brass Block=Messingblock Brass Block=Messingblock
Wrought Iron=Schmiedeeisen Wrought Iron=Schmiedeeisen
#### Steel to wrought iron
Outer Wrought Iron Block Stair=
Inner Wrought Iron Block Stair=
Wrought Iron Block Stair=
Wrought Iron Block Slab=
## rubber.lua ## rubber.lua
Rubber Tree Sapling=Gummibaumsetzling Rubber Tree Sapling=Gummibaumsetzling
Rubber Tree=Gummibaum Rubber Tree=Gummibaum

View File

@ -45,6 +45,12 @@ Stainless Steel Block=Bloque de Acero Inoxidable
Brass Block=Bloque de Latón Brass Block=Bloque de Latón
Wrought Iron=Hierro Forjado Wrought Iron=Hierro Forjado
#### Steel to wrought iron
Outer Wrought Iron Block Stair=
Inner Wrought Iron Block Stair=
Wrought Iron Block Stair=
Wrought Iron Block Slab=
###rubber.lua ###rubber.lua
Rubber Tree Sapling=Retoño de Árbol de Goma Rubber Tree Sapling=Retoño de Árbol de Goma
Rubber Tree=Árbol de Goma Rubber Tree=Árbol de Goma

View File

@ -52,6 +52,12 @@ Stainless Steel Block=Bloc d'acier inoxydable
Brass Block=Bloc de laiton Brass Block=Bloc de laiton
Wrought Iron=Fer forgé Wrought Iron=Fer forgé
#### Steel to wrought iron
Outer Wrought Iron Block Stair=Escalier extérieur en bloc de fer forgé
Inner Wrought Iron Block Stair=Escalier intérieur en bloc de fer forgé
Wrought Iron Block Stair=Escalier en bloc de fer forgé
Wrought Iron Block Slab=Dalle en bloc de fer forgé
###rubber.lua ###rubber.lua
Rubber Tree Sapling=Pousse d'arbre à caoutchouc Rubber Tree Sapling=Pousse d'arbre à caoutchouc
Rubber Tree=Arbre à caoutchouc Rubber Tree=Arbre à caoutchouc

View File

@ -47,6 +47,12 @@ Stainless Steel Block=Blok stali nierdzewnej
Brass Block=Blok mosiądzu Brass Block=Blok mosiądzu
Wrought Iron=Kute żelazo Wrought Iron=Kute żelazo
#### Steel to wrought iron
Outer Wrought Iron Block Stair=
Inner Wrought Iron Block Stair=
Wrought Iron Block Stair=
Wrought Iron Block Slab=
###rubber.lua ###rubber.lua
Rubber Tree Sapling=Sadzonka kauczukowca Rubber Tree Sapling=Sadzonka kauczukowca
Rubber Tree=Kauczukowiec Rubber Tree=Kauczukowiec

View File

@ -47,6 +47,12 @@ Stainless Steel Block=Bloco de Aço Inoxidável
Brass Block=Bloco de Latão Brass Block=Bloco de Latão
Wrought Iron=Ferro Forjado Wrought Iron=Ferro Forjado
#### Steel to wrought iron
Outer Wrought Iron Block Stair=
Inner Wrought Iron Block Stair=
Wrought Iron Block Stair=
Wrought Iron Block Slab=
###rubber.lua ###rubber.lua
Rubber Tree Sapling=Muda de Árvore de Borracha Rubber Tree Sapling=Muda de Árvore de Borracha
Rubber Tree=Árvore de Borracha Rubber Tree=Árvore de Borracha

View File

@ -47,6 +47,12 @@ Stainless Steel Block=Paslanmaz çelik blok
Brass Block=Pirinç blok Brass Block=Pirinç blok
Wrought Iron=İşlenmiş demir Wrought Iron=İşlenmiş demir
#### Steel to wrought iron
Outer Wrought Iron Block Stair=
Inner Wrought Iron Block Stair=
Wrought Iron Block Stair=
Wrought Iron Block Slab=
###rubber.lua ###rubber.lua
Rubber Tree Sapling=Kauçuk ağacı fidanı Rubber Tree Sapling=Kauçuk ağacı fidanı
Rubber Tree=Kauçuk ağacı Rubber Tree=Kauçuk ağacı

View File

@ -53,6 +53,12 @@ Stainless Steel Block=
Brass Block= Brass Block=
Wrought Iron= Wrought Iron=
#### Steel to wrought iron
Outer Wrought Iron Block Stair=
Inner Wrought Iron Block Stair=
Wrought Iron Block Stair=
Wrought Iron Block Slab=
###rubber.lua ###rubber.lua
Rubber Tree Sapling= Rubber Tree Sapling=
Rubber Tree= Rubber Tree=

View File

@ -1,3 +1,3 @@
name = technic_worldgen name = technic_worldgen
depends = default, basic_materials depends = default, basic_materials
optional_depends = mg, doors, farming, glooptest, mesecons_doors, vessels, toolranks optional_depends = mg, doors, farming, glooptest, mesecons_doors, vessels, toolranks, stairs

View File

@ -145,27 +145,21 @@ minetest.register_alias("technic:diamond_block", "default:diamondblock")
minetest.register_alias("technic:diamond", "default:diamond") minetest.register_alias("technic:diamond", "default:diamond")
minetest.register_alias("technic:mineral_diamond", "default:stone_with_diamond") minetest.register_alias("technic:mineral_diamond", "default:stone_with_diamond")
local function for_each_registered_node(action) local steel_to_wrought_iron = {
local really_register_node = minetest.register_node {name="stairs:stair_outer_steelblock", description=S("Outer Wrought Iron Block Stair")},
minetest.register_node = function(name, def) {name="stairs:stair_inner_steelblock", description=S("Inner Wrought Iron Block Stair")},
really_register_node(name, def) {name="stairs:stair_steelblock", description=S("Wrought Iron Block Stair")},
action(name:gsub("^:", ""), def) {name="stairs:slab_steelblock", description=S("Wrought Iron Block Slab")}
end }
for name, def in pairs(minetest.registered_nodes) do
action(name, def)
end
end
for_each_registered_node(function(node_name, node_def) for _, v in ipairs(steel_to_wrought_iron) do
if node_name ~= "default:steelblock" and local node_name = v.name
node_name:find("steelblock", 1, true) and local node_def = minetest.registered_items[node_name]
node_def.description:find("Steel", 1, true) then if node_def then
minetest.override_item(node_name, { minetest.override_item(node_name, {
-- TODO: fix this line description = v.description
-- This is not the good way of doing this because this breaks translations
description = node_def.description:gsub("Steel", "Wrought Iron"),
}) })
end
local tiles = node_def.tiles or node_def.tile_images local tiles = node_def.tiles or node_def.tile_images
if tiles then if tiles then
local new_tiles = {} local new_tiles = {}
@ -186,5 +180,6 @@ for_each_registered_node(function(node_name, node_def)
}) })
end end
end end
end) end
end