From cbf7bee93af73f0c5fc3098a81149fb3b884b91b Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Mon, 30 May 2016 12:30:00 +0100 Subject: [PATCH] Added intllib support (thanks Xanthin) --- barley.lua | 6 ++- beanpole.lua | 6 ++- blueberry.lua | 6 ++- carrot.lua | 6 ++- cocoa.lua | 8 ++-- coffee.lua | 10 +++-- corn.lua | 8 ++-- cotton.lua | 6 ++- cucumber.lua | 4 +- depends.txt | 3 +- donut.lua | 11 +++-- grapes.lua | 6 ++- hoes.lua | 14 +++--- init.lua | 13 +++++- locale/de.txt | 104 ++++++++++++++++++++++++++++++++++++++++++++ locale/template.txt | 102 +++++++++++++++++++++++++++++++++++++++++++ melon.lua | 6 ++- potato.lua | 6 ++- pumpkin.lua | 13 +++--- raspberry.lua | 6 ++- rhubarb.lua | 6 ++- soil.lua | 7 ++- sugar.lua | 4 +- tomato.lua | 4 +- wheat.lua | 12 ++--- 25 files changed, 318 insertions(+), 59 deletions(-) create mode 100644 locale/de.txt create mode 100644 locale/template.txt diff --git a/barley.lua b/barley.lua index d69b0ba..b7bf530 100644 --- a/barley.lua +++ b/barley.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- barley seeds minetest.register_node("farming:seed_barley", { - description = "Barley Seed", + description = S("Barley Seed"), tiles = {"farming_barley_seed.png"}, inventory_image = "farming_barley_seed.png", wield_image = "farming_barley_seed.png", @@ -19,7 +21,7 @@ minetest.register_node("farming:seed_barley", { -- harvested barley minetest.register_craftitem("farming:barley", { - description = "barley", + description = S("Barley"), inventory_image = "farming_barley.png", }) diff --git a/beanpole.lua b/beanpole.lua index cda736f..cef2767 100644 --- a/beanpole.lua +++ b/beanpole.lua @@ -4,9 +4,11 @@ CC-BY-SA-3.0 ]] +local S = farming.intllib + -- beans minetest.register_craftitem("farming:beans", { - description = "Green Beans", + description = S("Green Beans"), inventory_image = "farming_beans.png", on_use = minetest.item_eat(1), @@ -56,7 +58,7 @@ minetest.register_craft({ -- beanpole minetest.register_node("farming:beanpole", { - description = "Bean Pole (place on soil before planting beans)", + description = S("Bean Pole (place on soil before planting beans)"), drawtype = "plantlike", tiles = {"farming_beanpole.png"}, inventory_image = "farming_beanpole.png", diff --git a/blueberry.lua b/blueberry.lua index 6a29ba9..82ce7ff 100644 --- a/blueberry.lua +++ b/blueberry.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- blueberries minetest.register_craftitem("farming:blueberries", { - description = "Blueberries", + description = S("Blueberries"), inventory_image = "farming_blueberries.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1") @@ -12,7 +14,7 @@ minetest.register_craftitem("farming:blueberries", { -- blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image) minetest.register_craftitem("farming:muffin_blueberry", { - description = "Blueberry Muffin", + description = S("Blueberry Muffin"), inventory_image = "farming_blueberry_muffin.png", on_use = minetest.item_eat(2), }) diff --git a/carrot.lua b/carrot.lua index cecaae7..9cfcee0 100644 --- a/carrot.lua +++ b/carrot.lua @@ -4,9 +4,11 @@ https://forum.minetest.net/viewtopic.php?id=4990 ]] +local S = farming.intllib + -- carrot minetest.register_craftitem("farming:carrot", { - description = "Carrot", + description = S("Carrot"), inventory_image = "farming_carrot.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1") @@ -16,7 +18,7 @@ minetest.register_craftitem("farming:carrot", { -- golden carrot minetest.register_craftitem("farming:carrot_gold", { - description = "Golden Carrot", + description = S("Golden Carrot"), inventory_image = "farming_carrot_gold.png", on_use = minetest.item_eat(6), }) diff --git a/cocoa.lua b/cocoa.lua index a11a611..860807a 100644 --- a/cocoa.lua +++ b/cocoa.lua @@ -1,4 +1,6 @@ +local S = farming.intllib + -- place cocoa function place_cocoa(itemstack, placer, pointed_thing, plantname) @@ -48,7 +50,7 @@ end -- cocoa beans minetest.register_craftitem("farming:cocoa_beans", { - description = "Cocoa Beans", + description = S("Cocoa Beans"), inventory_image = "farming_cocoa_beans.png", on_place = function(itemstack, placer, pointed_thing) return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1") @@ -64,7 +66,7 @@ minetest.register_craft( { -- chocolate cookie minetest.register_craftitem("farming:cookie", { - description = "Cookie", + description = S("Cookie"), inventory_image = "farming_cookie.png", on_use = minetest.item_eat(2), }) @@ -78,7 +80,7 @@ minetest.register_craft( { -- bar of dark chocolate (thanks to Ice Pandora for her deviantart.com chocolate tutorial) minetest.register_craftitem("farming:chocolate_dark", { - description = "Bar of Dark Chocolate", + description = S("Bar of Dark Chocolate"), inventory_image = "farming_chocolate_dark.png", on_use = minetest.item_eat(3), }) diff --git a/coffee.lua b/coffee.lua index c9854e6..f9632d2 100644 --- a/coffee.lua +++ b/coffee.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- coffee minetest.register_craftitem("farming:coffee_beans", { - description = "Coffee Beans", + description = S("Coffee Beans"), inventory_image = "farming_coffee_beans.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1") @@ -11,7 +13,7 @@ minetest.register_craftitem("farming:coffee_beans", { -- drinking cup minetest.register_node("farming:drinking_cup", { - description = "Drinking Cup (empty)", + description = S("Drinking Cup (empty)"), drawtype = "plantlike", tiles = {"vessels_drinking_cup.png"}, inventory_image = "vessels_drinking_cup.png", @@ -36,7 +38,7 @@ minetest.register_craft( { -- cold cup of coffee minetest.register_node("farming:coffee_cup", { - description = "Cold Cup of Coffee", + description = S("Cold Cup of Coffee"), drawtype = "plantlike", tiles = {"farming_coffee_cup.png"}, inventory_image = "farming_coffee_cup.png", @@ -69,7 +71,7 @@ minetest.register_craft({ -- hot cup of coffee minetest.register_node("farming:coffee_cup_hot", { - description = "Hot Cup of Coffee", + description = S("Hot Cup of Coffee"), drawtype = "plantlike", tiles = {"farming_coffee_cup_hot.png"}, inventory_image = "farming_coffee_cup_hot.png", diff --git a/corn.lua b/corn.lua index 4370757..f178a48 100644 --- a/corn.lua +++ b/corn.lua @@ -4,9 +4,11 @@ http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1440575-1-2-5-generation-minecraft-beta-1-2-farming-and ]] +local S = farming.intllib + -- corn minetest.register_craftitem("farming:corn", { - description = "Corn", + description = S("Corn"), inventory_image = "farming_corn.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1") @@ -16,7 +18,7 @@ minetest.register_craftitem("farming:corn", { -- corn on the cob (texture by TenPlus1) minetest.register_craftitem("farming:corn_cob", { - description = "Corn on the Cob", + description = S("Corn on the Cob"), inventory_image = "farming_corn_cob.png", on_use = minetest.item_eat(5), }) @@ -30,7 +32,7 @@ minetest.register_craft({ -- ethanol (thanks to JKMurray for this idea) minetest.register_craftitem("farming:bottle_ethanol", { - description = "Bottle of Ethanol", + description = S("Bottle of Ethanol"), inventory_image = "farming_bottle_ethanol.png", }) diff --git a/cotton.lua b/cotton.lua index 2ddf88e..b3e131b 100644 --- a/cotton.lua +++ b/cotton.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- cotton seeds minetest.register_node("farming:seed_cotton", { - description = "Cotton Seed", + description = S("Cotton Seed"), tiles = {"farming_cotton_seed.png"}, inventory_image = "farming_cotton_seed.png", wield_image = "farming_cotton_seed.png", @@ -20,7 +22,7 @@ minetest.register_node("farming:seed_cotton", { -- cotton / string minetest.register_craftitem("farming:cotton", { - description = "Cotton", + description = S("Cotton"), inventory_image = "farming_cotton.png", }) diff --git a/cucumber.lua b/cucumber.lua index 22e367b..8e29215 100644 --- a/cucumber.lua +++ b/cucumber.lua @@ -4,9 +4,11 @@ https://forum.minetest.net/viewtopic.php?id=3948 ]] +local S = farming.intllib + -- cucumber minetest.register_craftitem("farming:cucumber", { - description = "Cucumber", + description = S("Cucumber"), inventory_image = "farming_cucumber.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1") diff --git a/depends.txt b/depends.txt index be420a3..8c4c21f 100644 --- a/depends.txt +++ b/depends.txt @@ -1,2 +1,3 @@ default -wool \ No newline at end of file +wool +intllib? diff --git a/donut.lua b/donut.lua index 1b49848..68aeb8e 100644 --- a/donut.lua +++ b/donut.lua @@ -1,6 +1,9 @@ + +local S = farming.intllib + -- Donut (thanks to Bockwurst for making the donut images) minetest.register_craftitem("farming:donut", { - description = "Donut", + description = S("Donut"), inventory_image = "farming_donut.png", on_use = minetest.item_eat(4), }) @@ -16,7 +19,7 @@ minetest.register_craft({ -- Chocolate Donut minetest.register_craftitem("farming:donut_chocolate", { - description = "Chocolate Donut", + description = S("Chocolate Donut"), inventory_image = "farming_donut_chocolate.png", on_use = minetest.item_eat(6), }) @@ -31,7 +34,7 @@ minetest.register_craft({ -- Apple Donut minetest.register_craftitem("farming:donut_apple", { - description = "Apple Donut", + description = S("Apple Donut"), inventory_image = "farming_donut_apple.png", on_use = minetest.item_eat(6), }) @@ -42,4 +45,4 @@ minetest.register_craft({ {'default:apple'}, {'farming:donut'}, } -}) \ No newline at end of file +}) diff --git a/grapes.lua b/grapes.lua index 9c93016..7a3bfc5 100644 --- a/grapes.lua +++ b/grapes.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- grapes minetest.register_craftitem("farming:grapes", { - description = "Grapes", + description = S("Grapes"), inventory_image = "farming_grapes.png", on_use = minetest.item_eat(2), @@ -51,7 +53,7 @@ minetest.register_craft({ -- trellis minetest.register_node("farming:trellis", { - description = "Trellis (place on soil before planting grapes)", + description = S("Trellis (place on soil before planting grapes)"), drawtype = "plantlike", tiles = {"farming_trellis.png"}, inventory_image = "farming_trellis.png", diff --git a/hoes.lua b/hoes.lua index ef27d42..dab2ac9 100644 --- a/hoes.lua +++ b/hoes.lua @@ -1,4 +1,6 @@ +local S = farming.intllib + -- Hoe registration function farming.register_hoe = function(name, def) @@ -109,42 +111,42 @@ end -- Define Hoes farming.register_hoe(":farming:hoe_wood", { - description = "Wooden Hoe", + description = S("Wooden Hoe"), inventory_image = "farming_tool_woodhoe.png", max_uses = 30, material = "group:wood" }) farming.register_hoe(":farming:hoe_stone", { - description = "Stone Hoe", + description = S("Stone Hoe"), inventory_image = "farming_tool_stonehoe.png", max_uses = 90, material = "group:stone" }) farming.register_hoe(":farming:hoe_steel", { - description = "Steel Hoe", + description = S("Steel Hoe"), inventory_image = "farming_tool_steelhoe.png", max_uses = 200, material = "default:steel_ingot" }) farming.register_hoe(":farming:hoe_bronze", { - description = "Bronze Hoe", + description = S("Bronze Hoe"), inventory_image = "farming_tool_bronzehoe.png", max_uses = 220, material = "default:bronze_ingot" }) farming.register_hoe(":farming:hoe_mese", { - description = "Mese Hoe", + description = S("Mese Hoe"), inventory_image = "farming_tool_mesehoe.png", max_uses = 350, material = "default:mese_crystal" }) farming.register_hoe(":farming:hoe_diamond", { - description = "Diamond Hoe", + description = S("Diamond Hoe"), inventory_image = "farming_tool_diamondhoe.png", max_uses = 500, material = "default:diamond" diff --git a/init.lua b/init.lua index a7b1ceb..8e40478 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,5 @@ --[[ - Minetest Farming Redo Mod 1.22 (26th May 2016) + Minetest Farming Redo Mod 1.22 (30th May 2016) by TenPlus1 NEW growing routine by prestidigitator auto-refill by crabman77 @@ -49,6 +49,15 @@ end local statistics = dofile(farming.path.."/statistics.lua") +-- Intllib +local S +if minetest.get_modpath("intllib") then + S = intllib.Getter() +else + S = function(s) return s end +end +farming.intllib = S + dofile(farming.path.."/soil.lua") dofile(farming.path.."/hoes.lua") dofile(farming.path.."/grass.lua") @@ -611,7 +620,7 @@ farming.register_plant = function(name, def) -- Check def table if not def.description then - def.description = "Seed" + def.description = S("Seed") end if not def.inventory_image then diff --git a/locale/de.txt b/locale/de.txt new file mode 100644 index 0000000..82cee4f --- /dev/null +++ b/locale/de.txt @@ -0,0 +1,104 @@ +# German Translation for farming mod +# Deutsche Übersetzung der farming Mod +# last update: 2016/March/31 +# Author: Xanthin + +#init.lua +Seed = Saatgut + +#barley.lua +Barley Seed = Gerstenkörner +Barley = Gerste + +#beanpole.lua +Green Beans = Grüne Bohnen +Bean Pole (place on soil before planting beans) = Bohnenstange (vor dem Pflanzen der Bohnen auf den\nAckerboden stellen) + +#blueberry.lua +Blueberries = Blaubeeren +Blueberry Muffin = Blaubeermuffin + +#carrot.lua +Carrot = Möhre +Golden Carrot = Goldene Möhre + +#cocoa.lua +Cocoa Beans = Kakaobohne +Cookie = Keks +Bar of Dark Chocolate = Tafel Zartbitterschokolade + +#coffee.lua +Coffee Beans = Kaffeebohnen +Drinking Cup (empty) = Tasse (leer) +Cold Cup of Coffee = Kalte Tasse Kaffee +Hot Cup of Coffee = Heiße Tasse Kaffee + +#corn.lua +Corn = Mais +Corn on the Cob = Maiskolben +Bottle of Ethanol = Flasche Ethanol + +#cotton.lua +Cotton Seed = Baumwollsamen +Cotton = Baumwolle + +#cucumber.lua +Cucumber = Gurke + +#donut.lua +Donut = Donut +Chocolate Donut = Schokodonut +Apple Donut = Apfeldonut + +#grapes.lua +Grapes = Weintrauben +Trellis (place on soil before planting grapes) = Spalier (vor dem Pflanzen der Weintrauben auf den\nAckerboden stellen) + +#hoes.lua +Hoe = Hacke +Wooden Hoe = Holzhacke +Stone Hoe = Steinhacke +Steel Hoe = Stahlhacke +Bronze Hoe = Bronzehacke +Mese Hoe = Mesehacke +Diamond Hoe = Diamanthacke + +#melon.lua +Melon Slice = Melonenscheibe +Melon = Melone + +#potato.lua +Potato = Kartoffel +Baked Potato = Ofenkartoffel + +#pumpkin.lua +Pumpkin = Kürbis +Pumpkin Slice = Kürbisscheibe +Jack 'O Lantern = Kürbislaterne +Pumpkin Bread = Kürbisbrot +Pumpkin Dough = Kürbisteig + +#rasperry.lua +Raspberries = Himbeeren +Raspberry Smoothie = Himbeersmoothie + +#rhubarb.lua +Rhubarb = Rhabarber +Rhubarb Pie = Rhabarberkuchen + +#soil.lua +Soil = Ackerboden +Wet Soil = Bewässerter Ackerboden + +#sugar.lua +Sugar = Zucker + +#tomato.lua +Tomato = Tomate + +#wheat.lua +Wheat Seed = Weizenkörner +Wheat = Weizen +Straw = Stroh +Flour = Mehl +Bread = Brot \ No newline at end of file diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..6d067f5 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,102 @@ +# Template for translations of farming mod +# last update: 2016/March/31 + +#init.lua +Seed = + +#barley.lua +Barley Seed = +Barley = + +#beanpole.lua +Green Beans = +Bean Pole (place on soil before planting beans) = + +#blueberry.lua +Blueberries = +Blueberry Muffin = + +#carrot.lua +Carrot = +Golden Carrot = + +#cocoa.lua +Cocoa Beans = +Cookie = +Bar of Dark Chocolate = + +#coffee.lua +Coffee Beans = +Drinking Cup (empty) = +Cold Cup of Coffee = +Hot Cup of Coffee = + +#corn.lua +Corn = +Corn on the Cob = +Bottle of Ethanol = + +#cotton.lua +Cotton Seed = +Cotton = + +#cucumber.lua +Cucumber = + +#donut.lua +Donut = +Chocolate Donut = +Apple Donut = + +#grapes.lua +Grapes = +Trellis (place on soil before planting grapes) = + +#hoes.lua +Hoe = +Wooden Hoe = +Stone Hoe = +Steel Hoe = +Bronze Hoe = +Mese Hoe = +Diamond Hoe = + +#melon.lua +Melon Slice = +Melon = + +#potato.lua +Potato = +Baked Potato = + +#pumpkin.lua +Pumpkin = +Pumpkin Slice = +Jack 'O Lantern = +Pumpkin Bread = +Pumpkin Dough = + +#rasperry.lua +Raspberries = +Raspberry Smoothie = + +#rhubarb.lua +Rhubarb = +Rhubarb Pie = + +#soil.lua +Soil = +Wet Soil = + +#sugar.lua +Sugar = + +#tomato.lua +Tomato = + +#wheat.lua +Wheat Seed = +Wheat = +Straw = +Flour = +Bread = \ No newline at end of file diff --git a/melon.lua b/melon.lua index a35d450..e2f6564 100644 --- a/melon.lua +++ b/melon.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- melon minetest.register_craftitem("farming:melon_slice", { - description = "Melon Slice", + description = S("Melon Slice"), inventory_image = "farming_melon_slice.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1") @@ -71,7 +73,7 @@ minetest.register_node("farming:melon_7", table.copy(crop_def)) -- stage 8 (final) crop_def.drawtype = "nodebox" -crop_def.description = "Melon" +crop_def.description = S("Melon") crop_def.tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png"} crop_def.selection_box = {-.5, -.5, -.5, .5, .5, .5} crop_def.walkable = true diff --git a/potato.lua b/potato.lua index 12a7c6a..be36905 100644 --- a/potato.lua +++ b/potato.lua @@ -4,9 +4,11 @@ https://forum.minetest.net/viewtopic.php?id=3948 ]] +local S = farming.intllib + -- potato minetest.register_craftitem("farming:potato", { - description = "Potato", + description = S("Potato"), inventory_image = "farming_potato.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") @@ -16,7 +18,7 @@ minetest.register_craftitem("farming:potato", { -- baked potato minetest.register_craftitem("farming:baked_potato", { - description = "Baked Potato", + description = S("Baked Potato"), inventory_image = "farming_baked_potato.png", on_use = minetest.item_eat(6), }) diff --git a/pumpkin.lua b/pumpkin.lua index e443d66..ebbbd87 100644 --- a/pumpkin.lua +++ b/pumpkin.lua @@ -3,9 +3,11 @@ Big thanks to PainterlyPack.net for allowing me to use these textures ]] +local S = farming.intllib + -- pumpkin minetest.register_node("farming:pumpkin", { - description = "Pumpkin", + description = S("Pumpkin"), tiles = { "farming_pumpkin_top.png", "farming_pumpkin_top.png", @@ -25,7 +27,7 @@ minetest.register_node("farming:pumpkin", { -- pumpkin slice minetest.register_craftitem("farming:pumpkin_slice", { - description = "Pumpkin Slice", + description = S("Pumpkin Slice"), inventory_image = "farming_pumpkin_slice.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1") @@ -51,7 +53,7 @@ minetest.register_craft({ -- jack 'o lantern minetest.register_node("farming:jackolantern", { - description = "Jack 'O Lantern", + description = S("Jack 'O Lantern"), tiles = { "farming_pumpkin_top.png", "farming_pumpkin_top.png", @@ -70,7 +72,6 @@ minetest.register_node("farming:jackolantern", { }) minetest.register_node("farming:jackolantern_on", { - description = "Jack 'O Lantern", tiles = { "farming_pumpkin_top.png", "farming_pumpkin_top.png", @@ -101,13 +102,13 @@ minetest.register_craft({ -- pumpkin bread minetest.register_craftitem("farming:pumpkin_bread", { - description = ("Pumpkin Bread"), + description = S("Pumpkin Bread"), inventory_image = "farming_pumpkin_bread.png", on_use = minetest.item_eat(8) }) minetest.register_craftitem("farming:pumpkin_dough", { - description = "Pumpkin Dough", + description = S("Pumpkin Dough"), inventory_image = "farming_pumpkin_dough.png", }) diff --git a/raspberry.lua b/raspberry.lua index 51d10cc..384eb59 100644 --- a/raspberry.lua +++ b/raspberry.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- raspberries minetest.register_craftitem("farming:raspberries", { - description = "Raspberries", + description = S("Raspberries"), inventory_image = "farming_raspberries.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") @@ -11,7 +13,7 @@ minetest.register_craftitem("farming:raspberries", { -- raspberry smoothie minetest.register_craftitem("farming:smoothie_raspberry", { - description = "Raspberry Smoothie", + description = S("Raspberry Smoothie"), inventory_image = "farming_raspberry_smoothie.png", on_use = minetest.item_eat(2, "vessels:drinking_glass"), }) diff --git a/rhubarb.lua b/rhubarb.lua index c93b058..30e9fba 100644 --- a/rhubarb.lua +++ b/rhubarb.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- rhubarb minetest.register_craftitem("farming:rhubarb", { - description = "Rhubarb", + description = S("Rhubarb"), inventory_image = "farming_rhubarb.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1") @@ -11,7 +13,7 @@ minetest.register_craftitem("farming:rhubarb", { -- rhubarb pie minetest.register_craftitem("farming:rhubarb_pie", { - description = "Rhubarb Pie", + description = S("Rhubarb Pie"), inventory_image = "farming_rhubarb_pie.png", on_use = minetest.item_eat(6), }) diff --git a/soil.lua b/soil.lua index e748d5c..2b8c6b2 100644 --- a/soil.lua +++ b/soil.lua @@ -1,6 +1,9 @@ + +local S = farming.intllib + -- normal soil minetest.register_node("farming:soil", { - description = "Soil", + description = S("Soil"), tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"}, drop = "default:dirt", groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2}, @@ -9,7 +12,7 @@ minetest.register_node("farming:soil", { -- wet soil minetest.register_node("farming:soil_wet", { - description = "Wet Soil", + description = S("Wet Soil"), tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"}, drop = "default:dirt", groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3}, diff --git a/sugar.lua b/sugar.lua index efc92ef..97efc67 100644 --- a/sugar.lua +++ b/sugar.lua @@ -1,8 +1,10 @@ +local S = farming.intllib + --= Sugar minetest.register_craftitem("farming:sugar", { - description = "Sugar", + description = S("Sugar"), inventory_image = "farming_sugar.png", }) diff --git a/tomato.lua b/tomato.lua index 9cff4a7..1ed7870 100644 --- a/tomato.lua +++ b/tomato.lua @@ -4,9 +4,11 @@ http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288375-food-plus-mod-more-food-than-you-can-imagine-v2-9) ]] +local S = farming.intllib + -- tomato minetest.register_craftitem("farming:tomato", { - description = "Tomato", + description = S("Tomato"), inventory_image = "farming_tomato.png", on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1") diff --git a/wheat.lua b/wheat.lua index c19ac27..65e5ce6 100644 --- a/wheat.lua +++ b/wheat.lua @@ -1,7 +1,9 @@ +local S = farming.intllib + -- wheat seeds minetest.register_node("farming:seed_wheat", { - description = "Wheat Seed", + description = S("Wheat Seed"), tiles = {"farming_wheat_seed.png"}, inventory_image = "farming_wheat_seed.png", wield_image = "farming_wheat_seed.png", @@ -19,13 +21,13 @@ minetest.register_node("farming:seed_wheat", { -- harvested wheat minetest.register_craftitem("farming:wheat", { - description = "Wheat", + description = S("Wheat"), inventory_image = "farming_wheat.png", }) -- straw minetest.register_node("farming:straw", { - description = "Straw", + description = S("Straw"), tiles = {"farming_straw.png"}, is_ground_content = false, groups = {snappy = 3, flammable = 4}, @@ -50,7 +52,7 @@ minetest.register_craft({ -- flour minetest.register_craftitem("farming:flour", { - description = "Flour", + description = S("Flour"), inventory_image = "farming_flour.png", }) @@ -62,7 +64,7 @@ minetest.register_craft({ -- bread minetest.register_craftitem("farming:bread", { - description = "Bread", + description = S("Bread"), inventory_image = "farming_bread.png", on_use = minetest.item_eat(5), })