Add translation support

- Created `locale/template.txt`
- Fixed some typos
- Replace some `print("[pipeworks]"..` with `pipeworks.logger()`
- Removed "You hacker, you" from descriptions
This commit is contained in:
Louis Royer
2020-02-18 17:34:52 +00:00
committed by Vanessa Dannenberg
parent 84d7104c66
commit 62bc13078f
23 changed files with 366 additions and 127 deletions

View File

@ -1,4 +1,5 @@
-- This file supplies the steel pipes
local S = minetest.get_translator("pipeworks")
local REGISTER_COMPATIBILITY = true
@ -35,11 +36,11 @@ for index, connects in ipairs(cconnects) do
end
local pgroups = {snappy = 3, pipe = 1, not_in_creative_inventory = 1}
local pipedesc = "Pipe segement".." "..dump(connects).."... You hacker, you."
local pipedesc = S("Pipe Segment").." "..dump(connects)
if #connects == 0 then
pgroups = {snappy = 3, tube = 1}
pipedesc = "Pipe segment"
pipedesc = S("Pipe Segment")
end
local outimg_e = { "pipeworks_pipe_plain.png" }
@ -140,7 +141,7 @@ if REGISTER_COMPATIBILITY then
drawtype = "airlike",
sunlight_propagates = true,
paramtype = "light",
description = "Pipe Segment (legacy)",
description = S("Pipe Segment (legacy)"),
groups = {not_in_creative_inventory = 1, pipe_to_update = 1},
drop = "pipeworks:pipe_1_empty",
after_place_node = function(pos)