diff options
author | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2020-02-18 17:34:52 +0000 |
---|---|---|
committer | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2020-02-18 17:34:52 +0000 |
commit | 760e9e383c280dfee895150b08f6316cd3f4a70c (patch) | |
tree | 359944bcd77a5ec36a32b1475e2818019e105956 /filter-injector.lua | |
parent | 84d7104c66459d8785b95d2db5cc8f425a499d89 (diff) | |
parent | 62bc13078f4e93993ebf121cc9c74bc31a6e5d90 (diff) | |
download | pipeworks-760e9e383c280dfee895150b08f6316cd3f4a70c.tar pipeworks-760e9e383c280dfee895150b08f6316cd3f4a70c.tar.gz pipeworks-760e9e383c280dfee895150b08f6316cd3f4a70c.tar.bz2 pipeworks-760e9e383c280dfee895150b08f6316cd3f4a70c.tar.xz pipeworks-760e9e383c280dfee895150b08f6316cd3f4a70c.zip |
Merge branch 'mt5-locale' into 'master'
French translation
See merge request VanessaE/pipeworks!16
Diffstat (limited to 'filter-injector.lua')
-rw-r--r-- | filter-injector.lua | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/filter-injector.lua b/filter-injector.lua index 779b69a..5335dad 100644 --- a/filter-injector.lua +++ b/filter-injector.lua @@ -1,3 +1,4 @@ +local S = minetest.get_translator("pipeworks") local fs_helpers = pipeworks.fs_helpers local function delay(x) @@ -5,47 +6,47 @@ local function delay(x) end local function set_filter_infotext(data, meta) - local infotext = data.wise_desc.." Filter-Injector" + local infotext = S("@1 Filter-Injector", data.wise_desc) if meta:get_int("slotseq_mode") == 2 then - infotext = infotext .. " (slot #"..meta:get_int("slotseq_index").." next)" + infotext = infotext .. " "..S("(slot #@1 next)", meta:get_int("slotseq_index")) end meta:set_string("infotext", infotext) end local function set_filter_formspec(data, meta) - local itemname = data.wise_desc.." Filter-Injector" + local itemname = S("@1 Filter-Injector", data.wise_desc) local formspec if data.digiline then formspec = "size[8,2.7]".. "item_image[0,0;1,1;pipeworks:"..data.name.."]".. "label[1,0;"..minetest.formspec_escape(itemname).."]".. - "field[0.3,1.5;8.0,1;channel;Channel;${channel}]".. + "field[0.3,1.5;8.0,1;channel;"..S("Channel")..";${channel}]".. fs_helpers.cycling_button(meta, "button[0,2;4,1", "slotseq_mode", - {"Sequence slots by Priority", - "Sequence slots Randomly", - "Sequence slots by Rotation"}).. + {S("Sequence slots by Priority"), + S("Sequence slots Randomly"), + S("Sequence slots by Rotation")}).. fs_helpers.cycling_button(meta, "button[4,2;4,1", "exmatch_mode", - {"Exact match - off", - "Exact match - on "}) + {S("Exact match - off"), + S("Exact match - on")}) else local exmatch_button = "" if data.stackwise then exmatch_button = fs_helpers.cycling_button(meta, "button[4,3.5;4,1", "exmatch_mode", - {"Exact match - off", - "Exact match - on "}) + {S("Exact match - off"), + S("Exact match - on")}) end formspec = "size[8,8.5]".. "item_image[0,0;1,1;pipeworks:"..data.name.."]".. "label[1,0;"..minetest.formspec_escape(itemname).."]".. - "label[0,1;Prefer item types:]".. + "label[0,1;"..S("Prefer item types:").."]".. "list[context;main;0,1.5;8,2;]".. fs_helpers.cycling_button(meta, "button[0,3.5;4,1", "slotseq_mode", - {"Sequence slots by Priority", - "Sequence slots Randomly", - "Sequence slots by Rotation"}).. + {S("Sequence slots by Priority"), + S("Sequence slots Randomly"), + S("Sequence slots by Rotation")}).. exmatch_button.. "list[current_player;main;0,4.5;8,4;]" .. "listring[]" @@ -348,23 +349,23 @@ end for _, data in ipairs({ { name = "filter", - wise_desc = "Itemwise", + wise_desc = S("Itemwise"), stackwise = false, }, { name = "mese_filter", - wise_desc = "Stackwise", + wise_desc = S("Stackwise"), stackwise = true, }, { -- register even if no digilines name = "digiline_filter", - wise_desc = "Digiline", + wise_desc = S("Digiline"), stackwise = true, digiline = true, }, }) do local node = { - description = data.wise_desc.." Filter-Injector", + description = S("@1 Filter-Injector", data.wise_desc), tiles = { "pipeworks_"..data.name.."_top.png", "pipeworks_"..data.name.."_top.png", |