From 805fa7628283e85459a5b4606166595f91d71b01 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 16 Mar 2019 04:04:41 +0100 Subject: [PATCH] Inventory: Translate tab captions --- mods/HUD/mcl_inventory/creative.lua | 50 ++++++++++++------ .../textures/mcl_inventory_fnt_blocks.png | Bin 227 -> 0 bytes .../textures/mcl_inventory_fnt_brew.png | Bin 169 -> 0 bytes .../textures/mcl_inventory_fnt_combat.png | Bin 182 -> 0 bytes .../textures/mcl_inventory_fnt_deco.png | Bin 225 -> 0 bytes .../textures/mcl_inventory_fnt_food.png | Bin 225 -> 0 bytes .../textures/mcl_inventory_fnt_matr.png | Bin 200 -> 0 bytes .../textures/mcl_inventory_fnt_misc.png | Bin 215 -> 0 bytes .../textures/mcl_inventory_fnt_mobs.png | Bin 158 -> 0 bytes .../textures/mcl_inventory_fnt_nix.png | Bin 221 -> 0 bytes .../textures/mcl_inventory_fnt_rail.png | Bin 223 -> 0 bytes .../textures/mcl_inventory_fnt_redstone.png | Bin 174 -> 0 bytes .../textures/mcl_inventory_fnt_tools.png | Bin 174 -> 0 bytes 13 files changed, 33 insertions(+), 17 deletions(-) delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_blocks.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_brew.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_combat.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_deco.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_food.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_matr.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_misc.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_mobs.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_nix.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_rail.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_redstone.png delete mode 100644 mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_tools.png diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index 1df142388..f3074894a 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -162,6 +162,7 @@ local noffset = {} -- numeric tab offset local offset = {} -- string offset: local boffset = {} -- local hoch = {} +local filtername = {} local bg = {} local noffset_x_start = -0.24 @@ -216,6 +217,21 @@ hoch["mobs"] = "^[transformfy" hoch["matr"] = "^[transformfy" hoch["inv"] = "^[transformfy" +filtername = {} +filtername["blocks"] = S("Building Blocks") +filtername["deco"] = S("Decoration Blocks") +filtername["redstone"] = S("Redstone") +filtername["rail"] = S("Transportation") +filtername["misc"] = S("Miscellaneous") +filtername["nix"] = S("Search Items") +filtername["food"] = S("Foodstuffs") +filtername["tools"] = S("Tools") +filtername["combat"] = S("Combat") +filtername["mobs"] = S("Mobs") +--filtername["brew"] = S("Brewing") -- TODO: add brew +filtername["matr"] = S("Materials") +filtername["inv"] = S("Survival Inventory") + local dark_bg = "crafting_creative_bg_dark.png" local function reset_menu_item_bg() @@ -375,9 +391,9 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz "image[" .. offset[this_tab] .. ";1.5,1.44;" .. bg_img .. hoch[this_tab].. "]" .. "image[" .. boffset[this_tab] .. ";1,1;crafting_creative_marker.png]" end - local fnt = "" - if name ~= "inv" then - fnt = "image[0,1;5,0.75;mcl_inventory_fnt_"..name..".png]" + local caption = "" + if name ~= "inv" and filtername[name] then + caption = "label[0,1.1;"..F(minetest.colorize("#313131", filtername[name])).."]" end formspec = "size[10,9.3]".. @@ -385,35 +401,35 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz "background[-0.19,-0.25;10.5,9.87;"..inv_bg.."]".. "label[-5,-5;"..name.."]".. tab(name, "blocks") .. - "tooltip[blocks;"..F(S("Building Blocks")).."]".. + "tooltip[blocks;"..F(filtername["blocks"]).."]".. tab(name, "deco") .. - "tooltip[deco;"..F(S("Decoration Blocks")).."]".. + "tooltip[deco;"..F(filtername["deco"]).."]".. tab(name, "redstone") .. - "tooltip[redstone;"..F(S("Redstone")).."]".. + "tooltip[redstone;"..F(filtername["redstone"]).."]".. tab(name, "rail") .. - "tooltip[rail;"..F(S("Transportation")).."]".. + "tooltip[rail;"..F(filtername["rail"]).."]".. tab(name, "misc") .. - "tooltip[misc;"..F(S("Miscellaneous")).."]".. + "tooltip[misc;"..F(filtername["misc"]).."]".. tab(name, "nix") .. - "tooltip[nix;"..F(S("Search Items")).."]".. - fnt.. + "tooltip[nix;"..F(filtername["nix"]).."]".. + caption.. "list[current_player;main;0,7;9,1;]".. main_list.. tab(name, "food") .. - "tooltip[food;"..F(S("Foodstuffs")).."]".. + "tooltip[food;"..F(filtername["food"]).."]".. tab(name, "tools") .. - "tooltip[tools;"..F(S("Tools")).."]".. + "tooltip[tools;"..F(filtername["tools"]).."]".. tab(name, "combat") .. - "tooltip[combat;"..F(S("Combat")).."]".. + "tooltip[combat;"..F(filtername["combat"]).."]".. tab(name, "mobs") .. - "tooltip[mobs;"..F(S("Mobs")).."]".. + "tooltip[mobs;"..F(filtername["mobs"]).."]".. -- TODO: Add brew --tab(name, "brew") .. - --"tooltip[brew;"..F(S("Brewing")).."]".. + --"tooltip[brew;"..F(filtername["brew"]).."]".. tab(name, "matr") .. - "tooltip[matr;"..F(S("Materials")).."]".. + "tooltip[matr;"..F(filtername["matr"]).."]".. tab(name, "inv") .. - "tooltip[inv;"..F(S("Survival Inventory")).."]".. + "tooltip[inv;"..F(filtername["inv"]).."]".. "list[detached:trash;main;9,7;1,1;]".. "image[9,7;1,1;crafting_creative_trash.png]".. listrings diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_blocks.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_blocks.png deleted file mode 100644 index 7bd45b455126cc04093930b34c13df42fc017c9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmV<90382`P)i_@%19VbOQvm+}X;L|?0001nNkl&DWc$xq5xF!g(3=~SY5YVQM4%FXHFXwtx&b;@eHaHMTdfGQ1G37 dMHC_YhZ|U(?4h@@L5=_b002ovPDHLkV1iz$QBME> diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_brew.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_brew.png deleted file mode 100644 index 9664aebb0c22daf9228b39e27de7b67b24989e77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 169 zcmV;a09OBrP)700006P)t-s0000n zF)i_@%19VbOQvm+}X;L|?0001lNkl01Xev}Z z>x$1v*>2}9;g#zuQ~=ay030gi_@%19VbOQvm+}X;L|?0001lNklo_NrLa(WOv9xg=jaiXSLg->+Lm bKO!P;Xd_&*uu8&=00000NkvXXu0mjfDtuVs diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_matr.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_matr.png deleted file mode 100644 index ef426a2a7234c5e2dfdd108ae69bb96bc3bcb57f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmV;(05|`MP)i_@%19VbOQvm+}X;L|?0001MNklv9P8ebnJN)C2!T0$tXt%tbw}K-s_G4T0jM9*pEJ4u00007P)i_@%19VbOQvm+}X;L|?0001bNkl92Z@Hecb0&$r>g8BIawYwJ*qm5q)Kc REB^oh002ovPDHLkV1kSUPF4T_ diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_mobs.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_mobs.png deleted file mode 100644 index 26308b6163c30b129c7c81cd56531138db75cbf1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 158 zcmV;P0Ac@$P)700006P)t-s=!P~i zF);?bNmwcyeGoBhM z(R{%F#qPA|hoM{grIb=i1yG;D8~id0u}Dzg;yGMSgy>Dap46Nrzyq2DHi-}?+-A@C z;_SM;{G9fQ5V%aFJSPDl0BjN=T;QX(^CTu*ED<5*-{4$#zx!jL0m1;aK!o_Wlv26_ XSVjVV$ucrP00000NkvXXu0mjf!!A~0 diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_rail.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_rail.png deleted file mode 100644 index f52fd1bf3eeffcfba51e662317d22e70161ecaf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 223 zcmV<503iQ~P)i_@%19VbOQvm+}X;L|?0001jNklWyOi2 zIywg@4||zd9>(757fLCm6aX}UOem=0PeopvD^$h00&zZY4rj7=hCCv(q^RP0Mp)^I zXo%P5l(*SYRG|ZaXRq;7>I$m3RpFE~Dat+TUPTqTZh-8stoTzptBM`PSI~fgqKYR_ Z${Ug>YTR#1<;eg5002ovPDHLkV1lx%RyF_t diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_redstone.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_redstone.png deleted file mode 100644 index e47fc8813bf27dfd45e20fb4681d7457608e468a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 174 zcmV;f08#&mP)700006P)t-s0000n zF)}HcF9jGJ zL{NCSuIqQ2OeE=ILHG-ysVP*XK96;RFjGkSUSXq92=yy;rC|1~SCDKJbwi_@%19VbOQvm+}X;L|?0000{NkleS zh%1rb97IG!=!lxsQgOB-ZFw7o3LxcUg)0;)QcC$?y@f(W0QXR+=-?WKiU3L;EctE~ cS0f_Q0NehWbkoa&Y5)KL07*qoM6N<$f~iJ3G5`Po