From 62bc13078f4e93993ebf121cc9c74bc31a6e5d90 Mon Sep 17 00:00:00 2001 From: Louis Royer <4259825-lroyer@users.noreply.gitlab.com> Date: Tue, 18 Feb 2020 17:34:52 +0000 Subject: Add translation support - Created `locale/template.txt` - Fixed some typos - Replace some `print("[pipeworks]"..` with `pipeworks.logger()` - Removed "You hacker, you" from descriptions --- trashcan.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'trashcan.lua') diff --git a/trashcan.lua b/trashcan.lua index f6dff50..fb9a788 100644 --- a/trashcan.lua +++ b/trashcan.lua @@ -1,5 +1,6 @@ +local S = minetest.get_translator("pipeworks") minetest.register_node("pipeworks:trashcan", { - description = "Trash Can", + description = S("Trash Can"), drawtype = "normal", tiles = { "pipeworks_trashcan_bottom.png", @@ -22,7 +23,7 @@ minetest.register_node("pipeworks:trashcan", { meta:set_string("formspec", "size[8,7]".. "item_image[0,0;1,1;pipeworks:trashcan]".. - "label[1,0;Trash Can]".. + "label[1,0;"..S("Trash Can").."]".. "list[context;trash;3.5,1;1,1;]".. default.gui_bg.. default.gui_bg_img.. @@ -30,7 +31,7 @@ minetest.register_node("pipeworks:trashcan", { default.get_hotbar_bg(0,3) .. "list[current_player;main;0,3;8,4;]" .. "listring[]") - meta:set_string("infotext", "Trash Can") + meta:set_string("infotext", S("Trash Can")) meta:get_inventory():set_size("trash", 1) end, after_place_node = pipeworks.after_place, -- cgit v1.2.3