From 805fa7628283e85459a5b4606166595f91d71b01 Mon Sep 17 00:00:00 2001
From: Wuzzy <Wuzzy2@mail.ru>
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
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|NsAnhK4WN%o2<v
zUIPW0OM?7@8U8b523f8Fa@#yz978G?-%e>{J7B=$@_jN8PUSv+v2UG6`_6Rleiu2f
z^#V>DiR>av7z|k#8x}D51#Z!33)D_C5jz^``jFR3^oj((YIv>2qKv?R(`y@4^L~U^
z&(rtQT=bxC5kttwRwb@Q5wY82fVv)}`$>ze4cPkfBhM;f*Y>9DfDdzPT}2fCv`a_K
XeY0@;M#ny&ix@mz{an^LB{Ts5Ua3(}

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
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n%^8`2<lS76KR}8tz$e5NNE;d&iu)Qq0J0cM
zg8YIR9G=}s19AdAT^vIy7~h_5WMyy^aK2cw;cxj&zJHw$6J!eno<)~USe|=(AM@Uw
z5kKyQa!t6Xc;!ja(t-xt{C#1GoO52e-s^B)-f)J0=B=IDM@3h}=luW1ko}jV;F;;_
QOrYTmp00i_>zopr0DbE`vH$=8

diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_combat.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_combat.png
deleted file mode 100644
index 0d37d2885b4b6731eea388a96e0e5c8e873ea816..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 182
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|Ns9l+RO|M4exeE
zT>=U+l?3?(Gcc4*K5GHwMR~e7hEy=VJ<Hg3BtXFR;>{;FpTs_8=yVhQaJfP})W)Jd
zd+pY1lSAxI&F!&pYjOL-)7T}nvO4ofqLPYd;abU$YK<%0=BR&q+h^gqB0w<c=vOxz
e)i|J@e~herGZn1Av8e!UVeoYIb6Mw<&;$T5AVHk~

diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_deco.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_deco.png
deleted file mode 100644
index b2a74cf1bdb24e1772b72375b3de34bb20c09a91..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 225
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|NsAnhK4WN%o2<v
zUIPW0OM?7@8U8b523f8Fa$7uI978G?-%ey?b1~#${XVJq<h&x+P?P)Hb9EBjTxV6V
z{XD^`q{L)U=eURK!<^^gNB1f{fB(VE<>-IW12?pke`}<iFMB66n?FM<#O8I^d5@cU
z&-EToeXSM3a3zC5Mw@BI)MZYtyib>uzGD#m&ZTgE*RP4s(^8AiZChpd%<bq_CzmCs
Z#n}&*U3hXOb{o(=44$rjF6*2UngE8WSEc{}

diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_food.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_food.png
deleted file mode 100644
index 12a353f52a5761e0e4ab4458b621d0964f587d34..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 225
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|NsAnhK4WN%o2<v
zUIPW0OM?7@8U8b523f8Fa$7uI978G?-%e>{JM199`g`Ke@4a{HQj5#oGA|quJ9A<C
z_1h;NOgt{@;^K15GcG>Fj(x>M*~#h6POR^LEL|ZG%O$$|O;oc_>b&!o^`Eu=$W|Ad
zXoR%rX+N13P}F*`_{!bY0ggd`LpPfJ4_@)$+p35w7ncS&?o^4l>5|uoxW7Ky)m}*{
ZKSMcY(+00YJwW#`c)I$ztaD0e0sty}Sm6Kw

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
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|NsAnhK4WN%o2<v
zUIPW0OM?7@8U8b523f8Fa<e^M978G?-(F;7V>T3FxENQYXSrPGNdJmUNz7?$_Io~f
zxPR5ERdt-A;T1=Ieos_l`sr3Ny+a_-qJ6>dWekG+!khiBnIG7*K3#d807G%Y;$mi{
ybpkT4?@gYmC1}pkXj!`^`pNuK_d9D>z2dE6Tp@pPzVR-gwG5uFelF{r5}E+=14qgL

diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_misc.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_misc.png
deleted file mode 100644
index fafacc557d6300445578f46843edc2166276bceb..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 215
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|NsAnhK4WN%o2<v
zUIPW0OM?7@8U8b523f8Fa;rRD978G?-(F#4J7OTh_Hgf$m?FQO9q}0vk#b%2QT|IG
zIiFa5_exYYujogfqqDty1UaG}@wU7cjJRy-oFX~De)H-h5{Uwv4ULcY{+TgNLXCxo
zrN!X>rt4=#Gz|T0_ya%9dp$cq)6iQ+Jhq|s&hyZdQmX%yo@KAys(+$Mur{?_`#;bX
N44$rjF6*2UngEOhPF4T_

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
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n%^8`2<lS76KR}8tz$e7@MVpzSp&{EIF9)Cq
zV@Z%-FoVOh8)-m}o2QFoNCo5D(;ImYIPe^H$b0a2`xUmXiFTSXKjoEf$Z0Np-{R(U
zy5%*WBCm_&%uQmPY>Ui==IH<WB+FE?L*wyx+eN>{HEm~4UFf)_!ZaOdB7>)^pUXO@
GgeCyyOEdET

diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_nix.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_nix.png
deleted file mode 100644
index 7ecf77613c0db20cd30c2cb6ed100664e05835df..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 221
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|Ns9l+RO|M4exeE
zT>=U+l?3?(Gcc4*K5GHwHF~-@hEy=Vy~4=W<S5|&QO|OE&GH=Mc~V*zYYzNB`fkgM
z_Jz^EmQD%sVhxyoNcxWv_ePI^`;RPR{90c4?wfaIj_LvCSuAFq0_u0t&i{DyX4l?7
zbG~&7?C@D)qt2+nkRzlR^I-Az&njv$I)aMN?mvhr-~T&#0plTttqv_ewoeJ##T?<r
VRCm(I$N}gW22WQ%mvv4FO#s6#R$>4E

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
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|NsAnhK4WN%o2<v
zUIPW0OM?7@8U8b523f8Fa+^F|978G?-%e>{V|Em9{yq7<`sb;sM>`i;S+T40SI>-)
zJ9h82xR>Tq5eAb6AB`1{{9WT_Ylj@&#Z+ilz?Z(Myv;^w^O6;hs@x)8c4l;3e>P?N
z&A^a_%nj-5KL)?zTD2qe;S^)dQ?{?;Tt#>0HN08B=0~vA>Mq%%;TIYj7j>xzoRXfT
Xk##5E>*-0LYZyFT{an^LB{Ts5va41$

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
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n%^8`2<lS76KR}8tz$e5NNE;d&iu)Qq0J0cM
zg8YIR9G=}s19HMVT^vIy7~h<}$jQve!E*6!!teJ*Rx=dtJk@8FkZ}p9*tza?`79rm
zmr0I4xEHR}3|V5=U)p34?C~ouad800SM8Fe3E$R)PskA|bvypU=33|LUp)#8434#8
VKe}{pa{z5%@O1TaS?83{1OVn@I_&@e

diff --git a/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_tools.png b/mods/HUD/mcl_inventory/textures/mcl_inventory_fnt_tools.png
deleted file mode 100644
index 97f588fb020ef0b5a829caa133fa8b476039650a..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 174
zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n&6${i<gBxKIzWmuz$e7@|NsAnhK4WN%o2<v
zUIPW0OM?7@8U8b523f8FasxeG978G?-%h;B$ZROmuuH{zpK7(#PwVmy?TPngTwGjU
zbj-RERJctkw^F*5OW|p9tG0+%kk`+Iy{%5J4BrD*ym%nh+Qr}{r}HyUG+bHf62t9(
Wvq~<XZq5Q4&fw|l=d#Wzp$Pz~MmsV9