New translation system, part 7: Items, part 3

This commit is contained in:
Wuzzy 2019-03-08 00:00:09 +01:00
parent e4fbbeddb2
commit a29626881f
20 changed files with 253 additions and 220 deletions

View file

@ -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