Quantcast

Merge remote-tracking branch 'mille/master' into improvements

Mikeprod [09-27-16 - 19:49]
Merge remote-tracking branch 'mille/master' into improvements
Filename
Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua
XIV_Databar.toc
core.lua
locales/deDE.lua
locales/enUS.lua
locales/locales.xml
modules/armor.lua
modules/clock.lua
modules/currency.lua
modules/gold.lua
modules/micromenu.lua
modules/system.lua
modules/talent.lua
modules/tradeskill.lua
modules/travel.lua
diff --git a/Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua b/Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua
index aae7f50..3767d5f 100644
--- a/Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua
+++ b/Libs/LibArtifactData-1.0/LibArtifactData-1.0.lua
@@ -1,4 +1,4 @@
-local MAJOR, MINOR = "LibArtifactData-1.0", 6
+local MAJOR, MINOR = "LibArtifactData-1.0", 7

 assert(_G.LibStub, MAJOR .. " requires LibStub")
 local lib = _G.LibStub:NewLibrary(MAJOR, MINOR)
@@ -225,6 +225,10 @@ end
 local function GetViewedArtifactData()
 	GetArtifactKnowledge()
 	local itemID, _, name, icon, unspentPower, numRanksPurchased = GetArtifactInfo() -- TODO: appearance stuff needed? altItemID ?
+	if not itemID then
+		Debug("|cffff0000ERROR:|r", "GetArtifactInfo() returned nil.")
+		return
+	end
 	viewedID = itemID
 	Debug("GetViewedArtifactData", name, itemID)
 	local numRanksPurchasable, power, maxPower = GetNumPurchasableTraits(numRanksPurchased, unspentPower)
@@ -305,11 +309,11 @@ local function InitializeScan(event)
 end

 function private.PLAYER_ENTERING_WORLD(event)
+	frame:UnregisterEvent(event)
 	_G.C_Timer.After(5, function()
 		InitializeScan(event)
 		frame:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
 		frame:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
-		frame:UnregisterEvent("PLAYER_ENTERING_WORLD")
 	end)
 end

@@ -348,6 +352,10 @@ function private.ARTIFACT_XP_UPDATE(event)
 	local numRanksPurchasable, power, maxPower = GetNumPurchasableTraits(numRanksPurchased, unspentPower)

 	local artifact = artifacts[itemID]
+	if not artifact then
+		Debug("|cffff0000ERROR:|r", "artifact", itemID, "not found.")
+		return
+	end
 	local diff = unspentPower - artifact.unspentPower

 	if numRanksPurchased ~= artifact.numRanksPurchased then
diff --git a/XIV_Databar.toc b/XIV_Databar.toc
index 2f97b6a..296df27 100644
--- a/XIV_Databar.toc
+++ b/XIV_Databar.toc
@@ -1,7 +1,7 @@
 ## Interface: 70300
 ## Title: XIV_Databar
 ## Author: |cffbbbbbbMille|cff990000XIV|r
-## Version: 2.0.3
+## Version: 2.0.5
 ## Notes: Adds a bottombar by the request of |cffffffffu/sammojo|r on Reddit, Icons made by |cffffffffu/sammojo|r. Previously maintained by |cff00FF99Saxitoxin|r.
 ## SavedVariables: TEST_CONFIG, XIVBarDB
 ## X-Issues: https://github.com/MilleXIV/XIV_Databar/issues
diff --git a/core.lua b/core.lua
index 649e0e2..a4f03e1 100644
--- a/core.lua
+++ b/core.lua
@@ -74,48 +74,13 @@ function XIVBar:OnInitialize()

   self.fontFlags = {'', 'OUTLINE', 'THICKOUTLINE', 'MONOCHROME'}

-  --[[local options = {
-    name = "XIV Bar",
-    handler = XIVBar,
-    type = 'group',
-    args = {
-      general = {
-        name = L['General'],
-        type = "group",
-        order = 3,
-        inline = true,
-        args = {
-          barPosition = {
-            name = L['Bar Position'],
-            type = "select",
-            order = 1,
-            values = {TOP = L['Top'], BOTTOM = L['Bottom']},
-            style = "dropdown",
-            get = function() return self.db.profile.general.barPosition; end,
-            set = function(info, value) self.db.profile.general.barPosition = value; self:Refresh(); end,
-          },
-          barColor = {
-            name = L['Bar Color'],
-            type = "color",
-            order = 2,
-            hasAlpha = true,
-            set = function(info, r, g, b, a)
-              XIVBar:SetColor('barColor', r, g, b, a)
-            end,
-            get = function() return XIVBar:GetColor('barColor') end
-          },
-        }
-      }
-    }
-  }]]--
-
   local options = {
     name = "XIV Bar",
     handler = XIVBar,
     type = 'group',
     args = {
       general = {
-        name = L['General'],
+        name = GENERAL_LABEL,
         type = "group",
         args = {
           general = self:GetGeneralOptions(),
@@ -311,9 +276,19 @@ function XIVBar:HexToRGBA(hex)
   return (tonumber(rhex, 16) / 255), (tonumber(ghex, 16) / 255), (tonumber(bhex, 16) / 255), (tonumber(ahex, 16) / 255)
 end

+function XIVBar:PrintTable(table, prefix)
+  for k,v in pairs(table) do
+    if type(v) == 'table' then
+      self:PrintTable(v, prefix..'.'..k)
+    else
+      print(prefix..'.'..k..': '..tostring(v))
+    end
+  end
+end
+
 function XIVBar:GetGeneralOptions()
   return {
-    name = L['General'],
+    name = GENERAL_LABEL,
     type = "group",
     order = 3,
     inline = true,
@@ -377,7 +352,7 @@ function XIVBar:GetPositionOptions()
     inline = true,
     args = {
       fullScreen = {
-        name = L['Full Screen'],
+        name = VIDEO_OPTIONS_FULLSCREEN,
         type = 'toggle',
         order = 0,
         get = function() return self.db.profile.general.barFullscreen; end,
@@ -415,7 +390,7 @@ function XIVBar:GetTextOptions()
     fontList[v] = v;
   end
   return {
-    name = L['Text'],
+    name = LOCALE_TEXT_LABEL,
     type = "group",
     order = 3,
     inline = true,
@@ -430,7 +405,7 @@ function XIVBar:GetTextOptions()
         set = function(info, val) self.db.profile.text.font = val; self:Refresh(); end
       },
       fontSize = {
-        name = L['Font Size'],
+        name = FONT_SIZE,
         type = 'range',
         order = 2,
         min = 10,
diff --git a/locales/deDE.lua b/locales/deDE.lua
new file mode 100644
index 0000000..1a80392
--- /dev/null
+++ b/locales/deDE.lua
@@ -0,0 +1,100 @@
+local AddOnName, Engine = ...;
+local AceLocale = LibStub:GetLibrary("AceLocale-3.0");
+local L = AceLocale:NewLocale(AddOnName, "deDE", true, false);
+
+L['Modules'] = "Module";
+L['Left-Click'] = "Links-Klick";
+L['Right-Click'] = "Rechts-Klick";
+
+-- General
+L['Bar Position'] = "Leistenposition";
+L['Top'] = "Oben";
+L['Bottom'] = "Unten";
+L['Bar Color'] = "Leistenfarbe";
+L['Use Class Colors for Bar'] = "Benutze Klassenfarbe für Leiste";
+L['Bar Padding'] = "Leistenabstand";
+L['Module Spacing'] = "Modulabstand";
+
+-- Positioning Options
+L['Positioning Options'] = "Positions-Optionen";
+L['Horizontal Position'] = "Horizontale Position";
+L['Bar Width'] = "Leistenbreite";
+L['Left'] = "Links";
+L['Center'] = "Mitte";
+L['Right'] = "Rechts";
+
+-- Media
+L['Font'] = "Schriftart";
+L['Small Font Size'] = "Kleine Schriftgröße";
+L['Text Style'] = "Schriftstil";
+
+-- Text Colors
+L['Text Colors'] = "Textfarbe";
+L['Normal'] = "Normal";
+L['Inactive'] = "Inaktiv";
+L['Use Class Colors for Hover'] = "Benutze Klassenfarbe für Mouseover";
+L['Hover'] = "Mouseover";
+
+-------------------- MODULES ---------------------------
+
+L['Micromenu'] = "Mikromenü";
+L['Show Social Tooltips'] = "Social Tooltips anzeigen";
+L['Main Menu Icon Right Spacing'] = "Hauptmenü Icon Abstand Rechts";
+L['Icon Spacing'] = "Icon-Abstand";
+L['Open Guild Page'] = true;
+L['No Tag'] = true;
+L['Hide Social Text'] = "Social Text verstecken";
+
+L['Always Show Item Level'] = "Rüstungslevel immer anzeigen";
+L['Minimum Durability to Become Active'] = "Minimale Haltbarkeit für Anzeige";
+L['Maximum Durability to Show Item Level'] = "Maximale Haltbarkeit für Rüstungslevel-Anzeige";
+
+L['Time Format'] = "Uhrzeit-Format";
+L['Use Server Time'] = "Server-Zeit benutzen";
+L['New Event!'] = "Neue Veranstaltung";
+L['Local Time'] = "Lokale Zeit";
+L['Realm Time'] = "Realm-Zeit";
+L['Open Calendar'] = "Kalendar öffnen";
+L['Open Clock'] = "Stoppuhr öffnen";
+L['Hide Event Text'] = "Event-Text verstecken";
+
+L['Travel'] = "Reise";
+L['Port Options'] = "Port Optionen";
+L['Ready'] = "Bereit";
+L['Travel Cooldowns'] = "Reise-Abklingzeiten";
+L['Change Port Option'] = "Port Optionen ändern";
+
+L['Always Show Silver and Copper'] = "Silber und Kupfer immer anzeigen";
+L['Shorten Gold'] = "Gold verkürzen";
+L['Toggle Bags'] = "Taschen anzeigen";
+L['Session Total'] = true;
+
+L['Show XP Bar Below Max Level'] = "Erfahrungsleiste unter Levelcap anzeigen";
+L['Use Class Colors for XP Bar'] = "Klassenfarbe für Erfahrungsleiste benutzen";
+L['Show Tooltips'] = "Tooltips anzeigen";
+L['Text on Right'] = "Text auf der rechten Seite";
+L['Currency Select'] = "Währung auswählen";
+L['First Currency'] = "Währung #1";
+L['Second Currency'] = "Währung #2";
+L['Third Currency'] = "Währung #3";
+L['Rested'] = "Ausgeruht";
+
+L['Show World Ping'] = "World-Ping anzeigen";
+L['Number of Addons To Show'] = "Maximale Anzahl für Addon-Anzeige";
+L['Addons to Show in Tooltip'] = true;
+L['Show All Addons in Tooltip with Shift'] = "Alle Addons im Tooltip anzeigen via Shift";
+L['Memory Usage'] = "Speichernutzung";
+L['Garbage Collect'] = true;
+L['Cleaned'] = "Aufgeräumt";
+
+L['Use Class Colors'] = "Klassenfarben benutzen";
+L['Cooldowns'] = "Abklingzeiten";
+
+L['Set Specialization'] = "Spezialisierung auswählen";
+L['Set Loot Specialization'] = "Beute-Spezialisierung auswählen";
+L['Current Specialization'] = "Aktuelle Spezialisierung";
+L['Current Loot Specialization'] = "Aktuelle Beute-Spezialisierung";
+L['Talent Minimum Width'] = "Minimale Breite für Talente";
+L['Remaining'] = "Ausbleibend";
+L['Available Ranks'] = "Verfügbare Ränge";
+L['Artifact Knowledge'] = "Artefaktwissen";
diff --git a/locales/enUS.lua b/locales/enUS.lua
index 850b8ab..adc29a4 100644
--- a/locales/enUS.lua
+++ b/locales/enUS.lua
@@ -2,9 +2,6 @@ local AddOnName, Engine = ...;
 local AceLocale = LibStub:GetLibrary("AceLocale-3.0");
 local L = AceLocale:NewLocale(AddOnName, "enUS", true, false);

-L['General'] = true;
-L['Text'] = true;
-
 L['Modules'] = true;
 L['Left-Click'] = true;
 L['Right-Click'] = true;
@@ -20,7 +17,6 @@ L['Module Spacing'] = true;

 -- Positioning Options
 L['Positioning Options'] = true;
-L['Full Screen'] = true;
 L['Horizontal Position'] = true;
 L['Bar Width'] = true;
 L['Left'] = true;
@@ -29,7 +25,6 @@ L['Right'] = true;

 -- Media
 L['Font'] = true;
-L['Font Size'] = true;
 L['Small Font Size'] = true;
 L['Text Style'] = true;

@@ -46,22 +41,14 @@ L['Micromenu'] = true;
 L['Show Social Tooltips'] = true;
 L['Main Menu Icon Right Spacing'] = true;
 L['Icon Spacing'] = true;
-L['Guild'] = true;
-L['Online'] = true;
-L['AFK'] = true;
-L['DND'] = true;
 L['Open Guild Page'] = true;
-L['Social'] = true;
 L['No Tag'] = true;
-L['Level'] = true;
 L['Hide Social Text'] = true;

-L['Armor'] = true;
 L['Always Show Item Level'] = true;
 L['Minimum Durability to Become Active'] = true;
 L['Maximum Durability to Show Item Level'] = true;

-L['Clock'] = true;
 L['Time Format'] = true;
 L['Use Server Time'] = true;
 L['New Event!'] = true;
@@ -77,28 +64,21 @@ L['Ready'] = true;
 L['Travel Cooldowns'] = true;
 L['Change Port Option'] = true;

-L['Gold'] = true;
 L['Always Show Silver and Copper'] = true;
-L['Show Free Bag Space'] = true;
 L['Shorten Gold'] = true;
 L['Toggle Bags'] = true;
-L['Total'] = true;
 L['Session Total'] = true;

-L['Currency'] = true;
 L['Show XP Bar Below Max Level'] = true;
 L['Use Class Colors for XP Bar'] = true;
 L['Show Tooltips'] = true;
 L['Text on Right'] = true;
-L['Toggle Currency Frame'] = true;
 L['Currency Select'] = true;
 L['First Currency'] = true;
 L['Second Currency'] = true;
 L['Third Currency'] = true;
-L['XP'] = true;
 L['Rested'] = true;

-L['System'] = true;
 L['Show World Ping'] = true;
 L['Number of Addons To Show'] = true;
 L['Addons to Show in Tooltip'] = true;
diff --git a/locales/locales.xml b/locales/locales.xml
index a1a79a4..eadcfc3 100644
--- a/locales/locales.xml
+++ b/locales/locales.xml
@@ -1,3 +1,4 @@
 <Ui xmlns="http://www.blizzard.com/wow/ui/">
   <Script file="enUS.lua"/>
+  <Script file="deDE.lua"/>
 </Ui>
diff --git a/modules/armor.lua b/modules/armor.lua
index 4b7b39c..0f641ae 100644
--- a/modules/armor.lua
+++ b/modules/armor.lua
@@ -6,7 +6,7 @@ local L = XIVBar.L;
 local ArmorModule = xb:NewModule("ArmorModule", 'AceEvent-3.0')

 function ArmorModule:GetName()
-  return L['Armor'];
+  return AUCTION_CATEGORY_ARMOR;
 end

 function ArmorModule:OnInitialize()
@@ -55,7 +55,7 @@ function ArmorModule:RegisterFrameEvents()
   self.armorButton:SetScript('OnEnter', function()
     ArmorModule:SetArmorColor()
     GameTooltip:SetOwner(ArmorModule.armorFrame, 'ANCHOR_'..xb.miniTextPosition)
-    GameTooltip:AddLine("[|cff6699FF"..L['Armor'].."|r]")
+    GameTooltip:AddLine("[|cff6699FF"..AUCTION_CATEGORY_ARMOR.."|r]")
     GameTooltip:AddLine(" ")
     for i,v in pairs(ArmorModule.durabilityList) do
       if v.max ~= nil and v.max > 0 then
diff --git a/modules/clock.lua b/modules/clock.lua
index 9ac2349..206599e 100644
--- a/modules/clock.lua
+++ b/modules/clock.lua
@@ -6,7 +6,7 @@ local L = XIVBar.L;
 local ClockModule = xb:NewModule("ClockModule", 'AceEvent-3.0')

 function ClockModule:GetName()
-  return L['Clock'];
+  return TIMEMANAGER_TITLE;
 end

 function ClockModule:OnInitialize()
@@ -128,7 +128,7 @@ function ClockModule:RegisterFrameEvents()
     if InCombatLockdown() then return; end
     ClockModule:SetClockColor()
     GameTooltip:SetOwner(ClockModule.clockTextFrame, 'ANCHOR_'..xb.miniTextPosition)
-    GameTooltip:AddLine("[|cff6699FF"..L['Clock'].."|r]")
+    GameTooltip:AddLine("[|cff6699FF"..TIMEMANAGER_TITLE.."|r]")
     GameTooltip:AddLine(" ")
     local clockTime = nil
     local ttTimeText = ''
@@ -240,7 +240,7 @@ function ClockModule:GetConfig()
         set = function(info, val) xb.db.profile.modules.clock.timeFormat = val; self:Refresh(); end
       },
       fontSize = {
-        name = L['Font Size'],
+        name = FONT_SIZE,
         type = 'range',
         order = 4,
         min = 10,
@@ -251,4 +251,4 @@ function ClockModule:GetConfig()
       }
     }
   }
-end
\ No newline at end of file
+end
diff --git a/modules/currency.lua b/modules/currency.lua
index 0964711..25b303d 100644
--- a/modules/currency.lua
+++ b/modules/currency.lua
@@ -6,7 +6,7 @@ local L = XIVBar.L;
 local CurrencyModule = xb:NewModule("CurrencyModule", 'AceEvent-3.0', 'AceHook-3.0')

 function CurrencyModule:GetName()
-  return L['Currency'];
+  return CURRENCY;
 end

 function CurrencyModule:OnInitialize()
@@ -77,6 +77,10 @@ function CurrencyModule:Refresh()
     --self.xpFrame = self.xpFrame or CreateFrame("BUTTON", nil, self.currencyFrame)

     local textHeight = floor((xb:GetHeight() - 4) / 2)
+    local barHeight = (iconSize - textHeight - 2)
+    if barHeight < 2 then
+      barHeight = 2
+    end
     self.xpIcon:SetTexture(xb.constants.mediaPath..'datatexts\\exp')
     self.xpIcon:SetSize(iconSize, iconSize)
     self.xpIcon:SetPoint('LEFT')
@@ -95,7 +99,7 @@ function CurrencyModule:Refresh()
     end
     self.xpBar:SetMinMaxValues(0, UnitXPMax('player'))
     self.xpBar:SetValue(UnitXP('player'))
-    self.xpBar:SetSize(self.xpText:GetStringWidth(), (iconSize - textHeight - 2))
+    self.xpBar:SetSize(self.xpText:GetStringWidth(), barHeight)
     self.xpBar:SetPoint('BOTTOMLEFT', self.xpIcon, 'BOTTOMRIGHT', 5, 0)

     self.xpBarBg:SetAllPoints()
@@ -267,18 +271,15 @@ function CurrencyModule:ShowTooltip()
     local maxXp = UnitXPMax('player')
     local rested = GetXPExhaustion()
     -- XP
-    GameTooltip:AddDoubleLine(L['XP']..':', string.format('%d / %d (%d%%)', curXp, maxXp, floor((curXp / maxXp) * 100)), 1, 1, 0, 1, 1, 1)
+    GameTooltip:AddDoubleLine(XP..':', string.format('%d / %d (%d%%)', curXp, maxXp, floor((curXp / maxXp) * 100)), 1, 1, 0, 1, 1, 1)
     -- Remaining
     GameTooltip:AddDoubleLine(L['Remaining']..':', string.format('%d (%d%%)', (maxXp - curXp), floor(((maxXp - curXp) / maxXp) * 100)), 1, 1, 0, 1, 1, 1)
     -- Rested
     if rested then
       GameTooltip:AddDoubleLine(L['Rested']..':', string.format('+%d (%d%%)', rested, floor((rested / maxXp) * 100)), 1, 1, 0, 1, 1, 1)
     end
-
-    --GameTooltip:AddLine(" ")
-    --GameTooltip:AddDoubleLine('<'..L['Left-Click']..'>', L['Toggle Currency Frame'], 1, 1, 0, 1, 1, 1)
   else
-    GameTooltip:AddLine("[|cff6699FF"..L['Currency'].."|r]")
+    GameTooltip:AddLine("[|cff6699FF"..CURRENCY.."|r]")
     GameTooltip:AddLine(" ")

     for i = 1, 3 do
@@ -290,7 +291,7 @@ function CurrencyModule:ShowTooltip()
     end

     GameTooltip:AddLine(" ")
-    GameTooltip:AddDoubleLine('<'..L['Left-Click']..'>', L['Toggle Currency Frame'], 1, 1, 0, 1, 1, 1)
+    GameTooltip:AddDoubleLine('<'..L['Left-Click']..'>', BINDING_NAME_TOGGLECURRENCY, 1, 1, 0, 1, 1, 1)
   end

   GameTooltip:Show()
diff --git a/modules/gold.lua b/modules/gold.lua
index 2031341..0726085 100644
--- a/modules/gold.lua
+++ b/modules/gold.lua
@@ -6,7 +6,7 @@ local L = XIVBar.L;
 local GoldModule = xb:NewModule("GoldModule", 'AceEvent-3.0')

 function GoldModule:GetName()
-  return L['Gold'];
+  return BONUS_ROLL_REWARD_MONEY;
 end

 function GoldModule:OnInitialize()
@@ -118,7 +118,7 @@ function GoldModule:RegisterFrameEvents()
     self.bagText:SetTextColor(unpack(xb:HoverColors()))

     GameTooltip:SetOwner(GoldModule.goldFrame, 'ANCHOR_'..xb.miniTextPosition)
-    GameTooltip:AddLine("[|cff6699FF"..L['Gold'].."|r - |cff82c5ff"..xb.constants.playerFactionLocal.." "..xb.constants.playerRealm.."|r]")
+    GameTooltip:AddLine("[|cff6699FF"..BONUS_ROLL_REWARD_MONEY.."|r - |cff82c5ff"..xb.constants.playerFactionLocal.." "..xb.constants.playerRealm.."|r]")
     GameTooltip:AddLine(" ")

     GameTooltip:AddDoubleLine(L['Session Total'], GoldModule:FormatCoinText(xb.db.factionrealm[xb.constants.playerName].sessionMoney), 1, 1, 0, 1, 1, 1)
@@ -130,7 +130,7 @@ function GoldModule:RegisterFrameEvents()
       totalGold = totalGold + goldData.currentMoney
     end
     GameTooltip:AddLine(" ")
-    GameTooltip:AddDoubleLine(L['Total'], GoldModule:FormatCoinText(totalGold), 1, 1, 0, 1, 1, 1)
+    GameTooltip:AddDoubleLine(TOTAL, GoldModule:FormatCoinText(totalGold), 1, 1, 0, 1, 1, 1)
     GameTooltip:AddDoubleLine('<'..L['Left-Click']..'>', L['Toggle Bags'], 1, 1, 0, 1, 1, 1)
     GameTooltip:Show()
   end)
@@ -252,7 +252,7 @@ function GoldModule:GetConfig()
         set = function(_, val) xb.db.profile.modules.gold.showSmallCoins = val; self:Refresh(); end
       },
       showFreeBagSpace = {
-        name = L['Show Free Bag Space'],
+        name = DISPLAY_FREE_BAG_SLOTS,
         order = 1,
         type = "toggle",
         get = function() return xb.db.profile.modules.gold.showFreeBagSpace; end,
diff --git a/modules/micromenu.lua b/modules/micromenu.lua
index 0bf8be8..c6c44b3 100644
--- a/modules/micromenu.lua
+++ b/modules/micromenu.lua
@@ -288,7 +288,7 @@ function MenuModule:SocialHover(hoverFunc)

     if (totalOnlineFriends + totalBNOnlineFriends) > 0 then
       GameTooltip:SetOwner(MenuModule.frames.social, 'ANCHOR_'..xb.miniTextPosition)
-      GameTooltip:AddLine('[|cff6699FF'..L['Social']..'|r]')
+      GameTooltip:AddLine('[|cff6699FF'..SOCIAL_LABEL..'|r]')
       GameTooltip:AddLine(' ')
     end

@@ -302,18 +302,18 @@ function MenuModule:SocialHover(hoverFunc)
           end

           local _, _, _, realmName, _ = BNGetGameAccountInfo(gameAccount)
-          local status = L['Online']
+          local status = FRIENDS_LIST_ONLINE
           local statusIcon = FRIENDS_TEXTURE_ONLINE
           local socialIcon = MenuModule.socialIcons[gameClient].icon
           local gameName = MenuModule.socialIcons[gameClient].text

           if isAfk then
             statusIcon = FRIENDS_TEXTURE_AFK
-            status = L['AFK']
+            status = DEFAULT_AFK_MESSAGE
           end
           if isDnd then
             statusIcon = FRIENDS_TEXTURE_DND
-            status = L['DND']
+            status = DEFAULT_DND_MESSAGE
           end

           if gameClient == BNET_CLIENT_WOW then
@@ -337,18 +337,18 @@ function MenuModule:SocialHover(hoverFunc)
       for i = 1, GetNumFriends() do
         local name, level, class, area, isOnline, status, note = GetFriendInfo(i)
         if online then
-          local status = L['Online']
+          local status = FRIENDS_LIST_ONLINE
           local statusIcon = FRIENDS_TEXTURE_ONLINE
           if isAfk then
             statusIcon = FRIENDS_TEXTURE_AFK
-            status = L['AFK']
+            status = DEFAULT_AFK_MESSAGE
           end
           if isDnd then
             statusIcon = FRIENDS_TEXTURE_DND
-            status = L['DND']
+            status = DEFAULT_DND_MESSAGE
           end

-          local lineLeft = string.format("|T%s:16|t %s, "..L['Level']..":%s %s", statusIcon, name, level, class)
+          local lineLeft = string.format("|T%s:16|t %s, "..LEVEL..":%s %s", statusIcon, name, level, class)
           local lineRight = string.format("%s", area)
           GameTooltip:AddDoubleLine(lineLeft, lineRight)
         end -- isOnline
@@ -374,10 +374,10 @@ function MenuModule:GuildHover(hoverFunc)
     end
     GuildRoster()
     GameTooltip:SetOwner(MenuModule.frames.guild, 'ANCHOR_'..xb.miniTextPosition)
-    GameTooltip:AddLine("[|cff6699FF"..L['Guild'].."|r]")
+    GameTooltip:AddLine("[|cff6699FF"..GUILD.."|r]")
     GameTooltip:AddLine(" ")
     local gName, _, _, _ = GetGuildInfo('player')
-    GameTooltip:AddDoubleLine(L['Guild']..':', gName, 1, 1, 0, 0, 1, 0)
+    GameTooltip:AddDoubleLine(GUILD..':', gName, 1, 1, 0, 0, 1, 0)

     local totalGuild, _ = GetNumGuildMembers()
     for i = 0, totalGuild do
@@ -385,9 +385,9 @@ function MenuModule:GuildHover(hoverFunc)
       if isOnline then
         local colorHex = RAID_CLASS_COLORS[class].colorStr
         if status == 1 then
-          status = L['AFK'];
+          status = DEFAULT_AFK_MESSAGE;
         elseif status == 2 then
-          status = L['DND'];
+          status = DEFAULT_DND_MESSAGE;
         else
           status = ''
         end
diff --git a/modules/system.lua b/modules/system.lua
index 425e433..7848688 100644
--- a/modules/system.lua
+++ b/modules/system.lua
@@ -6,7 +6,7 @@ local L = XIVBar.L;
 local SystemModule = xb:NewModule("SystemModule", 'AceEvent-3.0', 'AceHook-3.0')

 function SystemModule:GetName()
-  return L['System'];
+  return SYSTEMOPTIONS_MENU;
 end

 function SystemModule:OnInitialize()
diff --git a/modules/talent.lua b/modules/talent.lua
index bc18973..31d5f15 100644
--- a/modules/talent.lua
+++ b/modules/talent.lua
@@ -57,8 +57,8 @@ function TalentModule:Refresh()
   if self.talentFrame == nil then return; end
   if not db.modules.talent.enabled then return; end

-  local artifactId = 0
-  --local artifactId = self.LAD:GetActiveArtifactID() or 0
+  --local artifactId = 0
+  local artifactId = self.LAD:GetActiveArtifactID() or 0

   self.currentSpecID = GetSpecialization()
   self.currentLootSpecID = GetLootSpecialization()
@@ -118,21 +118,6 @@ function TalentModule:Refresh()

   self.talentFrame:SetSize(self.specFrame:GetWidth(), xb:GetHeight())

-  local popupPadding = xb.constants.popupPadding
-  if db.general.barPosition == 'TOP' then
-    popupPadding = -(popupPadding)
-  end
-
-  self.specPopup:SetPoint(db.general.barPosition, self.specFrame, xb.miniTextPosition, 0, popupPadding)
-  self.specPopupTexture:SetColorTexture(db.color.barColor.r, db.color.barColor.g, db.color.barColor.b, db.color.barColor.a)
-  self.specPopupTexture:SetAllPoints()
-  self.specPopup:Hide()
-
-  self.lootSpecPopup:SetPoint(db.general.barPosition, self.specFrame, xb.miniTextPosition, 0, popupPadding)
-  self.lootSpecPopupTexture:SetColorTexture(db.color.barColor.r, db.color.barColor.g, db.color.barColor.b, db.color.barColor.a)
-  self.lootSpecPopupTexture:SetAllPoints()
-  self.lootSpecPopup:Hide()
-
   local relativeAnchorPoint = 'LEFT'
   local xOffset = db.general.moduleSpacing
   local anchorFrame = xb:GetFrame('clockFrame')
@@ -147,10 +132,12 @@ function TalentModule:Refresh()
     end
   end
   self.talentFrame:SetPoint('RIGHT', anchorFrame, relativeAnchorPoint, -(xOffset), 0)
+  self:CreateSpecPopup()
+  self:CreateLootSpecPopup()
 end

 function TalentModule:UpdateArtifactBar(artifactId)
-  return;
+  --if true then return; end
   local _, artifactData = self.LAD:GetArtifactInfo(artifactId)
   self.specBar:SetMinMaxValues(0, artifactData.maxPower)
   self.specBar:SetValue(artifactData.power)
@@ -214,6 +201,7 @@ function TalentModule:RegisterFrameEvents()
           end
         else
           self.lootSpecPopup:Hide()
+          self:CreateSpecPopup()
           self.specPopup:Show()
         end
       end
@@ -228,6 +216,7 @@ function TalentModule:RegisterFrameEvents()
           end
         else
           self.specPopup:Hide()
+          self:CreateLootSpecPopup()
           self.lootSpecPopup:Show()
         end
       end
@@ -335,6 +324,18 @@ function TalentModule:CreateSpecPopup()
     popupWidth = (self.specOptionString:GetStringWidth()  + self.extraPadding)
   end
   self.specPopup:SetSize(popupWidth, popupHeight + xb.constants.popupPadding)
+
+  local popupPadding = xb.constants.popupPadding
+  if db.general.barPosition == 'TOP' then
+    popupPadding = -(popupPadding)
+  end
+
+  self.specPopup:ClearAllPoints()
+  self.specPopupTexture:ClearAllPoints()
+  self.specPopup:SetPoint(db.general.barPosition, self.specFrame, xb.miniTextPosition, 0, popupPadding)
+  self.specPopupTexture:SetColorTexture(db.color.barColor.r, db.color.barColor.g, db.color.barColor.b, db.color.barColor.a)
+  self.specPopupTexture:SetAllPoints()
+  self.specPopup:Hide()
 end

 function TalentModule:CreateLootSpecPopup()
@@ -399,8 +400,11 @@ function TalentModule:CreateLootSpecPopup()
         if InCombatLockdown() then return; end
         if button == 'LeftButton' then
           local id = 0
+          local name = ''
           if self:GetID() ~= 0 then
-            id = GetSpecializationInfo(self:GetID())
+            id, name = GetSpecializationInfo(self:GetID())
+          else
+            name = GetSpecializationInfo(GetSpecialization())
           end
           SetLootSpecialization(id)
         end
@@ -437,6 +441,18 @@ function TalentModule:CreateLootSpecPopup()
     popupWidth = (self.lootSpecOptionString:GetStringWidth()  + self.extraPadding)
   end
   self.lootSpecPopup:SetSize(popupWidth, popupHeight + xb.constants.popupPadding)
+
+  local popupPadding = xb.constants.popupPadding
+  if db.general.barPosition == 'TOP' then
+    popupPadding = -(popupPadding)
+  end
+
+  self.lootSpecPopup:ClearAllPoints()
+  self.lootSpecPopupTexture:ClearAllPoints()
+  self.lootSpecPopup:SetPoint(db.general.barPosition, self.specFrame, xb.miniTextPosition, 0, popupPadding)
+  self.lootSpecPopupTexture:SetColorTexture(db.color.barColor.r, db.color.barColor.g, db.color.barColor.b, db.color.barColor.a)
+  self.lootSpecPopupTexture:SetAllPoints()
+  self.lootSpecPopup:Hide()
 end

 function TalentModule:ShowTooltip()
diff --git a/modules/tradeskill.lua b/modules/tradeskill.lua
index 7df146b..4a481cc 100644
--- a/modules/tradeskill.lua
+++ b/modules/tradeskill.lua
@@ -117,6 +117,12 @@ function TradeskillModule:StyleTradeskillFrame(framePrefix, profIndex)
   if skill == cap then
     textHeight = db.text.fontSize
   end
+
+  local barHeight = (iconSize - textHeight - 2)
+  if barHeight < 2 then
+    barHeight = 2
+  end
+
   self[framePrefix..'Icon']:SetTexture(icon)
   self[framePrefix..'Icon']:SetSize(iconSize, iconSize)
   self[framePrefix..'Icon']:SetPoint('LEFT')
@@ -136,7 +142,7 @@ function TradeskillModule:StyleTradeskillFrame(framePrefix, profIndex)
     else
       self[framePrefix..'Bar']:SetStatusBarColor(db.color.normal.r, db.color.normal.g, db.color.normal.b, db.color.normal.a)
     end
-    self[framePrefix..'Bar']:SetSize(self[framePrefix..'Text']:GetStringWidth(), (iconSize - textHeight - 2))
+    self[framePrefix..'Bar']:SetSize(self[framePrefix..'Text']:GetStringWidth(), barHeight)
     self[framePrefix..'Bar']:SetPoint('BOTTOMLEFT', self[framePrefix..'Icon'], 'BOTTOMRIGHT', 5, 0)

     self[framePrefix..'BarBg']:SetAllPoints()
@@ -250,7 +256,7 @@ function TradeskillModule:ShowTooltip()
   local recipeIds = C_TradeSkillUI.GetAllRecipeIDs()

   GameTooltip:AddLine(" ")
-  GameTooltip:AddDoubleLine('<'..L['Left-Click']..'>', L['Toggle Currency Frame'], 1, 1, 0, 1, 1, 1)
+  GameTooltip:AddDoubleLine('<'..L['Left-Click']..'>', BINDING_NAME_TOGGLECURRENCY, 1, 1, 0, 1, 1, 1)
   GameTooltip:Show()]]--
 end

diff --git a/modules/travel.lua b/modules/travel.lua
index 2441b49..e08b830 100644
--- a/modules/travel.lua
+++ b/modules/travel.lua
@@ -232,13 +232,19 @@ function TravelModule:SetPortColor()
   if InCombatLockdown() then return; end

   local db = xb.db.profile
-  local v = db.modules.travel.portItem.portId
-
-  if not (IsUsableItem(v) or IsPlayerSpell(v)) then
-    self.portButton:Hide()
-    return
+  local v = xb.db.char.portItem.portId
+
+  if not (self:IsUsable(v)) then
+    v = self:FindFirstOption()
+    v = v.portId
+    if not (self:IsUsable(v)) then
+      self.portButton:Hide()
+      return
+    end
   end

+
+
   if self.portButton:IsMouseOver() then
     self.portText:SetTextColor(unpack(xb:HoverColors()))
   else
@@ -315,7 +321,7 @@ function TravelModule:CreatePortPopup()
         end)

         button:SetScript('OnClick', function(self)
-          xb.db.profile.modules.travel.portItem = self.portItem
+          xb.db.char.portItem = self.portItem
           TravelModule:Refresh()
         end)

@@ -361,7 +367,7 @@ function TravelModule:Refresh()

   if InCombatLockdown() then
     self.hearthText:SetText(GetBindLocation())
-    self.portText:SetText(xb.db.profile.modules.travel.portItem.text)
+    self.portText:SetText(xb.db.char.portItem.text)
     self:SetHearthColor()
     self:SetPortColor()
     return
@@ -389,7 +395,7 @@ function TravelModule:Refresh()
   self:SetHearthColor()

   self.portText:SetFont(xb:GetFont(db.text.fontSize))
-  self.portText:SetText(db.modules.travel.portItem.text)
+  self.portText:SetText(xb.db.char.portItem.text)

   self.portButton:SetSize(self.portText:GetWidth() + iconSize + db.general.barPadding, xb:GetHeight())
   self.portButton:SetPoint("LEFT", -(db.general.barPadding), 0)
@@ -404,7 +410,20 @@ function TravelModule:Refresh()
   self:SetPortColor()

   self:CreatePortPopup()
-  self.portPopup:SetPoint('BOTTOM', self.portButton, 'TOP', 0, xb.constants.popupPadding)
+
+  local popupPadding = xb.constants.popupPadding
+  local popupPoint = 'BOTTOM'
+  local relPoint = 'TOP'
+  if db.general.barPosition == 'TOP' then
+    popupPadding = -(popupPadding)
+    popupPoint = 'TOP'
+    relPoint = 'BOTTOM'
+  end
+
+  self.portPopup:ClearAllPoints()
+  self.popupTexture:ClearAllPoints()
+
+  self.portPopup:SetPoint(popupPoint, self.portButton, relPoint, 0, popupPadding)
   self.popupTexture:SetColorTexture(db.color.barColor.r, db.color.barColor.g, db.color.barColor.b, db.color.barColor.a)
   self.popupTexture:SetAllPoints()
   self.portPopup:Hide()
@@ -417,14 +436,28 @@ function TravelModule:Refresh()
   self.hearthFrame:SetPoint("RIGHT", -(db.general.barPadding), 0)
 end

-function TravelModule:GetDefaultOptions()
-  local firstItem = select(1, self.portOptions)
-  if not firstItem then
-    firstItem = {portId = 140192, text = GetMapNameByID(1014)}
+function TravelModule:FindFirstOption()
+  local firstItem = {portId = 140192, text = GetMapNameByID(1014)}
+  if self.portOptions then
+    for k,v in pairs(self.portOptions) do
+      if self:IsUsable(v.portId) then
+        firstItem = v
+        break
+      end
+    end
   end
+  return firstItem
+end
+
+function TravelModule:IsUsable(id)
+  return IsUsableItem(id) or IsPlayerSpell(id)
+end
+
+function TravelModule:GetDefaultOptions()
+  local firstItem = self:FindFirstOption()
+  xb.db.char.portItem = xb.db.char.portItem or firstItem
   return 'travel', {
-    enabled = true,
-    portItem = firstItem
+    enabled = true
   }
 end