Fix and improve translation strings (#2471)

This commit is contained in:
sfan5 2019-09-12 19:03:10 +02:00 committed by GitHub
parent ea992bdace
commit e4adb01fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 387 additions and 166 deletions

View File

@ -726,27 +726,29 @@ delivered with Minetest Game, to keep them compatible with other mods.
* `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
`stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
`stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)`
* Registers an inner corner stair
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_inner_subname"
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
* `groups`: See [Known damage and digging time defining groups]
* `images`: See [Tile definition]
* `description`: Used for the description field in the stair's definition
* `description`: Used for the description field in the stair's definition with "Inner" prepended
* `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
* `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional)
`stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
`stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)`
* Registers an outer corner stair
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname"
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
* `groups`: See [Known damage and digging time defining groups]
* `images`: See [Tile definition]
* `description`: Used for the description field in the stair's definition
* `description`: Used for the description field in the stair's definition with "Outer" prepended
* `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
* `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional)
`stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)`

View File

@ -59,7 +59,7 @@ minetest.after(4.7, cyclic_update)
-- Binoculars item
minetest.register_craftitem("binoculars:binoculars", {
description = S("Binoculars\nUse with 'Zoom' key"),
description = S("Binoculars") .. "\n" .. S("Use with 'Zoom' key"),
inventory_image = "binoculars_binoculars.png",
stack_max = 1,

View File

@ -154,13 +154,13 @@ function boat.on_step(self, dtime)
if ctrl.up and ctrl.down then
if not self.auto then
self.auto = true
minetest.chat_send_player(self.driver, S("[boats] Cruise on"))
minetest.chat_send_player(self.driver, S("Boat cruise mode on"))
end
elseif ctrl.down then
self.v = self.v - dtime * 1.8
if self.auto then
self.auto = false
minetest.chat_send_player(self.driver, S("[boats] Cruise off"))
minetest.chat_send_player(self.driver, S("Boat cruise mode off"))
end
elseif ctrl.up or self.auto then
self.v = self.v + dtime * 1.8

View File

@ -269,7 +269,7 @@ minetest.register_on_dieplayer(function(player)
meta:set_string("owner", player_name)
if share_bones_time ~= 0 then
meta:set_string("infotext", S("@1's fresh bones.", player_name))
meta:set_string("infotext", S("@1's fresh bones", player_name))
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
meta:set_int("time", 0)
@ -279,6 +279,6 @@ minetest.register_on_dieplayer(function(player)
minetest.get_node_timer(pos):start(10)
else
meta:set_string("infotext", S("@1's bones.", player_name))
meta:set_string("infotext", S("@1's bones", player_name))
end
end)

View File

@ -1,13 +1,13 @@
-- butrerflies/init.lua
-- butterflies/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("butterflies")
-- register butterflies
local butter_list = {
{"white", S("White")},
{"red", S("Red")},
{"violet", S("Violet")}
{"white", S("White Butterfly")},
{"red", S("Red Butterfly")},
{"violet", S("Violet Butterfly")}
}
for i in ipairs (butter_list) do
@ -15,7 +15,7 @@ for i in ipairs (butter_list) do
local desc = butter_list[i][2]
minetest.register_node("butterflies:butterfly_"..name, {
description = S("@1 Butterfly", desc),
description = desc,
drawtype = "plantlike",
tiles = {{
name = "butterflies_butterfly_"..name.."_animated.png",
@ -61,10 +61,9 @@ for i in ipairs (butter_list) do
})
minetest.register_node("butterflies:hidden_butterfly_"..name, {
description = S("Hidden @1 Butterfly", desc),
drawtype = "airlike",
inventory_image = "insects_butterfly_"..name..".png",
wield_image = "insects_butterfly_"..name..".png",
inventory_image = "butterflies_butterfly_"..name..".png",
wield_image = "butterflies_butterfly_"..name..".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,

View File

@ -388,7 +388,7 @@ end
minetest.register_entity("carts:cart", cart_entity)
minetest.register_craftitem("carts:cart", {
description = S("Cart (Sneak+Click to pick up)"),
description = S("Cart") .. "\n" .. S("(Sneak+Click to pick up)"),
inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_side.png", "carts_cart_side.png"),
wield_image = "carts_cart_side.png",
on_place = function(itemstack, placer, pointed_thing)

View File

@ -165,7 +165,7 @@ minetest.register_craftitem("default:book", {
})
minetest.register_craftitem("default:book_written", {
description = S("Book With Text"),
description = S("Book with Text"),
inventory_image = "default_book_written.png",
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
stack_max = 1,

View File

@ -226,20 +226,20 @@ local function furnace_node_timer(pos, elapsed)
end
local fuel_state = S("Empty")
local active = "inactive"
local active = false
local result = false
if fuel_totaltime ~= 0 then
active = "active"
active = true
local fuel_percent = math.floor(fuel_time / fuel_totaltime * 100)
fuel_state = fuel_percent .. "%"
fuel_state = S("@1%", fuel_percent)
formspec = default.get_furnace_active_formspec(fuel_percent, item_percent)
swap_node(pos, "default:furnace_active")
-- make sure timer restarts automatically
result = true
else
if not fuellist[1]:is_empty() then
fuel_state = "0%"
fuel_state = S("@1%", 0)
end
formspec = default.get_furnace_inactive_formspec()
swap_node(pos, "default:furnace")
@ -247,9 +247,14 @@ local function furnace_node_timer(pos, elapsed)
minetest.get_node_timer(pos):stop()
end
-- local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
-- "; Fuel: " .. fuel_state .. ")"
local infotext = S("Furnace @1 \n(Item: @2; Fuel: @3)", active, item_state, fuel_state)
local infotext
if active then
infotext = S("Furnace active")
else
infotext = S("Furnace inactive")
end
infotext = infotext .. "\n" .. S("(Item: @1; Fuel: @2)", item_state, fuel_state)
--
-- Set meta values

View File

@ -513,14 +513,14 @@ minetest.register_node("default:dirt_with_coniferous_litter", {
})
minetest.register_node("default:dry_dirt", {
description = "Dry Dirt",
description = S("Dry Dirt"),
tiles = {"default_dry_dirt.png"},
groups = {crumbly = 3, soil = 1},
sounds = default.node_sound_dirt_defaults(),
})
minetest.register_node("default:dry_dirt_with_dry_grass", {
description = "Dry Dirt with Dry Grass",
description = S("Dry Dirt with Dry Grass"),
tiles = {"default_dry_grass.png", "default_dry_dirt.png",
{name = "default_dry_dirt.png^default_dry_grass_side.png",
tileable_vertical = false}},
@ -2556,7 +2556,7 @@ minetest.register_node("default:bookshelf", {
local function register_sign(material, desc, def)
minetest.register_node("default:sign_wall_" .. material, {
description = S("@1 Sign", desc),
description = desc,
drawtype = "nodebox",
tiles = {"default_sign_wall_" .. material .. ".png"},
inventory_image = "default_sign_" .. material .. ".png",
@ -2605,12 +2605,12 @@ local function register_sign(material, desc, def)
})
end
register_sign("wood", S("Wooden"), {
register_sign("wood", S("Wooden Sign"), {
sounds = default.node_sound_wood_defaults(),
groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3}
})
register_sign("steel", S("Steel"), {
register_sign("steel", S("Steel Sign"), {
sounds = default.node_sound_metal_defaults(),
groups = {cracky = 2, attached_node = 1}
})

View File

@ -8,21 +8,21 @@ local S = minetest.get_translator("dye")
-- Make dye names and descriptions available globally
dye.dyes = {
{"white", S("White")},
{"grey", S("Grey")},
{"dark_grey", S("Dark Grey")},
{"black", S("Black")},
{"violet", S("Violet")},
{"blue", S("Blue")},
{"cyan", S("Cyan")},
{"dark_green", S("Dark Green")},
{"green", S("Green")},
{"yellow", S("Yellow")},
{"brown", S("Brown")},
{"orange", S("Orange")},
{"red", S("Red")},
{"magenta", S("Magenta")},
{"pink", S("Pink")},
{"white", "White"},
{"grey", "Grey"},
{"dark_grey", "Dark Grey"},
{"black", "Black"},
{"violet", "Violet"},
{"blue", "Blue"},
{"cyan", "Cyan"},
{"dark_green", "Dark Green"},
{"green", "Green"},
{"yellow", "Yellow"},
{"brown", "Brown"},
{"orange", "Orange"},
{"red", "Red"},
{"magenta", "Magenta"},
{"pink", "Pink"},
}
-- Define items
@ -35,7 +35,7 @@ for _, row in ipairs(dye.dyes) do
minetest.register_craftitem("dye:" .. name, {
inventory_image = "dye_" .. name .. ".png",
description = S("@1 Dye", description),
description = S(description .. " Dye"),
groups = groups
})
@ -103,3 +103,25 @@ for _, mix in pairs(dye_recipes) do
recipe = {"dye:" .. mix[1], "dye:" .. mix[2]},
})
end
-- Dummy calls to S() to allow translation scripts to detect the strings.
-- To update this run:
-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Dye")) end
--[[
S("White Dye")
S("Grey Dye")
S("Dark Grey Dye")
S("Black Dye")
S("Violet Dye")
S("Blue Dye")
S("Cyan Dye")
S("Dark Green Dye")
S("Green Dye")
S("Yellow Dye")
S("Brown Dye")
S("Orange Dye")
S("Red Dye")
S("Magenta Dye")
S("Pink Dye")
--]]

View File

@ -86,7 +86,7 @@ minetest.register_node("farming:soil_wet", {
})
minetest.register_node("farming:dry_soil", {
description = "Dry Soil",
description = S("Dry Soil"),
tiles = {"default_dry_dirt.png^farming_soil.png", "default_dry_dirt.png"},
drop = "default:dry_dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1},
@ -99,7 +99,7 @@ minetest.register_node("farming:dry_soil", {
})
minetest.register_node("farming:dry_soil_wet", {
description = "Wet Dry Soil",
description = S("Wet Dry Soil"),
tiles = {"default_dry_dirt.png^farming_soil_wet.png", "default_dry_dirt.png^farming_soil_wet_side.png"},
drop = "default:dry_dirt",
groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1},

View File

@ -55,7 +55,7 @@ minetest.after(5.3, cyclic_update)
-- Mapping kit item
minetest.register_craftitem("map:mapping_kit", {
description = S("Mapping Kit\nUse with 'Minimap' key"),
description = S("Mapping Kit") .. "\n" .. S("Use with 'Minimap' key"),
inventory_image = "map_mapping_kit.png",
stack_max = 1,
groups = {flammable = 3},

View File

@ -150,7 +150,7 @@ end
-- Screwdriver
minetest.register_tool("screwdriver:screwdriver", {
description = S("Screwdriver (left-click rotates face, right-click rotates axis)"),
description = S("Screwdriver") .. "\n" .. S("(left-click rotates face, right-click rotates axis)"),
inventory_image = "screwdriver.png",
groups = {tool = 1},
on_use = function(itemstack, user, pointed_thing)

View File

@ -296,7 +296,7 @@ end
-- Node will be called stairs:stair_inner_<subname>
function stairs.register_stair_inner(subname, recipeitem, groups, images,
description, sounds, worldaligntex)
description, sounds, worldaligntex, full_description)
-- Set backface culling and world-aligned textures
local stair_images = {}
for i, image in ipairs(images) do
@ -320,9 +320,14 @@ function stairs.register_stair_inner(subname, recipeitem, groups, images,
end
local new_groups = table.copy(groups)
new_groups.stair = 1
if full_description then
description = full_description
else
description = "Inner " .. description
end
warn_if_exists("stairs:stair_inner_" .. subname)
minetest.register_node(":stairs:stair_inner_" .. subname, {
description = S("Inner @1", description),
description = description,
drawtype = "nodebox",
tiles = stair_images,
paramtype = "light",
@ -378,7 +383,7 @@ end
-- Node will be called stairs:stair_outer_<subname>
function stairs.register_stair_outer(subname, recipeitem, groups, images,
description, sounds, worldaligntex)
description, sounds, worldaligntex, full_description)
-- Set backface culling and world-aligned textures
local stair_images = {}
for i, image in ipairs(images) do
@ -402,9 +407,14 @@ function stairs.register_stair_outer(subname, recipeitem, groups, images,
end
local new_groups = table.copy(groups)
new_groups.stair = 1
if full_description then
description = full_description
else
description = "Outer " .. description
end
warn_if_exists("stairs:stair_outer_" .. subname)
minetest.register_node(":stairs:stair_outer_" .. subname, {
description = S("Outer @1", description),
description = description,
drawtype = "nodebox",
tiles = stair_images,
paramtype = "light",
@ -469,379 +479,392 @@ function stairs.register_stair_and_slab(subname, recipeitem, groups, images,
sounds, worldaligntex)
end
-- Local function so we can apply translations
local function my_register_stair_and_slab(subname, recipeitem, groups, images,
desc_stair, desc_slab, sounds, worldaligntex)
stairs.register_stair(subname, recipeitem, groups, images, S(desc_stair),
sounds, worldaligntex)
stairs.register_stair_inner(subname, recipeitem, groups, images, "",
sounds, worldaligntex, S("Inner " .. desc_stair))
stairs.register_stair_outer(subname, recipeitem, groups, images, "",
sounds, worldaligntex, S("Outer " .. desc_stair))
stairs.register_slab(subname, recipeitem, groups, images, S(desc_slab),
sounds, worldaligntex)
end
-- Register default stairs and slabs
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"wood",
"default:wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_wood.png"},
S("Wooden Stair"),
S("Wooden Slab"),
"Wooden Stair",
"Wooden Slab",
default.node_sound_wood_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"junglewood",
"default:junglewood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_junglewood.png"},
S("Jungle Wood Stair"),
S("Jungle Wood Slab"),
"Jungle Wood Stair",
"Jungle Wood Slab",
default.node_sound_wood_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"pine_wood",
"default:pine_wood",
{choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
{"default_pine_wood.png"},
S("Pine Wood Stair"),
S("Pine Wood Slab"),
"Pine Wood Stair",
"Pine Wood Slab",
default.node_sound_wood_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"acacia_wood",
"default:acacia_wood",
{choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
{"default_acacia_wood.png"},
S("Acacia Wood Stair"),
S("Acacia Wood Slab"),
"Acacia Wood Stair",
"Acacia Wood Slab",
default.node_sound_wood_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"aspen_wood",
"default:aspen_wood",
{choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
{"default_aspen_wood.png"},
S("Aspen Wood Stair"),
S("Aspen Wood Slab"),
"Aspen Wood Stair",
"Aspen Wood Slab",
default.node_sound_wood_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"stone",
"default:stone",
{cracky = 3},
{"default_stone.png"},
S("Stone Stair"),
S("Stone Slab"),
"Stone Stair",
"Stone Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"cobble",
"default:cobble",
{cracky = 3},
{"default_cobble.png"},
S("Cobblestone Stair"),
S("Cobblestone Slab"),
"Cobblestone Stair",
"Cobblestone Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"mossycobble",
"default:mossycobble",
{cracky = 3},
{"default_mossycobble.png"},
S("Mossy Cobblestone Stair"),
S("Mossy Cobblestone Slab"),
"Mossy Cobblestone Stair",
"Mossy Cobblestone Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"stonebrick",
"default:stonebrick",
{cracky = 2},
{"default_stone_brick.png"},
S("Stone Brick Stair"),
S("Stone Brick Slab"),
"Stone Brick Stair",
"Stone Brick Slab",
default.node_sound_stone_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"stone_block",
"default:stone_block",
{cracky = 2},
{"default_stone_block.png"},
S("Stone Block Stair"),
S("Stone Block Slab"),
"Stone Block Stair",
"Stone Block Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"desert_stone",
"default:desert_stone",
{cracky = 3},
{"default_desert_stone.png"},
S("Desert Stone Stair"),
S("Desert Stone Slab"),
"Desert Stone Stair",
"Desert Stone Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"desert_cobble",
"default:desert_cobble",
{cracky = 3},
{"default_desert_cobble.png"},
S("Desert Cobblestone Stair"),
S("Desert Cobblestone Slab"),
"Desert Cobblestone Stair",
"Desert Cobblestone Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"desert_stonebrick",
"default:desert_stonebrick",
{cracky = 2},
{"default_desert_stone_brick.png"},
S("Desert Stone Brick Stair"),
S("Desert Stone Brick Slab"),
"Desert Stone Brick Stair",
"Desert Stone Brick Slab",
default.node_sound_stone_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"desert_stone_block",
"default:desert_stone_block",
{cracky = 2},
{"default_desert_stone_block.png"},
S("Desert Stone Block Stair"),
S("Desert Stone Block Slab"),
"Desert Stone Block Stair",
"Desert Stone Block Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"sandstone",
"default:sandstone",
{crumbly = 1, cracky = 3},
{"default_sandstone.png"},
S("Sandstone Stair"),
S("Sandstone Slab"),
"Sandstone Stair",
"Sandstone Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"sandstonebrick",
"default:sandstonebrick",
{cracky = 2},
{"default_sandstone_brick.png"},
S("Sandstone Brick Stair"),
S("Sandstone Brick Slab"),
"Sandstone Brick Stair",
"Sandstone Brick Slab",
default.node_sound_stone_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"sandstone_block",
"default:sandstone_block",
{cracky = 2},
{"default_sandstone_block.png"},
S("Sandstone Block Stair"),
S("Sandstone Block Slab"),
"Sandstone Block Stair",
"Sandstone Block Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"desert_sandstone",
"default:desert_sandstone",
{crumbly = 1, cracky = 3},
{"default_desert_sandstone.png"},
S("Desert Sandstone Stair"),
S("Desert Sandstone Slab"),
"Desert Sandstone Stair",
"Desert Sandstone Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"desert_sandstone_brick",
"default:desert_sandstone_brick",
{cracky = 2},
{"default_desert_sandstone_brick.png"},
S("Desert Sandstone Brick Stair"),
S("Desert Sandstone Brick Slab"),
"Desert Sandstone Brick Stair",
"Desert Sandstone Brick Slab",
default.node_sound_stone_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"desert_sandstone_block",
"default:desert_sandstone_block",
{cracky = 2},
{"default_desert_sandstone_block.png"},
S("Desert Sandstone Block Stair"),
S("Desert Sandstone Block Slab"),
"Desert Sandstone Block Stair",
"Desert Sandstone Block Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"silver_sandstone",
"default:silver_sandstone",
{crumbly = 1, cracky = 3},
{"default_silver_sandstone.png"},
S("Silver Sandstone Stair"),
S("Silver Sandstone Slab"),
"Silver Sandstone Stair",
"Silver Sandstone Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"silver_sandstone_brick",
"default:silver_sandstone_brick",
{cracky = 2},
{"default_silver_sandstone_brick.png"},
S("Silver Sandstone Brick Stair"),
S("Silver Sandstone Brick Slab"),
"Silver Sandstone Brick Stair",
"Silver Sandstone Brick Slab",
default.node_sound_stone_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"silver_sandstone_block",
"default:silver_sandstone_block",
{cracky = 2},
{"default_silver_sandstone_block.png"},
S("Silver Sandstone Block Stair"),
S("Silver Sandstone Block Slab"),
"Silver Sandstone Block Stair",
"Silver Sandstone Block Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"obsidian",
"default:obsidian",
{cracky = 1, level = 2},
{"default_obsidian.png"},
S("Obsidian Stair"),
S("Obsidian Slab"),
"Obsidian Stair",
"Obsidian Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"obsidianbrick",
"default:obsidianbrick",
{cracky = 1, level = 2},
{"default_obsidian_brick.png"},
S("Obsidian Brick Stair"),
S("Obsidian Brick Slab"),
"Obsidian Brick Stair",
"Obsidian Brick Slab",
default.node_sound_stone_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"obsidian_block",
"default:obsidian_block",
{cracky = 1, level = 2},
{"default_obsidian_block.png"},
S("Obsidian Block Stair"),
S("Obsidian Block Slab"),
"Obsidian Block Stair",
"Obsidian Block Slab",
default.node_sound_stone_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"brick",
"default:brick",
{cracky = 3},
{"default_brick.png"},
S("Brick Stair"),
S("Brick Slab"),
"Brick Stair",
"Brick Slab",
default.node_sound_stone_defaults(),
false
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"steelblock",
"default:steelblock",
{cracky = 1, level = 2},
{"default_steel_block.png"},
S("Steel Block Stair"),
S("Steel Block Slab"),
"Steel Block Stair",
"Steel Block Slab",
default.node_sound_metal_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"tinblock",
"default:tinblock",
{cracky = 1, level = 2},
{"default_tin_block.png"},
S("Tin Block Stair"),
S("Tin Block Slab"),
"Tin Block Stair",
"Tin Block Slab",
default.node_sound_metal_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"copperblock",
"default:copperblock",
{cracky = 1, level = 2},
{"default_copper_block.png"},
S("Copper Block Stair"),
S("Copper Block Slab"),
"Copper Block Stair",
"Copper Block Slab",
default.node_sound_metal_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"bronzeblock",
"default:bronzeblock",
{cracky = 1, level = 2},
{"default_bronze_block.png"},
S("Bronze Block Stair"),
S("Bronze Block Slab"),
"Bronze Block Stair",
"Bronze Block Slab",
default.node_sound_metal_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"goldblock",
"default:goldblock",
{cracky = 1},
{"default_gold_block.png"},
S("Gold Block Stair"),
S("Gold Block Slab"),
"Gold Block Stair",
"Gold Block Slab",
default.node_sound_metal_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"ice",
"default:ice",
{cracky = 3, cools_lava = 1, slippery = 3},
{"default_ice.png"},
S("Ice Stair"),
S("Ice Slab"),
"Ice Stair",
"Ice Slab",
default.node_sound_glass_defaults(),
true
)
stairs.register_stair_and_slab(
my_register_stair_and_slab(
"snowblock",
"default:snowblock",
{crumbly = 3, cools_lava = 1, snowy = 1},
{"default_snow.png"},
S("Snow Block Stair"),
S("Snow Block Slab"),
"Snow Block Stair",
"Snow Block Slab",
default.node_sound_snow_defaults(),
true
)
@ -877,9 +900,10 @@ stairs.register_stair_inner(
{"stairs_glass_stairside.png^[transformR270", "default_glass.png",
"stairs_glass_stairside.png^[transformFX", "default_glass.png",
"default_glass.png", "stairs_glass_stairside.png"},
S("Glass Stair"),
"",
default.node_sound_glass_defaults(),
false
false,
S("Inner Glass Stair")
)
stairs.register_stair_outer(
@ -889,9 +913,10 @@ stairs.register_stair_outer(
{"stairs_glass_stairside.png^[transformR90", "default_glass.png",
"stairs_glass_outer_stairside.png", "stairs_glass_stairside.png",
"stairs_glass_stairside.png^[transformR90","stairs_glass_outer_stairside.png"},
S("Glass Stair"),
"",
default.node_sound_glass_defaults(),
false
false,
S("Outer Glass Stair")
)
stairs.register_stair(
@ -923,9 +948,10 @@ stairs.register_stair_inner(
{"stairs_obsidian_glass_stairside.png^[transformR270", "default_obsidian_glass.png",
"stairs_obsidian_glass_stairside.png^[transformFX", "default_obsidian_glass.png",
"default_obsidian_glass.png", "stairs_obsidian_glass_stairside.png"},
S("Obsidian Glass Stair"),
"",
default.node_sound_glass_defaults(),
false
false,
S("Inner Obsidian Glass Stair")
)
stairs.register_stair_outer(
@ -935,7 +961,152 @@ stairs.register_stair_outer(
{"stairs_obsidian_glass_stairside.png^[transformR90", "default_obsidian_glass.png",
"stairs_obsidian_glass_outer_stairside.png", "stairs_obsidian_glass_stairside.png",
"stairs_obsidian_glass_stairside.png^[transformR90","stairs_obsidian_glass_outer_stairside.png"},
S("Obsidian Glass Stair"),
"",
default.node_sound_glass_defaults(),
false
false,
S("Outer Obsidian Glass Stair")
)
-- Dummy calls to S() to allow translation scripts to detect the strings.
-- To update this add this code to my_register_stair_and_slab:
-- for _,x in ipairs({"","Inner ","Outer "}) do print(("S(%q)"):format(x..desc_stair)) end
-- print(("S(%q)"):format(desc_slab))
--[[
S("Wooden Stair")
S("Inner Wooden Stair")
S("Outer Wooden Stair")
S("Wooden Slab")
S("Jungle Wood Stair")
S("Inner Jungle Wood Stair")
S("Outer Jungle Wood Stair")
S("Jungle Wood Slab")
S("Pine Wood Stair")
S("Inner Pine Wood Stair")
S("Outer Pine Wood Stair")
S("Pine Wood Slab")
S("Acacia Wood Stair")
S("Inner Acacia Wood Stair")
S("Outer Acacia Wood Stair")
S("Acacia Wood Slab")
S("Aspen Wood Stair")
S("Inner Aspen Wood Stair")
S("Outer Aspen Wood Stair")
S("Aspen Wood Slab")
S("Stone Stair")
S("Inner Stone Stair")
S("Outer Stone Stair")
S("Stone Slab")
S("Cobblestone Stair")
S("Inner Cobblestone Stair")
S("Outer Cobblestone Stair")
S("Cobblestone Slab")
S("Mossy Cobblestone Stair")
S("Inner Mossy Cobblestone Stair")
S("Outer Mossy Cobblestone Stair")
S("Mossy Cobblestone Slab")
S("Stone Brick Stair")
S("Inner Stone Brick Stair")
S("Outer Stone Brick Stair")
S("Stone Brick Slab")
S("Stone Block Stair")
S("Inner Stone Block Stair")
S("Outer Stone Block Stair")
S("Stone Block Slab")
S("Desert Stone Stair")
S("Inner Desert Stone Stair")
S("Outer Desert Stone Stair")
S("Desert Stone Slab")
S("Desert Cobblestone Stair")
S("Inner Desert Cobblestone Stair")
S("Outer Desert Cobblestone Stair")
S("Desert Cobblestone Slab")
S("Desert Stone Brick Stair")
S("Inner Desert Stone Brick Stair")
S("Outer Desert Stone Brick Stair")
S("Desert Stone Brick Slab")
S("Desert Stone Block Stair")
S("Inner Desert Stone Block Stair")
S("Outer Desert Stone Block Stair")
S("Desert Stone Block Slab")
S("Sandstone Stair")
S("Inner Sandstone Stair")
S("Outer Sandstone Stair")
S("Sandstone Slab")
S("Sandstone Brick Stair")
S("Inner Sandstone Brick Stair")
S("Outer Sandstone Brick Stair")
S("Sandstone Brick Slab")
S("Sandstone Block Stair")
S("Inner Sandstone Block Stair")
S("Outer Sandstone Block Stair")
S("Sandstone Block Slab")
S("Desert Sandstone Stair")
S("Inner Desert Sandstone Stair")
S("Outer Desert Sandstone Stair")
S("Desert Sandstone Slab")
S("Desert Sandstone Brick Stair")
S("Inner Desert Sandstone Brick Stair")
S("Outer Desert Sandstone Brick Stair")
S("Desert Sandstone Brick Slab")
S("Desert Sandstone Block Stair")
S("Inner Desert Sandstone Block Stair")
S("Outer Desert Sandstone Block Stair")
S("Desert Sandstone Block Slab")
S("Silver Sandstone Stair")
S("Inner Silver Sandstone Stair")
S("Outer Silver Sandstone Stair")
S("Silver Sandstone Slab")
S("Silver Sandstone Brick Stair")
S("Inner Silver Sandstone Brick Stair")
S("Outer Silver Sandstone Brick Stair")
S("Silver Sandstone Brick Slab")
S("Silver Sandstone Block Stair")
S("Inner Silver Sandstone Block Stair")
S("Outer Silver Sandstone Block Stair")
S("Silver Sandstone Block Slab")
S("Obsidian Stair")
S("Inner Obsidian Stair")
S("Outer Obsidian Stair")
S("Obsidian Slab")
S("Obsidian Brick Stair")
S("Inner Obsidian Brick Stair")
S("Outer Obsidian Brick Stair")
S("Obsidian Brick Slab")
S("Obsidian Block Stair")
S("Inner Obsidian Block Stair")
S("Outer Obsidian Block Stair")
S("Obsidian Block Slab")
S("Brick Stair")
S("Inner Brick Stair")
S("Outer Brick Stair")
S("Brick Slab")
S("Steel Block Stair")
S("Inner Steel Block Stair")
S("Outer Steel Block Stair")
S("Steel Block Slab")
S("Tin Block Stair")
S("Inner Tin Block Stair")
S("Outer Tin Block Stair")
S("Tin Block Slab")
S("Copper Block Stair")
S("Inner Copper Block Stair")
S("Outer Copper Block Stair")
S("Copper Block Slab")
S("Bronze Block Stair")
S("Inner Bronze Block Stair")
S("Outer Bronze Block Stair")
S("Bronze Block Slab")
S("Gold Block Stair")
S("Inner Gold Block Stair")
S("Outer Gold Block Stair")
S("Gold Block Slab")
S("Ice Stair")
S("Inner Ice Stair")
S("Outer Ice Stair")
S("Ice Slab")
S("Snow Block Stair")
S("Inner Snow Block Stair")
S("Outer Snow Block Stair")
S("Snow Block Slab")
--]]

View File

@ -9,7 +9,7 @@ for i = 1, #dyes do
local name, desc = unpack(dyes[i])
minetest.register_node("wool:" .. name, {
description = S("@1 Wool", desc),
description = S(desc .. " Wool"),
tiles = {"wool_" .. name .. ".png"},
is_ground_content = false,
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3,
@ -28,3 +28,25 @@ end
-- Backwards compatibility with jordach's 16-color wool mod
minetest.register_alias("wool:dark_blue", "wool:blue")
minetest.register_alias("wool:gold", "wool:yellow")
-- Dummy calls to S() to allow translation scripts to detect the strings.
-- To update this run:
-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Wool")) end
--[[
S("White Wool")
S("Grey Wool")
S("Dark Grey Wool")
S("Black Wool")
S("Violet Wool")
S("Blue Wool")
S("Cyan Wool")
S("Dark Green Wool")
S("Green Wool")
S("Yellow Wool")
S("Brown Wool")
S("Orange Wool")
S("Red Wool")
S("Magenta Wool")
S("Pink Wool")
--]]