Quantcast

localization, 3.3 support and hopefully working chat messages

ckaotik [12-29-09 - 11:33]
localization, 3.3 support and hopefully working chat messages
Filename
Broker_Garbage.toc
core.lua
deDE.lua
enUS.lua
options.lua
diff --git a/Broker_Garbage.toc b/Broker_Garbage.toc
index 2cb96f0..6df4723 100644
--- a/Broker_Garbage.toc
+++ b/Broker_Garbage.toc
@@ -1,13 +1,14 @@
-## Interface: 30200
+## Interface: 30300
 ## Dependencies:
 ## OptionalDeps: Auctionator, AuctionLite, Auctioneer
 ## SavedVariables: BG_GlobalDB
 ## SavedVariablesPerCharacter:

 ## Title: Broker_Garbage
-## Notes: Full bags no more! Shows your least valuable item .. and destroys it!
+## Notes: Full bags no more! Find your least valuable item .. and destroy it!
+## Notes-deDE: Endlich wieder Platz! Finde dein billigstes Item ... und zerstre es.
 ## Author: ckaotik (Raisa@EU-Die Todeskrallen)
-## Version: 3.2.2v1
+## Version: 3.3v1
 ## X-Category: Inventory
 ## X-Credits: GarbageFu

@@ -17,5 +18,8 @@ Libs\CallbackHandler-1.0.lua
 Libs\LibDataBroker-1.1.lua
 Libs\tekKonfig\tekKonfig.xml

+enUS.lua
+deDE.lua
+
 core.lua
 options.lua
\ No newline at end of file
diff --git a/core.lua b/core.lua
index 7263391..e52b15e 100644
--- a/core.lua
+++ b/core.lua
@@ -1,20 +1,22 @@
 -- Broker_Garbage
 --   Author: Ckaotik (Raisa@EU-Die Todeskrallen)
--- created to replace/update GarbageFu for 3.2 and further provide LDB support
+-- created to replace/update GarbageFu for 3.x and further provide LDB support
+_, BrokerGarbage = ...

 -- setting up the LDB
 -- ---------------------------------------------------------
 local LibQTip = LibStub('LibQTip-1.0')

-BrokerGarbage = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Garbage")
-BrokerGarbage.type 	= "data source"
-BrokerGarbage.icon 	= "Interface\\Icons\\achievement_bg_returnxflags_def_wsg"
-BrokerGarbage.label = "Garbage"
-BrokerGarbage.text 	= "Junk, be gone!"
-BrokerGarbage.OnClick = function(...) BrokerGarbage:OnClick(...) end
-BrokerGarbage.OnEnter = function(self) BrokerGarbage:Tooltip(self) end
-BrokerGarbage.OnLeave = function(self) BrokerGarbage:HideTT(self)	end
-BrokerGarbage.OnTooltipShow = function(self,...) BrokerGarbage:Tooltip(self) end
+local LDB = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Garbage")
+LDB.type 	= "data source"
+LDB.icon 	= "Interface\\Icons\\achievement_bg_returnxflags_def_wsg"
+LDB.label	= "Garbage"
+LDB.text 	= BrokerGarbage.locale.label
+LDB.OnClick = function(...) BrokerGarbage:OnClick(...) end
+LDB.OnEnter = function(...) BrokerGarbage:Tooltip(...) end
+LDB.OnLeave = function(...) BrokerGarbage:HideTT(...) end
+LDB.OnTooltipShow = function(...) BrokerGarbage:Tooltip(...) end
+

 -- default saved variables
 if not BG_GlobalDB or BG_GlobalDB == {} then
@@ -32,7 +34,7 @@ if not BG_GlobalDB or BG_GlobalDB == {} then
 end

 -- internal locals
-local debug = true
+local debug = false
 local locked = false
 local loaded = false
 local oldMoney
@@ -43,8 +45,10 @@ BrokerGarbage.tt = nil
 -- event handler
 local function eventHandler(self, event, ...)
 	if event == "MERCHANT_SHOW" then
-		BrokerGarbage:AutoRepair()
-		BrokerGarbage:AutoSell()
+		if not IsShiftKeyDown() then
+			BrokerGarbage:AutoRepair()
+			BrokerGarbage:AutoSell()
+		end

 	elseif (locked or cost ~=0) and event == "PLAYER_MONEY" then
 		-- regular unlock
@@ -60,29 +64,21 @@ local function eventHandler(self, event, ...)

 		BrokerGarbage:Debug("Profit", profit, "Cost", cost)

-		if profit and cost ~= 0 then
+		if profit and cost ~= 0 and BG_GlobalDB.autoRepairAtVendor and BG_GlobalDB.autoSellToVendor then
 			-- repair & auto-sell
-			if abs(profit) > cost then
-				BrokerGarbage:Print(format("Sold trash for %s, repaired for %s. Profit made: %s.",
-					BrokerGarbage:FormatMoney(profit),
+			BrokerGarbage:Print(format(BrokerGarbage.locale.sellAndRepair,
+					BrokerGarbage:FormatMoney(profit+cost),
 					BrokerGarbage:FormatMoney(cost),
-					BrokerGarbage:FormatMoney(profit-cost)
-				))
-			else
-				BrokerGarbage:Print(format("Sold trash for %s, repaired for %s. Lost %s.",
-					BrokerGarbage:FormatMoney(cost+profit), 	-- profit
-					BrokerGarbage:FormatMoney(cost), 			-- cost
-					BrokerGarbage:FormatMoney((-1)*profit)		-- cost - profit
-				))
-			end
+					BrokerGarbage:FormatMoney(profit)
+			))

-		elseif cost ~= 0 then
+		elseif cost ~= 0 and BG_GlobalDB.autoRepairAtVendor then
 			-- repair only
-			BrokerGarbage:Print(format("Repaired for %s.", BrokerGarbage:FormatMoney(cost)))
+			BrokerGarbage:Print(format(BrokerGarbage.locale.repair, BrokerGarbage:FormatMoney(cost)))

-		elseif profit and profit ~= 0 then
+		elseif profit and profit ~= 0 and BG_GlobalDB.autoSellToVendor then
 			-- autosell only
-			BrokerGarbage:Print(format("Sold trash for %s.", BrokerGarbage:FormatMoney(profit)))
+			BrokerGarbage:Print(format(BrokerGarbage.locale.sell, BrokerGarbage:FormatMoney(profit)))
 		end

 		oldMoney = nil
@@ -137,7 +133,12 @@ function BrokerGarbage:FormatMoney(amount)
 	if not amount then return "" end

 	local signum
-	if amount < 0 then signum = "-" else signum = "" end
+	if amount < 0 then
+		signum = "-"
+		amount = -amount
+	else
+		signum = ""
+	end

 	local gold   = floor(amount / (100 * 100))
 	local silver = math.fmod(floor(amount / 100), 100)
@@ -151,14 +152,14 @@ function BrokerGarbage:FormatMoney(amount)

 	-- copied from Ara Broker Money
 	elseif BG_GlobalDB.showMoney == 2 then
-		if amount>9999 or amount<-9999 then
-			return format("|cffeeeeee%i|r|cffffd700g|r |cffeeeeee%.2i|r|cffc7c7cfs|r |cffeeeeee%.2i|r|cffeda55fc|r", floor(amount*.0001), floor(amount*.01)%100, amount%100 )
+		if amount>9999 then
+			return format(signum.."|cffeeeeee%i|r|cffffd700g|r |cffeeeeee%.2i|r|cffc7c7cfs|r |cffeeeeee%.2i|r|cffeda55fc|r", floor(amount*.0001), floor(amount*.01)%100, amount%100 )

-		elseif amount > 99 or amount<  -99 then
-			return format("|cffeeeeee%i|r|cffc7c7cfs|r |cffeeeeee%.2i|r|cffeda55fc|r", floor(amount*.01), amount%100 )
+		elseif amount > 99 then
+			return format(signum.."|cffeeeeee%i|r|cffc7c7cfs|r |cffeeeeee%.2i|r|cffeda55fc|r", floor(amount*.01), amount%100 )

 		else
-			return format("|cffeeeeee%i|r|cffeda55fc|r", amount)
+			return format(signum.."|cffeeeeee%i|r|cffeda55fc|r", amount)
 		end

 	-- copied from Haggler
@@ -198,7 +199,7 @@ end

 -- basic functionality from here
 -- ---------------------------------------------------------
-function BrokerGarbage:Tooltip(wut)
+function BrokerGarbage:Tooltip(wut)
 	-- Acquire a tooltip with 3 columns, respectively aligned to left, center and right
 	BrokerGarbage.tt = LibQTip:Acquire("BrokerGarbage_TT", 3, "LEFT", "RIGHT", "RIGHT")
 	BrokerGarbage.tt:Clear()
@@ -214,11 +215,11 @@ function BrokerGarbage:Tooltip(wut)

 	-- add header lines
 	BrokerGarbage.tt:SetHeaderFont(tooltipHFont)
-	BrokerGarbage.tt:AddHeader('Broker_Garbage', '', 'Right-Click for options')
+	BrokerGarbage.tt:AddHeader('Broker_Garbage', '', BrokerGarbage.locale.headerRightClick)

 	-- add info lines
 	BrokerGarbage.tt:SetFont(tooltipFont)
-	BrokerGarbage.tt:AddLine('SHIFT-Click: Destroy', '', 'CTRL-Click: Keep')
+	BrokerGarbage.tt:AddLine(BrokerGarbage.locale.headerShiftClick, '', BrokerGarbage.locale.headerCtrlClick)
 	BrokerGarbage.tt:AddSeparator(2)

 	-- shows up to n lines of deletable items
@@ -235,7 +236,7 @@ function BrokerGarbage:Tooltip(wut)

 	-- add useful(?) information
 	BrokerGarbage.tt:AddSeparator(2)
-	BrokerGarbage.tt:AddLine('Money Lost:', '', BrokerGarbage:FormatMoney(BG_GlobalDB.moneyLostByDeleting))
+	BrokerGarbage.tt:AddLine(BrokerGarbage.locale.moneyLost, '', BrokerGarbage:FormatMoney(BG_GlobalDB.moneyLostByDeleting))


 	-- Use smart anchoring code to anchor the tooltip to our frame
@@ -278,7 +279,7 @@ function BrokerGarbage:OnClick(itemTable)
 		-- add to exclude list
 		BrokerGarbage:Debug("CTRL-Click!")
 		tinsert(BG_GlobalDB.exclude, itemTable.itemID)
-		BrokerGarbage:Print(select(2,GetItemInfo(itemTable.itemID)).." added to save list.")
+		BrokerGarbage:Print(format(BrokerGarbage.locale.addedToSaveList, select(2,GetItemInfo(itemTable.itemID))))
 		BrokerGarbage:ScanInventory()

 	elseif GetMouseButtonClicked() == "RightButton" then
@@ -359,7 +360,7 @@ function BrokerGarbage:Delete(itemLink, bag, slot)
 	PickupContainerItem(bag, slot)
 	DeleteCursorItem()					-- comment this line to prevent item deletion

-	BrokerGarbage:Print(itemLink.." has been deleted.")
+	BrokerGarbage:Print(format(BrokerGarbage.locale.itemDeleted, itemLink))
 	BrokerGarbage:Debug(itemLink.." deleted. (bag "..bag..", slot "..slot..")")
 end

@@ -377,7 +378,7 @@ function BrokerGarbage:ScanInventory()
 				local quality = select(3,GetItemInfo(itemID))

 				if canOpen and showSpam then
-					BrokerGarbage:Print("Please open your ".. select(2,GetItemInfo(itemID)) ..". It's in your bags, stealing your space!")
+					BrokerGarbage:Print(format(BrokerGarbage.locale.openPlease, select(2,GetItemInfo(itemID))))
 				end

 				if quality and (quality <= BG_GlobalDB.dropQuality or BrokerGarbage:Find(BG_GlobalDB.include, itemID))
@@ -404,9 +405,9 @@ function BrokerGarbage:ScanInventory()
 	end

 	if cheapestItem then
-		BrokerGarbage.text = select(2,GetItemInfo(cheapestItem.itemID)).."x".. cheapestItem.count .." (".. BrokerGarbage:FormatMoney(cheapestItem.value) ..")"
+		LDB.text = select(2,GetItemInfo(cheapestItem.itemID)).."x".. cheapestItem.count .." (".. BrokerGarbage:FormatMoney(cheapestItem.value) ..")"
 	else
-		BrokerGarbage.text = "Junk, be gone!"
+		LDB.text = BrokerGarbage.locale.label
 	end
 end

@@ -475,6 +476,7 @@ end

 -- Wishlist
 -- ---------------------------------------------------------
+-- Notice: When trying to stop BG from auto selling/repairing, hold Shift when adressing a merchant
 -- show lootable containers in your bag! make "open items" not as spammy
 -- increase/decrease loot treshold with mousewheel
 -- restack if necessary
diff --git a/deDE.lua b/deDE.lua
new file mode 100644
index 0000000..cc9f6c0
--- /dev/null
+++ b/deDE.lua
@@ -0,0 +1,61 @@
+--[[ German localisation file
+ = \195\132	 = \195\164
+ = \195\150	 = \195\182
+ = \195\156	 = \195\188	 = \195\159 ]]--
+_, BrokerGarbage = ...
+
+if GetLocale() == "deDE" then
+
+BrokerGarbage.locale = {
+	label = "Kein Junk",
+
+	-- Chat Messages
+	sellAndRepair = "M\195\188ll fr %1$s verkauft, repariert f\195\188r %1$s. \195\132nderung: %1$s.",
+	repair = "Repariert f\195\188r %s.",
+	sell = "M\195\188ll verkauft f\195\188r %s.",
+
+	addedToSaveList = "%s zur Ausnahmeliste hinzugef\195\188gt.",
+	itemDeleted = "%s wurde gel\195\182scht.",
+
+	openPlease = "Bitte \195\182ffne %s - es nimmt unn\195\182tig Platz weg.",
+
+	-- Tooltip
+	headerRightClick = "Rechts-Klick \195\182ffnet Optionen",
+	headerShiftClick = "SHIFT-Klick: Zerst\195\182ren",
+	headerCtrlClick = "STRG-Klick: Behalten",
+	moneyLost = "Geld verloren:",
+
+	-- Options Frame
+	subTitle = "M\195\182chtest du einmal nicht automatisch verkaufen / reparieren? \nHalte SHIFT gedr\195\188ckt, wenn du den H\195\164ndler ansprichst!",
+	autoSellTitle = "Automatisch Verkaufen",
+	autoSellText = "Wenn ausgew\195\164hlt, werden graue Gegenst\195\164nde automatisch beim H\195\164ndler verkauft.",
+
+	autoRepairTitle = "Automatisch Reparieren",
+	autoRepairText = "Wenn ausgew\195\164hlt, wird deine Ausr\195\188stung automatisch repariert wenn m\195\182glich.",
+
+	dropQualityTitle = "Item Qualit\195\164t",
+	dropQualityText = "W\195\164hle, bis zu welcher Qualit\195\164t Items zum L\195\182schen vorgeschlagen werden. Standard: Schlecht (0)",
+
+	moneyFormatTitle = "Geldformat",
+	moneyFormatText = "\195\132ndere die Art, wie Geldbetr\195\164ge angezeigt werden. Standard: 2",
+
+	maxItemsTitle = "Max. Items",
+	maxItemsText = "Lege fest, wie viele Zeilen im Tooltip angezeigt werden. Standard: 10",
+
+	maxHeightTitle = "Max. H\195\182he",
+	maxHeightText = "Lege fest, wie hoch der Tooltip sein darf. Standard: 220",
+
+	rescanInventory = "Inventar neu scannen",
+	rescanInventoryText = "Klicke um dein Inventar neu zu scannen. Dies sollte normalerweise nicht n\195\182tig sein!",
+
+	resetMoneyLost = "'Verlorenes Geld' zur\195\188cksetzen",
+	resetMoneyLostText = "Klicke um die Statistik 'Verlorenes Geld' zur\195\188ckzusetzen.",
+
+	emptyExcludeList = "Ausschlussliste leeren",
+	emptyExcludeListText = "Klicke um deine Ausschlussliste zu leeren.",
+
+	emptyIncludeList = "Einschlussliste leeren",
+	emptyIncludeListText = "Klicke um deine Einschlussliste zu leeren.",
+}
+
+end
\ No newline at end of file
diff --git a/enUS.lua b/enUS.lua
new file mode 100644
index 0000000..68e71b8
--- /dev/null
+++ b/enUS.lua
@@ -0,0 +1,53 @@
+_, BrokerGarbage = ...
+
+BrokerGarbage.locale = {
+	label = "Junk, be gone!",
+
+	-- Chat Messages
+	sellAndRepair = "Sold trash for %1$s, repaired for %1$s. Change: %1$s.",
+	repair = "Repaired for %s.",
+	sell = "Sold trash for %s.",
+
+	addedToSaveList = "%s added to save list.",
+	itemDeleted = "%s has been deleted.",
+
+	openPlease = "Please open your %s. It's in your bags, stealing your space!",
+
+	-- Tooltip
+	headerRightClick = "Right-Click for options",
+	headerShiftClick = "SHIFT-Click: Destroy",
+	headerCtrlClick = "CTRL-Click: Keep",
+	moneyLost = "Money Lost:",
+
+	-- Options Frame
+	subTitle = "Don't want to auto-sell/repair? \nHold Shift when adressing the merchant!",
+	autoSellTitle = "Auto Sell",
+	autoSellText = "Toggles whether to automatically sell your gray items when at a vendor.",
+
+	autoRepairTitle = "Auto Repair",
+	autoRepairText = "Toggles whether to automatically repair your gear when at a vendor.",
+
+	dropQualityTitle = "Drop Quality",
+	dropQualityText = "Select up to which treshold items may be listed as deletable. Default: Poor (0)",
+
+	moneyFormatTitle = "Money Format",
+	moneyFormatText = "Change the way money (i.e. gold/silver/copper) is being displayed. Default: 2",
+
+	maxItemsTitle = "Max. Items",
+	maxItemsText = "Set how many lines you would like to have displayed in the tooltip. Default: 10",
+
+	maxHeightTitle = "Max. Height",
+	maxHeightText = "Set the height of the tooltip. Default: 220",
+
+	rescanInventory = "Rescan Inventory",
+	rescanInventoryText = "Click to manually rescan you inventory. Should generally not be needed.",
+
+	resetMoneyLost = "Reset Money Lost Data",
+	resetMoneyLostText = "Click to reset the amount of money lost by deleting items.",
+
+	emptyExcludeList = "Empty Exclude List",
+	emptyExcludeListText = "Click to clear your exclude list.",
+
+	emptyIncludeList = "Empty Include List",
+	emptyIncludeListText = "Click to clear your include list.",
+}
\ No newline at end of file
diff --git a/options.lua b/options.lua
index 5c6e9ab..5ccc95d 100644
--- a/options.lua
+++ b/options.lua
@@ -1,3 +1,5 @@
+_, BrokerGarbage = ...
+
 BrokerGarbage.options = CreateFrame("Frame", "BrokerGarbageOptionsFrame", InterfaceOptionsFramePanelContainer)
 BrokerGarbage.options.name = "Broker_Garbage"
 -- no, you don't want to see this until it's done
@@ -14,10 +16,10 @@ BrokerGarbage.quality = {
 	}

 BrokerGarbage.options:SetScript("OnShow", function(self)
-	local title, subtitle = LibStub("tekKonfig-Heading").new(self, "Broker_Garbage", "Suit yourself to adjust these settings to your liking.")
+	local title, subtitle = LibStub("tekKonfig-Heading").new(self, "Broker_Garbage", BrokerGarbage.locale.subTitle)

-	local autosell = LibStub("tekKonfig-Checkbox").new(self, nil, "Auto sell", "TOPLEFT", subtitle, "BOTTOMLEFT", -2, -4)
-	autosell.tiptext = "Toggles whether to automatically sell your gray items when at a vendor."
+	local autosell = LibStub("tekKonfig-Checkbox").new(self, nil, BrokerGarbage.locale.autoSellTitle, "TOPLEFT", subtitle, "BOTTOMLEFT", -2, -4)
+	autosell.tiptext = BrokerGarbage.locale.autoSellText
 	autosell:SetChecked(BG_GlobalDB.autoSellToVendor)
 	local checksound = autosell:GetScript("OnClick")
 	autosell:SetScript("OnClick", function(self)
@@ -25,8 +27,8 @@ BrokerGarbage.options:SetScript("OnShow", function(self)
 		BG_GlobalDB.autoSellToVendor = not BG_GlobalDB.autoSellToVendor
 	end)

-	local autorepair = LibStub("tekKonfig-Checkbox").new(self, nil, "Auto repair", "TOPLEFT", subtitle, "BOTTOMLEFT", 178, -4)
-	autorepair.tiptext = "Toggles whether to automatically repair your gear when at a vendor."
+	local autorepair = LibStub("tekKonfig-Checkbox").new(self, nil, BrokerGarbage.locale.autoRepairTitle, "TOPLEFT", subtitle, "BOTTOMLEFT", 178, -4)
+	autorepair.tiptext = BrokerGarbage.locale.autoRepairText
 	autorepair:SetChecked(BG_GlobalDB.autoRepairAtVendor)
 	local checksound = autorepair:GetScript("OnClick")
 	autorepair:SetScript("OnClick", function(self)
@@ -34,8 +36,8 @@ BrokerGarbage.options:SetScript("OnShow", function(self)
 		BG_GlobalDB.autoRepairAtVendor = not BG_GlobalDB.autoRepairAtVendor
 	end)

-	local quality = LibStub("tekKonfig-Slider").new(self, "Maximum drop quality", 0, 6, "TOPLEFT", autosell, "BOTTOMLEFT", 2, -10)
-	quality.tiptext = "Select up to which treshold items may be listed as deletable. Default: Poor (0)"
+	local quality = LibStub("tekKonfig-Slider").new(self, BrokerGarbage.locale.dropQualityTitle, 0, 6, "TOPLEFT", autosell, "BOTTOMLEFT", 2, -10)
+	quality.tiptext = BrokerGarbage.locale.dropQualityText
 	quality:SetWidth(200)
 	quality:SetValueStep(1);
 	quality:SetValue(BG_GlobalDB.dropQuality)
@@ -49,22 +51,22 @@ BrokerGarbage.options:SetScript("OnShow", function(self)
 	end)

 	local testValue = 130007
-	local moneyFormat = LibStub("tekKonfig-Slider").new(self, "Money Format", 0, 4, "LEFT", quality, "RIGHT", 40, 0)
-	moneyFormat.tiptext = "Change the way money (i.e. gold/silver/copper) is being displayed. Default: 2"
+	local moneyFormat = LibStub("tekKonfig-Slider").new(self, BrokerGarbage.locale.moneyFormatTitle, 0, 4, "LEFT", quality, "RIGHT", 40, 0)
+	moneyFormat.tiptext = BrokerGarbage.locale.moneyFormatText
 	moneyFormat:SetWidth(200)
 	moneyFormat:SetValueStep(1);
 	moneyFormat:SetValue(BG_GlobalDB.showMoney)
 	moneyFormat.text = moneyFormat:CreateFontString("$parentCenterText", "ARTWORK", "GameFontHighlightSmall")
 	moneyFormat.text:SetPoint("TOP", moneyFormat, "BOTTOM", 0, 3)
-	moneyFormat.text:SetText(BrokerGarbage.FormatMoney(testValue))
+	moneyFormat.text:SetText(BrokerGarbage:FormatMoney(testValue))
 	moneyFormat:SetScript("OnValueChanged", function(self)
 		BG_GlobalDB.showMoney = self:GetValue()
-		self.text:SetText(BrokerGarbage.FormatMoney(testValue))
+		self.text:SetText(BrokerGarbage:FormatMoney(testValue))
 	end)


-	local ttMaxItems = LibStub("tekKonfig-Slider").new(self, "Max. Items", 0, 50, "TOPLEFT", quality, "BOTTOMLEFT", 2, -15)
-	ttMaxItems.tiptext = "Set how many lines you would like to have displayed in the tooltip. Default: 10"
+	local ttMaxItems = LibStub("tekKonfig-Slider").new(self, BrokerGarbage.locale.maxItemsTitle, 0, 50, "TOPLEFT", quality, "BOTTOMLEFT", 2, -15)
+	ttMaxItems.tiptext = BrokerGarbage.locale.maxItemsText
 	ttMaxItems:SetWidth(200)
 	ttMaxItems:SetValueStep(1);
 	ttMaxItems:SetValue(BG_GlobalDB.tooltipNumItems)
@@ -77,8 +79,8 @@ BrokerGarbage.options:SetScript("OnShow", function(self)
 	end)


-	local ttMaxHeight = LibStub("tekKonfig-Slider").new(self, "Max. Height", 0, 400, "LEFT", ttMaxItems, "RIGHT", 40, 0)
-	ttMaxHeight.tiptext = "Set the height of the tooltip. Default: 220"
+	local ttMaxHeight = LibStub("tekKonfig-Slider").new(self, BrokerGarbage.locale.maxHeightTitle, 0, 400, "LEFT", ttMaxItems, "RIGHT", 40, 0)
+	ttMaxHeight.tiptext = BrokerGarbage.locale.maxHeightText
 	ttMaxHeight:SetWidth(200)
 	ttMaxHeight:SetValueStep(10);
 	ttMaxHeight:SetValue(BG_GlobalDB.tooltipMaxHeight)
@@ -92,16 +94,16 @@ BrokerGarbage.options:SetScript("OnShow", function(self)


 	local rescan = LibStub("tekKonfig-Button").new_small(self, "TOPLEFT", ttMaxItems, "BOTTOMLEFT", 0, -50)
-	rescan:SetText("Rescan Inventory")
-	rescan.tiptext = "Click to manually rescan you inventory. Should generally not be needed."
+	rescan:SetText(BrokerGarbage.locale.rescanInventory)
+	rescan.tiptext = BrokerGarbage.locale.rescanInventoryText
 	rescan:SetWidth(150) rescan:SetHeight(18)
 	rescan:SetScript("OnClick", function()
 		BrokerGarbage:ScanInventory()
 	end)

 	local resetmoneylost = LibStub("tekKonfig-Button").new_small(self, "LEFT", rescan, "RIGHT", 40, 0)
-	resetmoneylost:SetText("Reset Money Lost Data")
-	resetmoneylost.tiptext = "Click to reset the amount of money lost by deleting items."
+	resetmoneylost:SetText(BrokerGarbage.locale.resetMoneyLost)
+	resetmoneylost.tiptext = BrokerGarbage.locale.resetMoneyLostText
 	resetmoneylost:SetWidth(150) resetmoneylost:SetHeight(18)
 	resetmoneylost:SetScript("OnClick", function()
 		BrokerGarbage:ResetMoneyLost()
@@ -109,16 +111,16 @@ BrokerGarbage.options:SetScript("OnShow", function(self)


 	local excludeReset = LibStub("tekKonfig-Button").new_small(self, "TOPLEFT", rescan, "BOTTOMLEFT", 0, -50)
-	excludeReset:SetText("Empty Exclude List")
-	excludeReset.tiptext = "Click to clear your exclude list."
+	excludeReset:SetText(BrokerGarbage.locale.emptyExcludeList)
+	excludeReset.tiptext = BrokerGarbage.locale.emptyExcludeListText
 	excludeReset:SetWidth(150) excludeReset:SetHeight(18)
 	excludeReset:SetScript("OnClick", function()
 		BG_GlobalDB.exclude = {}
 	end)

 	local includeReset = LibStub("tekKonfig-Button").new_small(self, "TOPLEFT", excludeReset, "BOTTOMLEFT", 0, -10)
-	includeReset:SetText("Empty Include List")
-	includeReset.tiptext = "Click to clear your include list."
+	includeReset:SetText(BrokerGarbage.locale.emptyIncludeList)
+	includeReset.tiptext = BrokerGarbage.locale.emptyIncludeListText
 	includeReset:SetWidth(150) includeReset:SetHeight(18)
 	includeReset:SetScript("OnClick", function()
 		BG_GlobalDB.include = {}
@@ -132,6 +134,4 @@ end)


 InterfaceOptions_AddCategory(BrokerGarbage.options)
-LibStub("tekKonfig-AboutPanel").new("Broker_Garbage", "Broker_Garbage")
-
--- formatmoney is weird - how is testValue never handed over?
\ No newline at end of file
+LibStub("tekKonfig-AboutPanel").new("Broker_Garbage", "Broker_Garbage")
\ No newline at end of file