diff --git a/chiseling_machine.lua b/chiseling_machine.lua index 6461f60..e57a997 100644 --- a/chiseling_machine.lua +++ b/chiseling_machine.lua @@ -1,9 +1,11 @@ +local S = core.get_translator(core.get_current_modname()) + local max_stack = tonumber(core.settings:get("default_stack_max")) or 99 -- LuaFormatter off local machine_formspec = "" .. "size[8,9]" .. - "label[0,0;Chiseling Machine]" .. + "label[0,0;" .. core.formspec_escape(S("Chiseling Machine")) .. "]" .. "image[2,2;1,1;chisel.png]" .. "list[current_name;src;2,1;1,1;]" .. "list[current_name;dst;5,1;2,2;]" .. @@ -16,7 +18,7 @@ local machine_formspec = "" .. core.register_node( "stripped_tree:chiseling_machine", { - description = "Chiseling machine", + description = S("Chiseling Machine"), tiles = { "chiseling_machine.png", "chiseling_machine.png", diff --git a/functions.lua b/functions.lua index adf5995..cc528b2 100644 --- a/functions.lua +++ b/functions.lua @@ -1,3 +1,5 @@ +local S = core.get_translator(core.get_current_modname()) + stripped_tree = {} -- Select between chisel tool or axes. @@ -49,7 +51,7 @@ function stripped_tree.register_strippable_trunk(trunk_name, plank_name, strippe local trunk_def = core.registered_nodes[trunk_name] local stripped_def = table.copy(trunk_def) - stripped_def.description = "Stripped " .. trunk_def.description + stripped_def.description = S("Stripped @1", trunk_def.description) stripped_def.groups = table.copy(trunk_def.groups) stripped_def.groups.not_in_creative_inventory = 1 stripped_def.tiles = stripped_tiles or { diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..54d99e5 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,5 @@ +# textdomain: stripped_tree +Chiseling Machine= +Stripped @1= +Tree bark= +Chisel for tree trunks= diff --git a/recipes.lua b/recipes.lua index 81932a6..f7d2630 100644 --- a/recipes.lua +++ b/recipes.lua @@ -1,5 +1,7 @@ +local S = core.get_translator(core.get_current_modname()) + -- Register tree bark -core.register_craftitem(":default:tree_bark", {description = "Tree bark", inventory_image = "tree_bark.png"}) +core.register_craftitem(":default:tree_bark", {description = S("Tree bark"), inventory_image = "tree_bark.png"}) -- Register bark as fuel core.register_craft({type = "fuel", recipe = "default:tree_bark", burntime = 15}) @@ -20,7 +22,7 @@ core.register_craft( if stripped_tree.enable_chisel then core.register_tool( "stripped_tree:chisel", { - description = "Chisel for tree trunks", + description = S("Chisel for tree trunks"), inventory_image = "chisel.png", wield_image = "chisel.png", sound = {breaks = "default_tool_breaks"},