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 --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index ed93dd5..3034ff3 100644 --- a/init.lua +++ b/init.lua @@ -10,6 +10,7 @@ local DEBUG = false pipeworks.worldpath = minetest.get_worldpath() pipeworks.modpath = minetest.get_modpath("pipeworks") +local S = minetest.get_translator("pipeworks") dofile(pipeworks.modpath.."/default_settings.lua") -- Read the external config file if it exists. @@ -45,7 +46,7 @@ pipeworks.liquid_texture = "default_water.png" pipeworks.button_off = {text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"} pipeworks.button_on = {text="", texture="pipeworks_button_on.png", addopts="false;false;pipeworks_button_interm.png"} pipeworks.button_base = "image_button[0,4.3;1,0.6" -pipeworks.button_label = "label[0.9,4.31;Allow splitting incoming stacks from tubes]" +pipeworks.button_label = "label[0.9,4.31;"..S("Allow splitting incoming stacks from tubes").."]" -- Helper functions -- cgit v1.2.3