diff --git a/tomatoes.lua b/tomatoes.lua index 552ca63..08bdb88 100644 --- a/tomatoes.lua +++ b/tomatoes.lua @@ -1,5 +1,14 @@ +-- Boilerplate to support localized strings if intllib mod is installed. +local S +if (minetest.get_modpath("intllib")) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) +else + S = function ( s ) return s end +end + minetest.register_craftitem("farming_plus:tomato_seed", { - description = "Tomato Seeds", + description = S("Tomato Seeds"), inventory_image = "farming_tomato_seed.png", on_place = function(itemstack, placer, pointed_thing) local above = minetest.env:get_node(pointed_thing.above) @@ -81,7 +90,7 @@ minetest.register_node("farming_plus:tomato", { }) minetest.register_craftitem("farming_plus:tomato_item", { - description = "Tomato", + description = S("Tomato"), inventory_image = "farming_tomato.png", on_use = minetest.item_eat(4), })