From a29626881f985d4164f9485fdbfb9445762cf104 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 8 Mar 2019 00:00:09 +0100 Subject: [PATCH] New translation system, part 7: Items, part 3 --- mods/ITEMS/mcl_crafting_table/init.lua | 8 ++-- mods/ITEMS/mcl_doors/register.lua | 44 +++++++++++---------- mods/ITEMS/mcl_dye/init.lua | 52 ++++++++++++------------- mods/ITEMS/mcl_end/building.lua | 17 ++++---- mods/ITEMS/mcl_end/chorus_plant.lua | 21 +++++----- mods/ITEMS/mcl_end/eye_of_ender.lua | 7 ++-- mods/ITEMS/mcl_farming/beetroot.lua | 32 ++++++++------- mods/ITEMS/mcl_farming/carrots.lua | 22 ++++++----- mods/ITEMS/mcl_farming/hoes.lua | 16 ++++---- mods/ITEMS/mcl_farming/melon.lua | 26 +++++++------ mods/ITEMS/mcl_farming/potatoes.lua | 26 +++++++------ mods/ITEMS/mcl_farming/pumpkin.lua | 34 ++++++++-------- mods/ITEMS/mcl_farming/soil.lua | 10 +++-- mods/ITEMS/mcl_farming/wheat.lua | 34 ++++++++-------- mods/ITEMS/mcl_fences/init.lua | 20 +++++----- mods/ITEMS/mcl_fire/fire_charge.lua | 8 ++-- mods/ITEMS/mcl_fire/flint_and_steel.lua | 8 ++-- mods/ITEMS/mcl_fire/init.lua | 9 +++-- mods/ITEMS/mcl_fishing/init.lua | 32 ++++++++------- mods/ITEMS/mcl_flowerpots/init.lua | 47 +++++++++++----------- 20 files changed, 253 insertions(+), 220 deletions(-) diff --git a/mods/ITEMS/mcl_crafting_table/init.lua b/mods/ITEMS/mcl_crafting_table/init.lua index 37dc74a29..cfe867c28 100644 --- a/mods/ITEMS/mcl_crafting_table/init.lua +++ b/mods/ITEMS/mcl_crafting_table/init.lua @@ -1,7 +1,9 @@ +local S = minetest.get_translator("mcl_crafting_table") + minetest.register_node("mcl_crafting_table:crafting_table", { - description = "Crafting Table", - _doc_items_longdesc = "A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts.", - _doc_items_usagehelp = "Rightclick the crafting table to access the 3×3 crafting grid.", + description = S("Crafting Table"), + _doc_items_longdesc = S("A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts."), + _doc_items_usagehelp = S("Rightclick the crafting table to access the 3×3 crafting grid."), _doc_items_hidden = false, is_ground_content = false, tiles = {"crafting_workbench_top.png", "default_wood.png", "crafting_workbench_side.png", diff --git a/mods/ITEMS/mcl_doors/register.lua b/mods/ITEMS/mcl_doors/register.lua index 919de7436..e8f990f9b 100644 --- a/mods/ITEMS/mcl_doors/register.lua +++ b/mods/ITEMS/mcl_doors/register.lua @@ -1,11 +1,13 @@ +local S = minetest.get_translator("mcl_doors") + --[[ Doors ]] -local wood_longdesc = "Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal." -local wood_usagehelp = "To open or close a wooden door, rightclick it or supply its lower half with a redstone signal." +local wood_longdesc = S("Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal.") +local wood_usagehelp = S("To open or close a wooden door, rightclick it or supply its lower half with a redstone signal.") --- Oak Door --- mcl_doors:register_door("mcl_doors:wooden_door", { - description = "Oak Door", + description = S("Oak Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "doors_item_wood.png", @@ -28,7 +30,7 @@ minetest.register_craft({ --- Acacia Door -- mcl_doors:register_door("mcl_doors:acacia_door", { - description = "Acacia Door", + description = S("Acacia Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_acacia.png", @@ -51,7 +53,7 @@ minetest.register_craft({ --- Birch Door -- mcl_doors:register_door("mcl_doors:birch_door", { - description = "Birch Door", + description = S("Birch Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_birch.png", @@ -74,7 +76,7 @@ minetest.register_craft({ --- Dark Oak Door -- mcl_doors:register_door("mcl_doors:dark_oak_door", { - description = "Dark Oak Door", + description = S("Dark Oak Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_dark_oak.png", @@ -97,7 +99,7 @@ minetest.register_craft({ --- Jungle Door -- mcl_doors:register_door("mcl_doors:jungle_door", { - description = "Jungle Door", + description = S("Jungle Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_jungle.png", @@ -120,7 +122,7 @@ minetest.register_craft({ --- Spruce Door -- mcl_doors:register_door("mcl_doors:spruce_door", { - description = "Spruce Door", + description = S("Spruce Door"), _doc_items_longdesc = wood_longdesc, _doc_items_usagehelp = wood_usagehelp, inventory_image = "mcl_doors_door_spruce.png", @@ -174,9 +176,9 @@ minetest.register_craft({ --- Iron Door --- mcl_doors:register_door("mcl_doors:iron_door", { - description = "Iron Door", - _doc_items_longdesc = "Iron doors are 2-block high barriers which can only be opened or closed by a redstone signal, but not by hand.", - _doc_items_usagehelp = "To open or close an iron door, supply its lower half with a redstone signal.", + description = S("Iron Door"), + _doc_items_longdesc = S("Iron doors are 2-block high barriers which can only be opened or closed by a redstone signal, but not by hand."), + _doc_items_usagehelp = S("To open or close an iron door, supply its lower half with a redstone signal."), inventory_image = "doors_item_steel.png", groups = {pickaxey=1, mesecon_effector_on=1}, _mcl_hardness = 5, @@ -204,19 +206,19 @@ minetest.register_craft({ --[[ Trapdoors ]] local woods = { -- id, desc, texture, craftitem - { "trapdoor", "Oak Trapdoor", "doors_trapdoor.png", "doors_trapdoor_side.png", "mcl_core:wood" }, - { "acacia_trapdoor", "Acacia Trapdoor", "mcl_doors_trapdoor_acacia.png", "mcl_doors_trapdoor_acacia_side.png", "mcl_core:acaciawood" }, - { "birch_trapdoor", "Birch Trapdoor", "mcl_doors_trapdoor_birch.png", "mcl_doors_trapdoor_birch_side.png", "mcl_core:birchwood" }, - { "spruce_trapdoor", "Spruce Trapdoor", "mcl_doors_trapdoor_spruce.png", "mcl_doors_trapdoor_spruce_side.png", "mcl_core:sprucewood" }, - { "dark_oak_trapdoor", "Dark Oak Trapdoor", "mcl_doors_trapdoor_dark_oak.png", "mcl_doors_trapdoor_dark_oak_side.png", "mcl_core:darkwood" }, - { "jungle_trapdoor", "Jungle Trapdoor", "mcl_doors_trapdoor_jungle.png", "mcl_doors_trapdoor_jungle_side.png", "mcl_core:junglewood" }, + { "trapdoor", S("Oak Trapdoor"), "doors_trapdoor.png", "doors_trapdoor_side.png", "mcl_core:wood" }, + { "acacia_trapdoor", S("Acacia Trapdoor"), "mcl_doors_trapdoor_acacia.png", "mcl_doors_trapdoor_acacia_side.png", "mcl_core:acaciawood" }, + { "birch_trapdoor", S("Birch Trapdoor"), "mcl_doors_trapdoor_birch.png", "mcl_doors_trapdoor_birch_side.png", "mcl_core:birchwood" }, + { "spruce_trapdoor", S("Spruce Trapdoor"), "mcl_doors_trapdoor_spruce.png", "mcl_doors_trapdoor_spruce_side.png", "mcl_core:sprucewood" }, + { "dark_oak_trapdoor", S("Dark Oak Trapdoor"), "mcl_doors_trapdoor_dark_oak.png", "mcl_doors_trapdoor_dark_oak_side.png", "mcl_core:darkwood" }, + { "jungle_trapdoor", S("Jungle Trapdoor"), "mcl_doors_trapdoor_jungle.png", "mcl_doors_trapdoor_jungle_side.png", "mcl_core:junglewood" }, } for w=1, #woods do mcl_doors:register_trapdoor("mcl_doors:"..woods[w][1], { description = woods[w][2], - _doc_items_longdesc = "Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.", - _doc_items_usagehelp = "To open or close the trapdoor, rightclick it or send a redstone signal to it.", + _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), + _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), tile_front = woods[w][3], tile_side = woods[w][4], wield_image = woods[w][3], @@ -242,8 +244,8 @@ for w=1, #woods do end mcl_doors:register_trapdoor("mcl_doors:iron_trapdoor", { - description = "Iron Trapdoor", - _doc_items_longdesc = "Iron trapdoors are horizontal barriers which can only be opened and closed by redstone signals, but not by hand. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.", + description = S("Iron Trapdoor"), + _doc_items_longdesc = S("Iron trapdoors are horizontal barriers which can only be opened and closed by redstone signals, but not by hand. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."), tile_front = "doors_trapdoor_steel.png", tile_side = "doors_trapdoor_steel_side.png", wield_image = "doors_trapdoor_steel.png", diff --git a/mods/ITEMS/mcl_dye/init.lua b/mods/ITEMS/mcl_dye/init.lua index c347a9000..90e98ac4a 100644 --- a/mods/ITEMS/mcl_dye/init.lua +++ b/mods/ITEMS/mcl_dye/init.lua @@ -1,5 +1,3 @@ --- minetest/dye/init.lua - -- To make recipes that will work with any dye ever made by anybody, define -- them based on groups. -- You can select any group of groups, based on your need for amount of colors. @@ -15,6 +13,8 @@ mcl_dye = {} +local S = minetest.get_translator("mcl_dye") + -- Other mods can use these for looping through available colors mcl_dye.basecolors = {"white", "grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta"} mcl_dye.excolors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "orange", "yellow", "lime", "green", "aqua", "cyan", "sky_blue", "blue", "violet", "magenta", "red_violet"} @@ -64,22 +64,22 @@ local dyelocal = {} -- This collection of colors is partly a historic thing, partly something else. dyelocal.dyes = { - {"white", "mcl_dye_white", "Bone Meal", {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}}, - {"grey", "dye_grey", "Light Grey Dye", {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, - {"dark_grey", "dye_dark_grey", "Grey Dye", {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, - {"black", "mcl_dye_black", "Ink Sac", {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}}, - {"violet", "dye_violet", "Purple Dye", {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}}, - {"blue", "mcl_dye_blue", "Lapis Lazuli", {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}}, - {"lightblue", "mcl_dye_light_blue", "Light Blue Dye", {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}}, - {"cyan", "dye_cyan", "Cyan Dye", {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}}, - {"dark_green", "dye_dark_green", "Cactus Green",{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, - {"green", "mcl_dye_lime", "Lime Dye", {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}}, - {"yellow", "dye_yellow", "Dandelion Yellow", {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, - {"brown", "mcl_dye_brown", "Cocoa Beans", {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}}, - {"orange", "dye_orange", "Orange Dye", {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, - {"red", "dye_red", "Rose Red", {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}}, - {"magenta", "dye_magenta", "Magenta Dye", {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, - {"pink", "dye_pink", "Pink Dye", {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}}, + {"white", "mcl_dye_white", S("Bone Meal"), {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}}, + {"grey", "dye_grey", S("Light Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, + {"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, + {"black", "mcl_dye_black", S("Ink Sac"), {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}}, + {"violet", "dye_violet", S("Purple Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}}, + {"blue", "mcl_dye_blue", S("Lapis Lazuli"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}}, + {"lightblue", "mcl_dye_light_blue", S("Light Blue Dye"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}}, + {"cyan", "dye_cyan", S("Cyan Dye"), {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}}, + {"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, + {"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}}, + {"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, + {"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}}, + {"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, + {"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}}, + {"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, + {"pink", "dye_pink", S("Pink Dye"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}}, } dyelocal.unicolor_to_dye_id = {} @@ -109,8 +109,8 @@ for _, row in ipairs(dyelocal.dyes) do minetest.register_craftitem(item_name, { inventory_image = item_image, description = description, - _doc_items_longdesc = "This item is a dye which is used for dyeing and crafting.", - _doc_items_usagehelp = "Rightclick on a sheep to dye its wool. Other things are dyed by crafting.", + _doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."), + _doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."), groups = groups, stack_max = 64, }) @@ -295,9 +295,9 @@ end minetest.register_craftitem("mcl_dye:white", { inventory_image = "mcl_dye_white.png", - description = "Bone Meal", - _doc_items_longdesc = "Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.", - _doc_items_usagehelp = "Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.", + description = S("Bone Meal"), + _doc_items_longdesc = S("Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants."), + _doc_items_usagehelp = S("Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place."), stack_max = 64, groups = dyelocal.dyes[1][4], on_place = function(itemstack, user, pointed_thing) @@ -333,9 +333,9 @@ minetest.register_craftitem("mcl_dye:white", { minetest.register_craftitem("mcl_dye:brown", { inventory_image = "mcl_dye_brown.png", - _doc_items_longdesc = "Cocoa beans are a brown dye and can be used to plant cocoas.", - _doc_items_usagehelp = "Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.", - description = "Cocoa Beans", + _doc_items_longdesc = S("Cocoa beans are a brown dye and can be used to plant cocoas."), + _doc_items_usagehelp = S("Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa."), + description = S("Cocoa Beans"), stack_max = 64, groups = dyelocal.dyes[12][4], on_place = function(itemstack, placer, pointed_thing) diff --git a/mods/ITEMS/mcl_end/building.lua b/mods/ITEMS/mcl_end/building.lua index f4eff3e16..aeee897f0 100644 --- a/mods/ITEMS/mcl_end/building.lua +++ b/mods/ITEMS/mcl_end/building.lua @@ -1,7 +1,8 @@ -- Building blocks and decorative nodes +local S = minetest.get_translator("mcl_end") minetest.register_node("mcl_end:end_stone", { - description = "End Stone", + description = S("End Stone"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_end_end_stone.png"}, stack_max = 64, @@ -12,7 +13,7 @@ minetest.register_node("mcl_end:end_stone", { }) minetest.register_node("mcl_end:end_bricks", { - description = "End Stone Bricks", + description = S("End Stone Bricks"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_end_end_bricks.png"}, is_ground_content = false, @@ -24,7 +25,7 @@ minetest.register_node("mcl_end:end_bricks", { }) minetest.register_node("mcl_end:purpur_block", { - description = "Purpur Block", + description = S("Purpur Block"), _doc_items_longdesc = doc.sub.items.temp.build, tiles = {"mcl_end_purpur_block.png"}, is_ground_content = false, @@ -36,7 +37,7 @@ minetest.register_node("mcl_end:purpur_block", { }) minetest.register_node("mcl_end:purpur_pillar", { - description = "Purpur Pillar", + description = S("Purpur Pillar"), _doc_items_longdesc = doc.sub.items.temp.build, stack_max = 64, paramtype2 = "facedir", @@ -50,8 +51,8 @@ minetest.register_node("mcl_end:purpur_pillar", { }) minetest.register_node("mcl_end:end_rod", { - description = "End Rod", - _doc_items_longdesc = "End rods are decorational light sources.", + description = S("End Rod"), + _doc_items_longdesc = S("End rods are decorational light sources."), tiles = { "mcl_end_end_rod_top.png", "mcl_end_end_rod_bottom.png", @@ -125,8 +126,8 @@ minetest.register_node("mcl_end:end_rod", { }) minetest.register_node("mcl_end:dragon_egg", { - description = "Dragon Egg", - _doc_items_longdesc = "A dragon egg is a decorational item which can be placed.", + description = S("Dragon Egg"), + _doc_items_longdesc = S("A dragon egg is a decorational item which can be placed."), tiles = { "mcl_end_dragon_egg.png", "mcl_end_dragon_egg.png", diff --git a/mods/ITEMS/mcl_end/chorus_plant.lua b/mods/ITEMS/mcl_end/chorus_plant.lua index 5c48654dc..1374e7746 100644 --- a/mods/ITEMS/mcl_end/chorus_plant.lua +++ b/mods/ITEMS/mcl_end/chorus_plant.lua @@ -1,6 +1,7 @@ -- Chorus plants -- This includes chorus flowers, chorus plant stem nodes and chorus fruit +local S = minetest.get_translator("mcl_end") --- Plant parts --- @@ -24,9 +25,9 @@ local function round(num, idp) end minetest.register_node("mcl_end:chorus_flower", { - description = "Chorus Flower", - _doc_items_longdesc = "A chorus flower is the living part of a chorus plant. It can grow into a tall chorus plant, step by step. When it grows, it may die on old age eventually. It also dies when it is unable to grow.", - _doc_items_usagehelp = "Place it and wait for it to grow. It can only be placed on top of end stone, on top of a chorus plant stem, or at the side of exactly a chorus plant stem.", + description = S("Chorus Flower"), + _doc_items_longdesc = S("A chorus flower is the living part of a chorus plant. It can grow into a tall chorus plant, step by step. When it grows, it may die on old age eventually. It also dies when it is unable to grow."), + _doc_items_usagehelp = S("Place it and wait for it to grow. It can only be placed on top of end stone, on top of a chorus plant stem, or at the side of exactly a chorus plant stem."), tiles = { "mcl_end_chorus_flower.png", "mcl_end_chorus_flower.png", @@ -108,8 +109,8 @@ minetest.register_node("mcl_end:chorus_flower", { }) minetest.register_node("mcl_end:chorus_flower_dead", { - description = "Dead Chorus Flower", - _doc_items_longdesc = "This is a part of a chorus plant. It doesn't grow. Chorus flowers die of old age or when they are unable to grow. A dead chorus flower can be harvested to obtain a fresh chorus flower which is able to grow again.", + description = S("Dead Chorus Flower"), + _doc_items_longdesc = S("This is a part of a chorus plant. It doesn't grow. Chorus flowers die of old age or when they are unable to grow. A dead chorus flower can be harvested to obtain a fresh chorus flower which is able to grow again."), tiles = { "mcl_end_chorus_flower_dead.png", "mcl_end_chorus_flower_dead.png", @@ -131,8 +132,8 @@ minetest.register_node("mcl_end:chorus_flower_dead", { }) minetest.register_node("mcl_end:chorus_plant", { - description = "Chorus Plant Stem", - _doc_items_longdesc = "A chorus plant stem is the part of a chorus plant which holds the whole plant together. It needs end stone as its soil. Stems are grown from chorus flowers.", + description = S("Chorus Plant Stem"), + _doc_items_longdesc = S("A chorus plant stem is the part of a chorus plant which holds the whole plant together. It needs end stone as its soil. Stems are grown from chorus flowers."), tiles = { "mcl_end_chorus_plant.png", "mcl_end_chorus_plant.png", @@ -356,8 +357,8 @@ local eat_chorus_fruit = function(itemstack, player, pointed_thing) end minetest.register_craftitem("mcl_end:chorus_fruit", { - description = "Chorus Fruit", - _doc_items_longdesc = "A chorus fruit is an edible fruit from the chorus plant which is home to the End. Eating it teleports you to the top of a random solid block nearby, provided you won't end up inside a liquid, solid or harmful blocks. Teleportation might fail if there are very few or no places to teleport to.", + description = S("Chorus Fruit"), + _doc_items_longdesc = S("A chorus fruit is an edible fruit from the chorus plant which is home to the End. Eating it teleports you to the top of a random solid block nearby, provided you won't end up inside a liquid, solid or harmful blocks. Teleportation might fail if there are very few or no places to teleport to."), wield_image = "mcl_end_chorus_fruit.png", inventory_image = "mcl_end_chorus_fruit.png", on_place = eat_chorus_fruit, @@ -368,7 +369,7 @@ minetest.register_craftitem("mcl_end:chorus_fruit", { }) minetest.register_craftitem("mcl_end:chorus_fruit_popped", { - description = "Popped Chorus Fruit", + description = S("Popped Chorus Fruit"), _doc_items_longdesc = doc.sub.items.temp.craftitem, wield_image = "mcl_end_chorus_fruit_popped.png", inventory_image = "mcl_end_chorus_fruit_popped.png", diff --git a/mods/ITEMS/mcl_end/eye_of_ender.lua b/mods/ITEMS/mcl_end/eye_of_ender.lua index 69edbde35..a76eee0dd 100644 --- a/mods/ITEMS/mcl_end/eye_of_ender.lua +++ b/mods/ITEMS/mcl_end/eye_of_ender.lua @@ -1,4 +1,5 @@ -- Eye of Ender +local S = minetest.get_translator("mcl_end") minetest.register_entity("mcl_end:ender_eye", { physical = false, @@ -72,9 +73,9 @@ minetest.register_entity("mcl_end:ender_eye", { }) minetest.register_craftitem("mcl_end:ender_eye", { - description = "Eye of Ender", - _doc_items_longdesc = "This item is used to locate End portal shrines in the Overworld and to activate End portals." .. "\n" .. "NOTE: The End dimension is currently incomplete and boring.", - _doc_items_usagehelp = "Use the attack key to release the eye of ender. It will rise and fly in the horizontal direction of the closest end portal shrine. If you're very close, the eye of ender will take the direct path to the End portal shrine instead. After a few seconds, it stops. It may drop as an item, but there's a 20% chance it shatters." .. "\n" .. "To activate an End portal, eyes of ender need to be placed into each block of an intact End portal frame.", + description = S("Eye of Ender"), + _doc_items_longdesc = S("This item is used to locate End portal shrines in the Overworld and to activate End portals." .. "\n" .. "NOTE: The End dimension is currently incomplete and boring."), + _doc_items_usagehelp = S("Use the attack key to release the eye of ender. It will rise and fly in the horizontal direction of the closest end portal shrine. If you're very close, the eye of ender will take the direct path to the End portal shrine instead. After a few seconds, it stops. It may drop as an item, but there's a 20% chance it shatters.") .. "\n" .. S("To activate an End portal, eyes of ender need to be placed into each block of an intact End portal frame."), wield_image = "mcl_end_ender_eye.png", inventory_image = "mcl_end_ender_eye.png", stack_max = 64, diff --git a/mods/ITEMS/mcl_farming/beetroot.lua b/mods/ITEMS/mcl_farming/beetroot.lua index 8fe693580..a6f8fc9ac 100644 --- a/mods/ITEMS/mcl_farming/beetroot.lua +++ b/mods/ITEMS/mcl_farming/beetroot.lua @@ -1,7 +1,9 @@ +local S = minetest.get_translator("mcl_farming") + minetest.register_craftitem("mcl_farming:beetroot_seeds", { - description = "Beetroot Seeds", - _doc_items_longdesc = "Grows into a beetroot plant. Chickens like beetroot seeds.", - _doc_items_usagehelp = "Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds.", + description = S("Beetroot Seeds"), + _doc_items_longdesc = S("Grows into a beetroot plant. Chickens like beetroot seeds."), + _doc_items_usagehelp = S("Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds."), groups = { craftitem=1 }, inventory_image = "mcl_farming_beetroot_seeds.png", wield_image = "mcl_farming_beetroot_seeds.png", @@ -11,9 +13,9 @@ minetest.register_craftitem("mcl_farming:beetroot_seeds", { }) minetest.register_node("mcl_farming:beetroot_0", { - description = "Premature Beetroot Plant (Stage 1)", - _doc_items_longdesc = "Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.", - _doc_items_entry_name = "Premature Beetroot Plant", + description = S("Premature Beetroot Plant (Stage 1)"), + _doc_items_longdesc = S("Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature."), + _doc_items_entry_name = S("Premature Beetroot Plant"), paramtype = "light", paramtype2 = "meshoptions", sunlight_propagates = true, @@ -36,7 +38,7 @@ minetest.register_node("mcl_farming:beetroot_0", { }) minetest.register_node("mcl_farming:beetroot_1", { - description = "Premature Beetroot Plant (Stage 2)", + description = S("Premature Beetroot Plant (Stage 2)"), _doc_items_create_entry = false, paramtype = "light", paramtype2 = "meshoptions", @@ -60,7 +62,7 @@ minetest.register_node("mcl_farming:beetroot_1", { }) minetest.register_node("mcl_farming:beetroot_2", { - description = "Premature Beetroot Plant (Stage 3)", + description = S("Premature Beetroot Plant (Stage 3)"), _doc_items_create_entry = false, paramtype = "light", paramtype2 = "meshoptions", @@ -84,8 +86,8 @@ minetest.register_node("mcl_farming:beetroot_2", { }) minetest.register_node("mcl_farming:beetroot", { - description = "Mature Beetroot Plant", - _doc_items_longdesc = "A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further.", + description = S("Mature Beetroot Plant"), + _doc_items_longdesc = S("A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further."), _doc_items_create_entry = true, paramtype = "light", paramtype2 = "meshoptions", @@ -123,9 +125,9 @@ minetest.register_node("mcl_farming:beetroot", { }) minetest.register_craftitem("mcl_farming:beetroot_item", { - description = "Beetroot", - _doc_items_longdesc = "Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too.", - _doc_items_usagehelp = "Hold it in your hand and right-click to eat it. Rightclick an animal to feed it.", + description = S("Beetroot"), + _doc_items_longdesc = S("Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too."), + _doc_items_usagehelp = S("Hold it in your hand and right-click to eat it. Rightclick an animal to feed it."), inventory_image = "mcl_farming_beetroot.png", wield_image = "mcl_farming_beetroot.png", on_place = minetest.item_eat(1), @@ -135,8 +137,8 @@ minetest.register_craftitem("mcl_farming:beetroot_item", { }) minetest.register_craftitem("mcl_farming:beetroot_soup", { - description = "Beetroot Soup", - _doc_items_longdesc = "Beetroot soup is a food item.", + description = S("Beetroot Soup"), + _doc_items_longdesc = S("Beetroot soup is a food item."), stack_max = 1, inventory_image = "mcl_farming_beetroot_soup.png", wield_image = "mcl_farming_beetroot_soup.png", diff --git a/mods/ITEMS/mcl_farming/carrots.lua b/mods/ITEMS/mcl_farming/carrots.lua index 294906773..d8c759ffd 100644 --- a/mods/ITEMS/mcl_farming/carrots.lua +++ b/mods/ITEMS/mcl_farming/carrots.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_farming") + for i=1, 7 do local texture, sel_height if i < 3 then @@ -14,13 +16,13 @@ for i=1, 7 do local create, name, longdesc if i == 1 then create = true - name = "Premature Carrot Plant" - longdesc = "Carrot plants are plants which grow on farmland under sunlight in 8 stages, of which only 4 are actually visible. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature." + name = S("Premature Carrot Plant") + longdesc = S("Carrot plants are plants which grow on farmland under sunlight in 8 stages, of which only 4 are actually visible. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.") else create = false end minetest.register_node("mcl_farming:carrot_"..i, { - description = string.format("Premature Carrot Plant (Stage %d)", i), + description = S("Premature Carrot Plant (Stage @1)", i), _doc_items_create_entry = create, _doc_items_entry_name = name, _doc_items_longdesc = longdesc, @@ -47,8 +49,8 @@ for i=1, 7 do end minetest.register_node("mcl_farming:carrot", { - description = "Mature Carrot Plant", - _doc_items_longdesc = "Mature carrot plants are ready to be harvested for carrots. They won't grow any further.", + description = S("Mature Carrot Plant"), + _doc_items_longdesc = S("Mature carrot plants are ready to be harvested for carrots. They won't grow any further."), paramtype = "light", sunlight_propagates = true, paramtype2 = "meshoptions", @@ -79,9 +81,9 @@ minetest.register_node("mcl_farming:carrot", { }) minetest.register_craftitem("mcl_farming:carrot_item", { - description = "Carrot", - _doc_items_longdesc = "Carrots can be eaten and planted. Pigs and rabbits like carrots.", - _doc_items_usagehelp = "Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.", + description = S("Carrot"), + _doc_items_longdesc = S("Carrots can be eaten and planted. Pigs and rabbits like carrots."), + _doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."), inventory_image = "farming_carrot.png", groups = { food = 2, eatable = 3 }, _mcl_saturation = 3.6, @@ -97,8 +99,8 @@ minetest.register_craftitem("mcl_farming:carrot_item", { }) minetest.register_craftitem("mcl_farming:carrot_item_gold", { - description = "Golden Carrot", - _doc_items_longdesc = "A golden carrot is a precious food item which can be eaten. It is really, really filling!", + description = S("Golden Carrot"), + _doc_items_longdesc = S("A golden carrot is a precious food item which can be eaten. It is really, really filling!"), inventory_image = "farming_carrot_gold.png", on_place = minetest.item_eat(6), on_secondary_use = minetest.item_eat(6), diff --git a/mods/ITEMS/mcl_farming/hoes.lua b/mods/ITEMS/mcl_farming/hoes.lua index 1d8e9411e..453ede39b 100644 --- a/mods/ITEMS/mcl_farming/hoes.lua +++ b/mods/ITEMS/mcl_farming/hoes.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_farming") + local function create_soil(pos, inv) if pos == nil then return false @@ -23,11 +25,11 @@ local function create_soil(pos, inv) return false end -local hoe_longdesc = "Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch." -local hoe_usagehelp = "Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt." +local hoe_longdesc = S("Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch.") +local hoe_usagehelp = S("Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt.") minetest.register_tool("mcl_farming:hoe_wood", { - description = "Wood Hoe", + description = S("Wood Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, _doc_items_hidden = false, @@ -79,7 +81,7 @@ minetest.register_craft({ }) minetest.register_tool("mcl_farming:hoe_stone", { - description = "Stone Hoe", + description = S("Stone Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, inventory_image = "farming_tool_stonehoe.png", @@ -125,7 +127,7 @@ minetest.register_craft({ }) minetest.register_tool("mcl_farming:hoe_iron", { - description = "Iron Hoe", + description = S("Iron Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, inventory_image = "farming_tool_steelhoe.png", @@ -179,7 +181,7 @@ minetest.register_craft({ }) minetest.register_tool("mcl_farming:hoe_gold", { - description = "Golden Hoe", + description = S("Golden Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, inventory_image = "farming_tool_goldhoe.png", @@ -234,7 +236,7 @@ minetest.register_craft({ }) minetest.register_tool("mcl_farming:hoe_diamond", { - description = "Diamond Hoe", + description = S("Diamond Hoe"), _doc_items_longdesc = hoe_longdesc, _doc_items_usagehelp = hoe_usagehelp, inventory_image = "farming_tool_diamondhoe.png", diff --git a/mods/ITEMS/mcl_farming/melon.lua b/mods/ITEMS/mcl_farming/melon.lua index 7e3cfa1da..fab744747 100644 --- a/mods/ITEMS/mcl_farming/melon.lua +++ b/mods/ITEMS/mcl_farming/melon.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_farming") + -- Seeds minetest.register_craftitem("mcl_farming:melon_seeds", { - description = "Melon Seeds", - _doc_items_longdesc = "Grows into a melon. Chickens like melon seeds.", - _doc_items_usagehelp = "Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melons grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it melon seeds.", + description = S("Melon Seeds"), + _doc_items_longdesc = S("Grows into a melon. Chickens like melon seeds."), + _doc_items_usagehelp = S("Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melons grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it melon seeds."), stack_max = 64, groups = { craftitem=1 }, inventory_image = "mcl_farming_melon_seeds.png", @@ -14,8 +16,8 @@ minetest.register_craftitem("mcl_farming:melon_seeds", { -- Melon template (will be fed into mcl_farming.register_gourd local melon_base_def = { - description = "Melon", - _doc_items_longdesc = "A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices.", + description = S("Melon"), + _doc_items_longdesc = S("A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices."), stack_max = 64, tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"}, groups = {handy=1,axey=1, plant=1,building_block=1,enderman_takable=1,dig_by_piston=1}, @@ -68,13 +70,13 @@ for s=1,7 do local doc = s == 1 local longdesc, entry_name if doc then - entry_name = "Premature Melon Stem" - longdesc = "Melon stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature melon stems are able to grow melons." + entry_name = S("Premature Melon Stem") + longdesc = S("Melon stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature melon stems are able to grow melons.") end local colorstring = mcl_farming:stem_color(startcolor, endcolor, s, 8) local texture = "([combine:16x16:0,"..((8-s)*2).."=mcl_farming_melon_stem_disconnected.png)^[colorize:"..colorstring..":127" minetest.register_node("mcl_farming:melontige_"..s, { - description = string.format("Premature Melon Stem (Stage %d)", s), + description = S("Premature Melon Stem (Stage @1)", s), _doc_items_create_entry = doc, _doc_items_entry_name = entry_name, _doc_items_longdesc = longdesc, @@ -100,9 +102,9 @@ end -- Full melon stem, able to spawn melons local stem_def = { - description = "Mature Melon Stem", + description = S("Mature Melon Stem"), _doc_items_create_entry = true, - _doc_items_longdesc = "A mature melon stem attempts to grow a melon at one of its four adjacent blocks. A melon can only grow on top of farmland, dirt, or a grass block. When a melon is next to a melon stem, the melon stem immediately bends and connects to the melon. While connected, a melon stem can't grow another melon. As soon all melons around the stem have been removed, it loses the connection and is ready to grow another melon.", + _doc_items_longdesc = S("A mature melon stem attempts to grow a melon at one of its four adjacent blocks. A melon can only grow on top of farmland, dirt, or a grass block. When a melon is next to a melon stem, the melon stem immediately bends and connects to the melon. While connected, a melon stem can't grow another melon. As soon all melons around the stem have been removed, it loses the connection and is ready to grow another melon."), tiles = {"mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127"}, wield_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127", inventory_image = "mcl_farming_melon_stem_disconnected.png^[colorize:#FFA800:127", @@ -117,8 +119,8 @@ mcl_farming:add_gourd("mcl_farming:melontige_unconnect", "mcl_farming:melontige_ -- Items and crafting minetest.register_craftitem("mcl_farming:melon_item", { -- Original name: “Melon” - description = "Melon Slice", - _doc_items_longdesc = "This is a food item which can be eaten.", + description = S("Melon Slice"), + _doc_items_longdesc = S("This is a food item which can be eaten."), stack_max = 64, inventory_image = "farming_melon.png", on_place = minetest.item_eat(2), diff --git a/mods/ITEMS/mcl_farming/potatoes.lua b/mods/ITEMS/mcl_farming/potatoes.lua index 7294275a4..7c795b477 100644 --- a/mods/ITEMS/mcl_farming/potatoes.lua +++ b/mods/ITEMS/mcl_farming/potatoes.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_farming") + -- Premature potato plants for i=1, 7 do @@ -16,8 +18,8 @@ for i=1, 7 do local create, name, longdesc if i==1 then create = true - name = "Premature Potato Plant" - longdesc = "Potato plants are plants which grow on farmland under sunlight in 8 stages, of which only 4 are actually visible. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature." + name = S("Premature Potato Plant") + longdesc = S("Potato plants are plants which grow on farmland under sunlight in 8 stages, of which only 4 are actually visible. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.") else create = false if minetest.get_modpath("doc") then @@ -26,7 +28,7 @@ for i=1, 7 do end minetest.register_node("mcl_farming:potato_"..i, { - description = string.format("Premature Potato Plant (Stage %d)", i), + description = S("Premature Potato Plant (Stage @1)", i), _doc_items_create_entry = create, _doc_items_entry_name = name, _doc_items_longdesc = longdesc, @@ -52,8 +54,8 @@ end -- Mature plant minetest.register_node("mcl_farming:potato", { - description = "Mature Potato Plant", - _doc_items_longdesc = "Mature potato plants are ready to be harvested for potatoes. They won't grow any further.", + description = S("Mature Potato Plant"), + _doc_items_longdesc = S("Mature potato plants are ready to be harvested for potatoes. They won't grow any further."), paramtype = "light", paramtype2 = "meshoptions", sunlight_propagates = true, @@ -84,9 +86,9 @@ minetest.register_node("mcl_farming:potato", { }) minetest.register_craftitem("mcl_farming:potato_item", { - description = "Potato", - _doc_items_longdesc = "Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes.", - _doc_items_usagehelp = "Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.", + description = S("Potato"), + _doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."), + _doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."), inventory_image = "farming_potato.png", groups = { food = 2, eatable = 1 }, _mcl_saturation = 0.6, @@ -103,8 +105,8 @@ minetest.register_craftitem("mcl_farming:potato_item", { }) minetest.register_craftitem("mcl_farming:potato_item_baked", { - description = "Baked Potato", - _doc_items_longdesc = "Baked potatoes are food items which are more filling than the unbaked ones.", + description = S("Baked Potato"), + _doc_items_longdesc = S("Baked potatoes are food items which are more filling than the unbaked ones."), stack_max = 64, inventory_image = "farming_potato_baked.png", on_place = minetest.item_eat(5), @@ -114,8 +116,8 @@ minetest.register_craftitem("mcl_farming:potato_item_baked", { }) minetest.register_craftitem("mcl_farming:potato_item_poison", { - description = "Poisonous Potato", - _doc_items_longdesc = "This potato doesn't look too healthy. You can eat it to restore hunger points, but there's a 60% chance it will poison you briefly.", + description = S("Poisonous Potato"), + _doc_items_longdesc = S("This potato doesn't look too healthy. You can eat it to restore hunger points, but there's a 60% chance it will poison you briefly."), stack_max = 64, inventory_image = "farming_potato_poison.png", -- TODO: Cause status effects diff --git a/mods/ITEMS/mcl_farming/pumpkin.lua b/mods/ITEMS/mcl_farming/pumpkin.lua index 6b0d31816..128f36149 100644 --- a/mods/ITEMS/mcl_farming/pumpkin.lua +++ b/mods/ITEMS/mcl_farming/pumpkin.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_farming") + -- Seeds minetest.register_craftitem("mcl_farming:pumpkin_seeds", { - description = "Pumpkin Seeds", - _doc_items_longdesc = "Grows into a pumpkin. Chickens like pumpkin seeds.", - _doc_items_usagehelp = "Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkins grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it pumpkin seeds.", + description = S("Pumpkin Seeds"), + _doc_items_longdesc = S("Grows into a pumpkin. Chickens like pumpkin seeds."), + _doc_items_usagehelp = S("Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkins grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it pumpkin seeds."), stack_max = 64, inventory_image = "mcl_farming_pumpkin_seeds.png", groups = { craftitem=1 }, @@ -42,13 +44,13 @@ for s=1,7 do local doc = s == 1 local longdesc, entry_name if doc then - entry_name = "Premature Pumpkin Stem" - longdesc = "Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature pumpkin stems are able to grow pumpkins." + entry_name = S("Premature Pumpkin Stem") + longdesc = S("Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature pumpkin stems are able to grow pumpkins.") end local colorstring = mcl_farming:stem_color(startcolor, endcolor, s, 8) local texture = "([combine:16x16:0,"..((8-s)*2).."=mcl_farming_pumpkin_stem_disconnected.png)^[colorize:"..colorstring..":127" minetest.register_node("mcl_farming:pumpkin_"..s, { - description = string.format("Premature Pumpkin Stem (Stage %d)", s), + description = S("Premature Pumpkin Stem (Stage @1)", s), _doc_items_entry_name = entry_name, _doc_items_create_entry = doc, _doc_items_longdesc = longdesc, @@ -74,8 +76,8 @@ end -- Full stem (not connected) local stem_def = { - description = "Mature Pumpkin Stem", - _doc_items_longdesc = "A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.", + description = S("Mature Pumpkin Stem"), + _doc_items_longdesc = S("A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin."), tiles = {"mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127"}, wield_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127", inventory_image = "mcl_farming_pumpkin_stem_disconnected.png^[colorize:#FFA800:127", @@ -83,8 +85,8 @@ local stem_def = { -- Template for pumpkin local pumpkin_base_def = { - description = "Faceless Pumpkin", - _doc_items_longdesc = "A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.", + description = S("Faceless Pumpkin"), + _doc_items_longdesc = S("A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds."), _doc_items_usagehelp = "To carve a face into the pumpkin, use the shears on the side you want to carve.", stack_max = 64, paramtype2 = "facedir", @@ -97,8 +99,8 @@ local pumpkin_base_def = { minetest.register_node("mcl_farming:pumpkin", pumpkin_base_def) local pumpkin_face_base_def = table.copy(pumpkin_base_def) -pumpkin_face_base_def.description = "Pumpkin" -pumpkin_face_base_def._doc_items_longdesc = "A pumpkin can be worn as a helmet for fun, but it doesn't offer any protection. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds." +pumpkin_face_base_def.description = S("Pumpkin") +pumpkin_face_base_def._doc_items_longdesc = S("A pumpkin can be worn as a helmet for fun, but it doesn't offer any protection. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.") pumpkin_face_base_def.tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face.png"} pumpkin_face_base_def.groups.armor_head=1 pumpkin_face_base_def.groups.non_combat_armor=1 @@ -116,8 +118,8 @@ end) -- Jack o'Lantern minetest.register_node("mcl_farming:pumpkin_face_light", { - description = "Jack o'Lantern", - _doc_items_longdesc = "A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.", + description = S("Jack o'Lantern"), + _doc_items_longdesc = S("A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly."), is_ground_content = false, stack_max = 64, paramtype = "light", @@ -155,8 +157,8 @@ minetest.register_craft({ }) minetest.register_craftitem("mcl_farming:pumpkin_pie", { - description = "Pumpkin Pie", - _doc_items_longdesc = "A pumpkin pie is a tasty food item which can be eaten.", + description = S("Pumpkin Pie"), + _doc_items_longdesc = S("A pumpkin pie is a tasty food item which can be eaten."), stack_max = 64, inventory_image = "mcl_farming_pumpkin_pie.png", wield_image = "mcl_farming_pumpkin_pie.png", diff --git a/mods/ITEMS/mcl_farming/soil.lua b/mods/ITEMS/mcl_farming/soil.lua index 0b38a5ed9..d8e591ec8 100644 --- a/mods/ITEMS/mcl_farming/soil.lua +++ b/mods/ITEMS/mcl_farming/soil.lua @@ -1,7 +1,9 @@ +local S = minetest.get_translator("mcl_farming") + minetest.register_node("mcl_farming:soil", { tiles = {"mcl_farming_farmland_dry.png", "default_dirt.png"}, - description = "Farmland", - _doc_items_longdesc = "Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.", + description = S("Farmland"), + _doc_items_longdesc = S("Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it."), drop = "mcl_core:dirt", drawtype = "nodebox", paramtype = "light", @@ -24,8 +26,8 @@ minetest.register_node("mcl_farming:soil", { minetest.register_node("mcl_farming:soil_wet", { tiles = {"mcl_farming_farmland_wet.png", "default_dirt.png"}, - description = "Hydrated Farmland", - _doc_items_longdesc = "Hydrated farmland is used in farming, this is where you can plant and grow some plants. It is created when farmlands is under rain or near water. Without water, this block will dry out eventually. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.", + description = S("Hydrated Farmland"), + _doc_items_longdesc = S("Hydrated farmland is used in farming, this is where you can plant and grow some plants. It is created when farmlands is under rain or near water. Without water, this block will dry out eventually. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it."), drop = "mcl_core:dirt", drawtype = "nodebox", paramtype = "light", diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index f7521d268..41c31c347 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_farming") + minetest.register_craftitem("mcl_farming:wheat_seeds", { -- Original Minecraft name: “Seeds” - description = "Wheat Seeds", - _doc_items_longdesc = "Grows into a wheat plant. Chickens like wheat seeds.", - _doc_items_usagehelp = "Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds.", + description = S("Wheat Seeds"), + _doc_items_longdesc = S("Grows into a wheat plant. Chickens like wheat seeds."), + _doc_items_usagehelp = S("Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds."), groups = { craftitem=1 }, inventory_image = "mcl_farming_wheat_seeds.png", on_place = function(itemstack, placer, pointed_thing) @@ -24,14 +26,14 @@ for i=1,7 do local create, name, longdesc if i == 1 then create = true - name = "Premature Wheat Plant" - longdesc = "Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature." + name = S("Premature Wheat Plant") + longdesc = S("Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature.") else create = false end minetest.register_node("mcl_farming:wheat_"..i, { - description = string.format("Premature Wheat Plant (Stage %d)", i), + description = S("Premature Wheat Plant (Stage @1)", i), _doc_items_create_entry = create, _doc_items_entry_name = name, _doc_items_longdesc = longdesc, @@ -58,8 +60,8 @@ for i=1,7 do end minetest.register_node("mcl_farming:wheat", { - description = "Mature Wheat Plant", - _doc_items_longdesc = "Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further.", + description = S("Mature Wheat Plant"), + _doc_items_longdesc = S("Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further."), sunlight_propagates = true, paramtype = "light", paramtype2 = "meshoptions", @@ -86,8 +88,8 @@ minetest.register_node("mcl_farming:wheat", { mcl_farming:add_plant("plant_wheat", "mcl_farming:wheat", {"mcl_farming:wheat_1", "mcl_farming:wheat_2", "mcl_farming:wheat_3", "mcl_farming:wheat_4", "mcl_farming:wheat_5", "mcl_farming:wheat_6", "mcl_farming:wheat_7"}, 25, 20) minetest.register_craftitem("mcl_farming:wheat_item", { - description = "Wheat", - _doc_items_longdesc = "Wheat is used in crafting. Some animals like wheat.", + description = S("Wheat"), + _doc_items_longdesc = S("Wheat is used in crafting. Some animals like wheat."), _doc_items_usagehelp = "Rightclick an animal to try to feed it wheat.", inventory_image = "farming_wheat_harvested.png", groups = { craftitem = 1 }, @@ -108,8 +110,8 @@ minetest.register_craft({ }) minetest.register_craftitem("mcl_farming:cookie", { - description = "Cookie", - _doc_items_longdesc = "This is a food item which can be eaten.", + description = S("Cookie"), + _doc_items_longdesc = S("This is a food item which can be eaten."), inventory_image = "farming_cookie.png", groups = {food=2, eatable=2}, _mcl_saturation = 0.4, @@ -119,8 +121,8 @@ minetest.register_craftitem("mcl_farming:cookie", { minetest.register_craftitem("mcl_farming:bread", { - description = "Bread", - _doc_items_longdesc = "This is a food item which can be eaten.", + description = S("Bread"), + _doc_items_longdesc = S("This is a food item which can be eaten."), inventory_image = "farming_bread.png", groups = {food=2, eatable=5}, _mcl_saturation = 6.0, @@ -129,8 +131,8 @@ minetest.register_craftitem("mcl_farming:bread", { }) minetest.register_node("mcl_farming:hay_block", { - description = "Hay Bale", - _doc_items_longdesc = "Hay bales are decorative blocks made from wheat.", + description = S("Hay Bale"), + _doc_items_longdesc = S("Hay bales are decorative blocks made from wheat."), tiles = {"mcl_farming_hayblock_top.png", "mcl_farming_hayblock_top.png", "mcl_farming_hayblock_side.png"}, is_ground_content = false, stack_max = 64, diff --git a/mods/ITEMS/mcl_fences/init.lua b/mods/ITEMS/mcl_fences/init.lua index 2f4c9952d..1e2539faa 100644 --- a/mods/ITEMS/mcl_fences/init.lua +++ b/mods/ITEMS/mcl_fences/init.lua @@ -1,5 +1,7 @@ local init = os.clock() +local S = minetest.get_translator("mcl_fences") + -- Node box local p = {-2/16, -0.5, -2/16, 2/16, 0.5, 2/16} local x1 = {-0.5, 4/16, -1/16, -2/16, 7/16, 1/16} --oben(quer) -x @@ -36,7 +38,7 @@ mcl_fences.register_fence = function(id, fence_name, texture, groups, hardness, table.insert(connects_to, fence_id) minetest.register_node(fence_id, { description = fence_name, - _doc_items_longdesc = "Fences are structures which block the way. Fences will connect to each other and solid blocks. They cannot be jumped over with a simple jump.", + _doc_items_longdesc = S("Fences are structures which block the way. Fences will connect to each other and solid blocks. They cannot be jumped over with a simple jump."), tiles = {texture}, inventory_image = "mcl_fences_fence_mask.png^" .. texture .. "^mcl_fences_fence_mask.png^[makealpha:255,126,126", wield_image = "mcl_fences_fence_mask.png^" .. texture .. "^mcl_fences_fence_mask.png^[makealpha:255,126,126", @@ -172,8 +174,8 @@ mcl_fences.register_fence_gate = function(id, fence_gate_name, texture, groups, cgroups_closed.mesecon_effector_off = nil minetest.register_node(gate_id, { description = fence_gate_name, - _doc_items_longdesc = "Fence gates can be opened or closed and can't be jumped over. Fences will connect nicely to fence gates.", - _doc_items_usagehelp = "Right-click the fence gate to open or close it.", + _doc_items_longdesc = S("Fence gates can be opened or closed and can't be jumped over. Fences will connect nicely to fence gates."), + _doc_items_usagehelp = S("Right-click the fence gate to open or close it."), tiles = {texture}, inventory_image = "mcl_fences_fence_gate_mask.png^" .. texture .. "^mcl_fences_fence_gate_mask.png^[makealpha:255,126,126", wield_image = "mcl_fences_fence_gate_mask.png^" .. texture .. "^mcl_fences_fence_gate_mask.png^[makealpha:255,126,126", @@ -250,12 +252,12 @@ local wood_connect = {"group:fence_wood"} local wood_sounds = mcl_sounds.node_sound_wood_defaults() local woods = { - {"", "Oak Fence", "Oak Fence Gate", "mcl_fences_fence_oak.png", "mcl_fences_fence_gate_oak.png", "mcl_core:wood"}, - {"spruce", "Spruce Fence", "Spruce Fence Gate", "mcl_fences_fence_spruce.png", "mcl_fences_fence_gate_spruce.png", "mcl_core:sprucewood"}, - {"birch", "Birch Fence", "Birch Fence Gate", "mcl_fences_fence_birch.png", "mcl_fences_fence_gate_birch.png", "mcl_core:birchwood"}, - {"jungle", "Jungle Fence", "Jungle Fence Gate", "mcl_fences_fence_jungle.png", "mcl_fences_fence_gate_jungle.png", "mcl_core:junglewood"}, - {"dark_oak", "Dark Oak Fence", "Dark Oak Fence Gate", "mcl_fences_fence_big_oak.png", "mcl_fences_fence_gate_big_oak.png", "mcl_core:darkwood"}, - {"acacia", "Acacia Fence", "Acacia Fence Gate", "mcl_fences_fence_acacia.png", "mcl_fences_fence_gate_acacia.png", "mcl_core:acaciawood"}, + {"", S("Oak Fence"), S("Oak Fence Gate"), "mcl_fences_fence_oak.png", "mcl_fences_fence_gate_oak.png", "mcl_core:wood"}, + {"spruce", S("Spruce Fence"), S("Spruce Fence Gate"), "mcl_fences_fence_spruce.png", "mcl_fences_fence_gate_spruce.png", "mcl_core:sprucewood"}, + {"birch", S("Birch Fence"), S("Birch Fence Gate"), "mcl_fences_fence_birch.png", "mcl_fences_fence_gate_birch.png", "mcl_core:birchwood"}, + {"jungle", S("Jungle Fence"), S("Jungle Fence Gate"), "mcl_fences_fence_jungle.png", "mcl_fences_fence_gate_jungle.png", "mcl_core:junglewood"}, + {"dark_oak", S("Dark Oak Fence"), S("Dark Oak Fence Gate"), "mcl_fences_fence_big_oak.png", "mcl_fences_fence_gate_big_oak.png", "mcl_core:darkwood"}, + {"acacia", S("Acacia Fence"), S("Acacia Fence Gate"), "mcl_fences_fence_acacia.png", "mcl_fences_fence_gate_acacia.png", "mcl_core:acaciawood"}, } for w=1, #woods do diff --git a/mods/ITEMS/mcl_fire/fire_charge.lua b/mods/ITEMS/mcl_fire/fire_charge.lua index 78dbade78..58e86778f 100644 --- a/mods/ITEMS/mcl_fire/fire_charge.lua +++ b/mods/ITEMS/mcl_fire/fire_charge.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_fire") + -- Fire Charge minetest.register_craftitem("mcl_fire:fire_charge", { - description = "Fire Charge", - _doc_items_longdesc = "Fire charges are primarily projectiles which can be launched from dispensers, they will fly in a straight line and burst into a fire on impact. Alternatively, they can be used to ignite fires directly.", - _doc_items_usagehelp = "Put the fire charge into a dispenser and supply it with redstone power to launch it. To ignite a fire directly, simply place the fire charge on the ground, which uses it up.", + description = S("Fire Charge"), + _doc_items_longdesc = S("Fire charges are primarily projectiles which can be launched from dispensers, they will fly in a straight line and burst into a fire on impact. Alternatively, they can be used to ignite fires directly."), + _doc_items_usagehelp = S("Put the fire charge into a dispenser and supply it with redstone power to launch it. To ignite a fire directly, simply place the fire charge on the ground, which uses it up."), inventory_image = "mcl_fire_fire_charge.png", liquids_pointable = false, stack_max = 64, diff --git a/mods/ITEMS/mcl_fire/flint_and_steel.lua b/mods/ITEMS/mcl_fire/flint_and_steel.lua index 7cb114ad1..6ca2132d0 100644 --- a/mods/ITEMS/mcl_fire/flint_and_steel.lua +++ b/mods/ITEMS/mcl_fire/flint_and_steel.lua @@ -1,8 +1,10 @@ +local S = minetest.get_translator("mcl_fire") + -- Flint and Steel minetest.register_tool("mcl_fire:flint_and_steel", { - description = "Flint and Steel", - _doc_items_longdesc = "Flint and steel is a tool to start fires and ignite blocks.", - _doc_items_usagehelp = "Rightclick the surface of a block to attempt to light a fire in front of it or ignite the block. A few blocks have an unique reaction when ignited.", + description = S("Flint and Steel"), + _doc_items_longdesc = S("Flint and steel is a tool to start fires and ignite blocks."), + _doc_items_usagehelp = S("Rightclick the surface of a block to attempt to light a fire in front of it or ignite the block. A few blocks have an unique reaction when ignited."), inventory_image = "mcl_fire_flint_and_steel.png", liquids_pointable = false, stack_max = 1, diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index 7743d30dd..d85fbf1c6 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -2,6 +2,7 @@ mcl_fire = {} +local S = minetest.get_translator("mcl_fire") -- -- Items @@ -9,11 +10,11 @@ mcl_fire = {} -- Flame nodes -local fire_help = "Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire." -local eternal_fire_help = "Eternal fire is a damaging and destructive block. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside." +local fire_help = S("Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.") +local eternal_fire_help = S("Eternal fire is a damaging and destructive block. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.") minetest.register_node("mcl_fire:fire", { - description = "Fire", + description = S("Fire"), _doc_items_longdesc = fire_help, drawtype = "firelike", tiles = { @@ -92,7 +93,7 @@ minetest.register_node("mcl_fire:fire", { }) minetest.register_node("mcl_fire:eternal_fire", { - description = "Eternal Fire", + description = S("Eternal Fire"), _doc_items_longdesc = eternal_fire_help, drawtype = "firelike", tiles = { diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index ab2519b9f..0c23daae7 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -1,3 +1,5 @@ +local S = minetest.get_translator("mcl_fishing") + local go_fishing = function(itemstack, user, pointed_thing) if pointed_thing and pointed_thing.under then -- Use pointed node's on_rightclick function first, if present @@ -83,9 +85,9 @@ end -- Fishing Rod minetest.register_tool("mcl_fishing:fishing_rod", { - description = "Fishing Rod", - _doc_items_longdesc = "Fishing rods can be used to catch fish.", - _doc_items_usagehelp = "Rightclick a water source to try to go fishing. Who knows what you're going to catch?", + description = S("Fishing Rod"), + _doc_items_longdesc = S("Fishing rods can be used to catch fish."), + _doc_items_usagehelp = S("Rightclick a water source to try to go fishing. Who knows what you're going to catch?"), -- This item is incomplete, hide it from creative inventory groups = { tool=1, not_in_creative_inventory=1 }, inventory_image = "mcl_fishing_fishing_rod.png", @@ -128,8 +130,8 @@ minetest.register_craft({ -- Fish minetest.register_craftitem("mcl_fishing:fish_raw", { - description = "Raw Fish", - _doc_items_longdesc = "Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.", + description = S("Raw Fish"), + _doc_items_longdesc = S("Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value."), inventory_image = "mcl_fishing_fish_raw.png", on_place = minetest.item_eat(2), on_secondary_use = minetest.item_eat(2), @@ -139,8 +141,8 @@ minetest.register_craftitem("mcl_fishing:fish_raw", { }) minetest.register_craftitem("mcl_fishing:fish_cooked", { - description = "Cooked Fish", - _doc_items_longdesc = "Mmh, fish! This is a healthy food item.", + description = S("Cooked Fish"), + _doc_items_longdesc = S("Mmh, fish! This is a healthy food item."), inventory_image = "mcl_fishing_fish_cooked.png", on_place = minetest.item_eat(5), on_secondary_use = minetest.item_eat(5), @@ -158,8 +160,8 @@ minetest.register_craft({ -- Salmon minetest.register_craftitem("mcl_fishing:salmon_raw", { - description = "Raw Salmon", - _doc_items_longdesc = "Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.", + description = S("Raw Salmon"), + _doc_items_longdesc = S("Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value."), inventory_image = "mcl_fishing_salmon_raw.png", on_place = minetest.item_eat(2), on_secondary_use = minetest.item_eat(2), @@ -169,8 +171,8 @@ minetest.register_craftitem("mcl_fishing:salmon_raw", { }) minetest.register_craftitem("mcl_fishing:salmon_cooked", { - description = "Cooked Salmon", - _doc_items_longdesc = "This is a healthy food item which can be eaten.", + description = S("Cooked Salmon"), + _doc_items_longdesc = S("This is a healthy food item which can be eaten."), inventory_image = "mcl_fishing_salmon_cooked.png", on_place = minetest.item_eat(6), on_secondary_use = minetest.item_eat(6), @@ -188,8 +190,8 @@ minetest.register_craft({ -- Clownfish minetest.register_craftitem("mcl_fishing:clownfish_raw", { - description = "Clownfish", - _doc_items_longdesc = "Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.", + description = S("Clownfish"), + _doc_items_longdesc = S("Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely."), inventory_image = "mcl_fishing_clownfish_raw.png", on_place = minetest.item_eat(1), on_secondary_use = minetest.item_eat(1), @@ -201,8 +203,8 @@ minetest.register_craftitem("mcl_fishing:clownfish_raw", { -- Pufferfish -- TODO: Add real status effect minetest.register_craftitem("mcl_fishing:pufferfish_raw", { - description = "Pufferfish", - _doc_items_longdesc = "Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).", + description = S("Pufferfish"), + _doc_items_longdesc = S("Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger)."), inventory_image = "mcl_fishing_pufferfish_raw.png", on_place = minetest.item_eat(1), on_secondary_use = minetest.item_eat(1), diff --git a/mods/ITEMS/mcl_flowerpots/init.lua b/mods/ITEMS/mcl_flowerpots/init.lua index e4df4459c..c58fab7cf 100644 --- a/mods/ITEMS/mcl_flowerpots/init.lua +++ b/mods/ITEMS/mcl_flowerpots/init.lua @@ -1,25 +1,26 @@ +local S = minetest.get_translator("mcl_flowerpots") local flowers = { - {"dandelion", "mcl_flowers:dandelion", "Dandelion Flower Pot"}, - {"poppy", "mcl_flowers:poppy", "Poppy Floer Pot"}, - {"blue_orchid", "mcl_flowers:blue_orchid", "Blue Orchid Flower Pot"}, - {"allium", "mcl_flowers:allium", "Allium Flower Pot"}, - {"azure_bluet", "mcl_flowers:azure_bluet", "Azure Bluet Flower Pot"}, - {"tulip_red", "mcl_flowers:tulip_red", "Red Tulip Flower Pot"}, - {"tulip_pink", "mcl_flowers:tulip_pink", "Pink Tulip Flower Pot"}, - {"tulip_white", "mcl_flowers:tulip_white", "White Tulip Flower Pot"}, - {"tulip_orange", "mcl_flowers:tulip_orange", "Orange Tulip Flower Pot"}, - {"oxeye_daisy", "mcl_flowers:oxeye_daisy", "Oxeye Daisy Flower Pot"}, - {"mushroom_brown", "mcl_mushrooms:mushroom_brown", "Brown Mushroom Flower Pot"}, - {"mushroom_red", "mcl_mushrooms:mushroom_red", "Red Mushroom Flower Pot"}, - {"sapling", "mcl_core:sapling", "Oak Sapling Flower Pot"}, - {"acaciasapling", "mcl_core:acaciasapling", "Acacia Sapling Flower Pot"}, - {"junglesapling", "mcl_core:junglesapling", "Jungle Sapling Flower Pot"}, - {"darksapling", "mcl_core:darksapling", "Dark Oak Sapling Flower Pot"}, - {"sprucesapling", "mcl_core:sprucesapling", "Spruce Sapling Flower Pot"}, - {"birchsapling", "mcl_core:birchsapling", "Birch Sapling Flower Pot"}, - {"deadbush", "mcl_core:deadbush", "Dead Bush Flower Pot"}, - {"fern", "mcl_flowers:fern", "Fern Flower Pot", {"mcl_flowers_fern_inv.png"}}, + {"dandelion", "mcl_flowers:dandelion", S("Dandelion Flower Pot")}, + {"poppy", "mcl_flowers:poppy", S("Poppy Floer Pot")}, + {"blue_orchid", "mcl_flowers:blue_orchid", S("Blue Orchid Flower Pot")}, + {"allium", "mcl_flowers:allium", S("Allium Flower Pot")}, + {"azure_bluet", "mcl_flowers:azure_bluet", S("Azure Bluet Flower Pot")}, + {"tulip_red", "mcl_flowers:tulip_red", S("Red Tulip Flower Pot")}, + {"tulip_pink", "mcl_flowers:tulip_pink", S("Pink Tulip Flower Pot")}, + {"tulip_white", "mcl_flowers:tulip_white", S("White Tulip Flower Pot")}, + {"tulip_orange", "mcl_flowers:tulip_orange", S("Orange Tulip Flower Pot")}, + {"oxeye_daisy", "mcl_flowers:oxeye_daisy", S("Oxeye Daisy Flower Pot")}, + {"mushroom_brown", "mcl_mushrooms:mushroom_brown", S("Brown Mushroom Flower Pot")}, + {"mushroom_red", "mcl_mushrooms:mushroom_red", S("Red Mushroom Flower Pot")}, + {"sapling", "mcl_core:sapling", S("Oak Sapling Flower Pot")}, + {"acaciasapling", "mcl_core:acaciasapling", S("Acacia Sapling Flower Pot")}, + {"junglesapling", "mcl_core:junglesapling", S("Jungle Sapling Flower Pot")}, + {"darksapling", "mcl_core:darksapling", S("Dark Oak Sapling Flower Pot")}, + {"sprucesapling", "mcl_core:sprucesapling", S("Spruce Sapling Flower Pot")}, + {"birchsapling", "mcl_core:birchsapling", S("Birch Sapling Flower Pot")}, + {"deadbush", "mcl_core:deadbush", S("Dead Bush Flower Pot")}, + {"fern", "mcl_flowers:fern", S("Fern Flower Pot"), {"mcl_flowers_fern_inv.png"}}, } local cubes = { @@ -27,9 +28,9 @@ local cubes = { } minetest.register_node("mcl_flowerpots:flower_pot", { - description = "Flower Pot", - _doc_items_longdesc = "Flower pots are decorational blocks in which flowers and other small plants can be placed.", - _doc_items_usagehelp = "Rightclick an empty flower pot while you wield a plant to place the plant. Flower pots can hold small flowers (not higher than 1 block), saplings, ferns, dead bushes, mushrooms and cacti. Rightclick a potted plant to retrieve the plant.", + description = S("Flower Pot"), + _doc_items_longdesc = S("Flower pots are decorational blocks in which flowers and other small plants can be placed."), + _doc_items_usagehelp = S("Rightclick an empty flower pot while you wield a plant to place the plant. Flower pots can hold small flowers (not higher than 1 block), saplings, ferns, dead bushes, mushrooms and cacti. Rightclick a potted plant to retrieve the plant."), drawtype = "mesh", mesh = "flowerpot.obj", tiles = {