diff --git a/IceBarElement.lua b/IceBarElement.lua index ceea8d5..570ec0f 100644 --- a/IceBarElement.lua +++ b/IceBarElement.lua @@ -1,3 +1,4 @@ +local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) local DogTag = nil IceBarElement = IceCore_CreateClass(IceElement) @@ -120,14 +121,14 @@ function IceBarElement.prototype:GetOptions() opts["headerLookAndFeel"] = { type = 'header', - name = 'Look and Feel', + name = L["Look and Feel"], order = 29.9 } opts["side"] = { type = 'select', - name = 'Side|r', - desc = 'Side of the HUD where the bar appears', + name = L["Side"], + desc = L["Side of the HUD where the bar appears"], get = function(info) if (self.moduleSettings.side == IceCore.Side.Right) then return 2 @@ -153,8 +154,8 @@ function IceBarElement.prototype:GetOptions() opts["offset"] = { type = 'range', - name = 'Offset', - desc = 'Offset of the bar', + name = L["Offset"], + desc = L["Offset of the bar"], min = -10, max = 15, step = 1, @@ -174,8 +175,8 @@ function IceBarElement.prototype:GetOptions() opts["scale"] = { type = 'range', - name = 'Scale', - desc = 'Scale of the bar', + name = L["Scale"], + desc = L["Scale of the bar"], min = 0.1, max = 2, step = 0.05, @@ -196,8 +197,8 @@ function IceBarElement.prototype:GetOptions() opts["inverse"] = { type = 'toggle', - name = 'Invert bar', - desc = 'Controls which direction the bar fills up. With this checked, the bar will fill opposite from normal (e.g. for health: 0% at the top, 100% at the bottom).', + name = L["Invert bar"], + desc = L["Controls which direction the bar fills up. With this checked, the bar will fill opposite from normal (e.g. for health: 0% at the top, 100% at the bottom)."], get = function() return self.moduleSettings.inverse end, @@ -215,8 +216,8 @@ function IceBarElement.prototype:GetOptions() opts["reverse"] = { type = 'toggle', - name = 'Reverse direction', - desc = "Controls what it means for the bar to be filled. A normal bar will grow larger as the value grows from 0% to 100%. A reversed bar will shrink as the value grows from 0% to 100%.", + name = L["Reverse direction"], + desc = L["Controls what it means for the bar to be filled. A normal bar will grow larger as the value grows from 0% to 100%. A reversed bar will shrink as the value grows from 0% to 100%."], get = function() return self.moduleSettings.reverse end, @@ -233,8 +234,8 @@ function IceBarElement.prototype:GetOptions() opts["barVisible"] = { type = 'toggle', - name = 'Bar visible', - desc = 'Toggle bar visibility', + name = L["Bar visible"], + desc = L["Toggle bar visibility"], get = function() return self.moduleSettings.barVisible['bar'] end, @@ -254,8 +255,8 @@ function IceBarElement.prototype:GetOptions() opts["bgVisible"] = { type = 'toggle', - name = 'Bar background visible', - desc = 'Toggle bar background visibility', + name = L["Bar background visible"], + desc = L["Toggle bar background visibility"], get = function() return self.moduleSettings.barVisible['bg'] end, @@ -275,14 +276,14 @@ function IceBarElement.prototype:GetOptions() if not self.moduleSettings.hideAnimationSettings then opts["headerAnimation"] = { type = 'header', - name = 'Animation Settings', + name = L["Animation Settings"], order = 110 } opts["shouldAnimate"] = { type = 'toggle', - name = 'Animate changes', - desc = 'Whether or not to animate the bar falloffs/gains', + name = L["Animate changes"], + desc = L["Whether or not to animate the bar falloffs/gains"], get = function() return self.moduleSettings.shouldAnimate end, @@ -299,8 +300,8 @@ if not self.moduleSettings.hideAnimationSettings then opts["desiredLerpTime"] = { type = 'range', - name = 'Animation Duration', - desc = 'How long the animation should take to play', + name = L["Animation Duration"], + desc = L["How long the animation should take to play"], min = 0, max = 2, step = 0.05, @@ -320,8 +321,8 @@ end opts["widthModifier"] = { type = 'range', - name = 'Bar width modifier', - desc = 'Make this bar wider or thinner than others', + name = L["Bar width modifier"], + desc = L["Make this bar wider or thinner than others"], min = -80, max = 80, step = 1, @@ -341,8 +342,8 @@ end opts["barVerticalOffset"] = { type='range', - name = 'Bar vertical offset', - desc = 'Adjust the vertical placement of this bar', + name = L["Bar vertical offset"], + desc = L["Adjust the vertical placement of this bar"], min = -400, max = 600, step = 1, @@ -362,8 +363,8 @@ end opts["barHorizontalAdjust"] = { type='range', - name = 'Bar horizontal adjust', - desc = "This is a per-pixel horizontal adjustment. You should probably use the 'offset' setting above as it is designed to snap bars together. This may be used in the case of a horizontal bar needing to be positioned outside the normal bar locations.", + name = L["Bar horizontal adjust"], + desc = L["This is a per-pixel horizontal adjustment. You should probably use the 'offset' setting above as it is designed to snap bars together. This may be used in the case of a horizontal bar needing to be positioned outside the normal bar locations."], min = -400, max = 600, step = 1, @@ -383,8 +384,8 @@ end opts["shouldUseOverride"] = { type = 'toggle', - name = 'Override global texture', - desc = 'This will override the global bar texture setting for this bar with the one specified below.', + name = L["Override global texture"], + desc = L["This will override the global bar texture setting for this bar with the one specified below."], get = function() return self.moduleSettings.shouldUseOverride end, @@ -404,8 +405,8 @@ end opts["barTextureOverride"] = { type = 'select', - name = 'Bar Texture Override', - desc = 'This will override the global bar texture setting for this bar.', + name = L["Bar Texture Override"], + desc = L["This will override the global bar texture setting for this bar."], get = function(info) return IceHUD:GetSelectValue(info, self.moduleSettings.barTextureOverride) end, @@ -424,8 +425,8 @@ end opts["barRotate"] = { type = 'toggle', - name = 'Rotate 90 degrees', - desc = "This will rotate this module by 90 degrees to give a horizontal orientation.\n\nWARNING: This feature is brand new and a bit rough around the edges. You will need to greatly adjust the vertical and horizontal offset of this bar plus move the text around in order for it to look correct.\n\nAnd I mean greatly.", + name = L["Rotate 90 degrees"], + desc = L["This will rotate this module by 90 degrees to give a horizontal orientation.\n\nWARNING: This feature is brand new and a bit rough around the edges. You will need to greatly adjust the vertical and horizontal offset of this bar plus move the text around in order for it to look correct.\n\nAnd I mean greatly."], get = function(info) return self.moduleSettings.rotateBar end, @@ -446,8 +447,8 @@ end opts["textSettings"] = { type = 'group', - name = '|c'..self.configColor..'Text Settings|r', - desc = 'Settings related to texts', + name = "|c"..self.configColor..L["Text Settings"].."|r", + desc = L["Settings related to texts"], order = 32, disabled = function() return not self.moduleSettings.enabled @@ -455,8 +456,8 @@ end args = { fontsize = { type = 'range', - name = 'Bar Font Size', - desc = 'Bar Font Size', + name = L["Bar Font Size"], + desc = L["Bar Font Size"], get = function() return self.moduleSettings.barFontSize end, @@ -472,8 +473,8 @@ end lockUpperFontAlpha = { type = "toggle", - name = "Lock Upper Text Alpha", - desc = "Locks upper text alpha to 100%", + name = L["Lock Upper Text Alpha"], + desc = L["Locks upper text alpha to 100%"], get = function() return self.moduleSettings.lockUpperTextAlpha end, @@ -486,8 +487,8 @@ end lockLowerFontAlpha = { type = "toggle", - name = "Lock Lower Text Alpha", - desc = "Locks lower text alpha to 100%", + name = L["Lock Lower Text Alpha"], + desc = L["Locks lower text alpha to 100%"], get = function() return self.moduleSettings.lockLowerTextAlpha end, @@ -500,8 +501,8 @@ end upperTextVisible = { type = 'toggle', - name = 'Upper text visible', - desc = 'Toggle upper text visibility', + name = L["Upper text visible"], + desc = L["Toggle upper text visibility"], get = function() return self.moduleSettings.textVisible['upper'] end, @@ -514,8 +515,8 @@ end lowerTextVisible = { type = 'toggle', - name = 'Lower text visible', - desc = 'Toggle lower text visibility', + name = L["Lower text visible"], + desc = L["Toggle lower text visibility"], get = function() return self.moduleSettings.textVisible['lower'] end, @@ -528,8 +529,8 @@ end upperTextString = { type = 'input', - name = 'Upper Text', - desc = 'The upper text to display under this bar (accepts LibDogTag formatting)\n\nSee http://www.wowace.com/wiki/LibDogTag-2.0/ or type /dogtag for tag info.\n\nRemember to press ENTER after filling out this box or it will not save.', + name = L["Upper Text"], + desc = L["The upper text to display under this bar (accepts LibDogTag formatting)\n\nSee http://www.wowace.com/wiki/LibDogTag-2.0/ or type /dogtag for tag info.\n\nRemember to press ENTER after filling out this box or it will not save."], hidden = function() return DogTag == nil or not self.moduleSettings.usesDogTagStrings end, @@ -551,8 +552,8 @@ end lowerTextString = { type = 'input', - name = 'Lower Text', - desc = 'The lower text to display under this bar (accepts LibDogTag formatting)\n\nSee http://www.wowace.com/wiki/LibDogTag-2.0/ or type /dogtag for tag info.\n\nRemember to press ENTER after filling out this box or it will not save.', + name = L["Lower Text"], + desc = L["The lower text to display under this bar (accepts LibDogTag formatting)\n\nSee http://www.wowace.com/wiki/LibDogTag-2.0/ or type /dogtag for tag info.\n\nRemember to press ENTER after filling out this box or it will not save."], hidden = function() return DogTag == nil or not self.moduleSettings.usesDogTagStrings end, @@ -574,8 +575,8 @@ end forceJustifyText = { type = 'select', - name = 'Force Text Justification', - desc = 'This sets the alignment for the text on this bar', + name = L["Force Text Justification"], + desc = L["This sets the alignment for the text on this bar"], get = function(info) return self.moduleSettings.forceJustifyText end, @@ -591,8 +592,8 @@ end textVerticalOffset = { type = 'range', - name = 'Text Vertical Offset', - desc = 'Offset of the text from the bar vertically (negative is farther below)', + name = L["Text Vertical Offset"], + desc = L["Offset of the text from the bar vertically (negative is farther below)"], min = -450, max = 350, step = 1, @@ -610,8 +611,8 @@ end textHorizontalOffset = { type = 'range', - name = 'Text Horizontal Offset', - desc = 'Offset of the text from the bar horizontally', + name = L["Text Horizontal Offset"], + desc = L["Offset of the text from the bar horizontally"], min = -350, max = 350, step = 1, @@ -632,8 +633,8 @@ if not self.moduleSettings.bHideMarkerSettings then opts["markerSettings"] = { type = 'group', - name = '|c'..self.configColor..'Marker Settings|r', - desc = 'Create or remove markers at various points along the bar here', + name = "|c"..self.configColor..L["Marker Settings"].."|r", + desc = L["Create or remove markers at various points along the bar here"], order = 32, disabled = function() return not self.moduleSettings.enabled @@ -644,8 +645,8 @@ if not self.moduleSettings.bHideMarkerSettings then min = 0, max = 100, step = 1, - name = "Position (percent)", - desc = "This specifies at what point along the bar this marker should be displayed. Remember to press ENTER when you are done typing.\n\nExample: if you wanted a marker at 40 energy and you have 100 total energy, then this would be 40. If you want it at 40 energy and you have 120 total energy, then this would be 33.", + name = L["Position (percent)"], + desc = L["This specifies at what point along the bar this marker should be displayed. Remember to press ENTER when you are done typing.\n\nExample: if you wanted a marker at 40 energy and you have 100 total energy, then this would be 40. If you want it at 40 energy and you have 120 total energy, then this would be 33."], get = function() return lastMarkerPosConfig end, @@ -656,8 +657,8 @@ if not self.moduleSettings.bHideMarkerSettings then }, markerColor = { type = "color", - name = "Color", - desc = "The color this marker should be.", + name = L["Color"], + desc = L["The color this marker should be."], width = "half", get = function() return lastMarkerColorConfig.r, lastMarkerColorConfig.g, lastMarkerColorConfig.b, lastMarkerColorConfig.a @@ -672,8 +673,8 @@ if not self.moduleSettings.bHideMarkerSettings then min = 1, step = 1, max = self.settings.barHeight, - name = "Height", - desc = "The height of the marker on the bar.", + name = L["Height"], + desc = L["The height of the marker on the bar."], get = function() return lastMarkerHeightConfig end, @@ -684,8 +685,8 @@ if not self.moduleSettings.bHideMarkerSettings then }, createMarker = { type = "execute", - name = "Create marker", - desc = "Creates a new marker with the chosen settings.", + name = L["Create marker"], + desc = L["Creates a new marker with the chosen settings."], width = "full", func = function() self:AddNewMarker(lastMarkerPosConfig / 100, lastMarkerColorConfig, lastMarkerHeightConfig) @@ -694,8 +695,8 @@ if not self.moduleSettings.bHideMarkerSettings then }, listMarkers = { type = "select", - name = "Edit Marker", - desc = "Choose a marker to edit. This will place the marker's settings in the fields above here.", + name = L["Edit Marker"], + desc = L["Choose a marker to edit. This will place the marker's settings in the fields above here."], values = function() local retval = {} if self.moduleSettings.markers then @@ -719,8 +720,8 @@ if not self.moduleSettings.bHideMarkerSettings then }, editMarker = { type = "execute", - name = "Update", - desc = "This will update the marker selected in the 'edit marker' box with the values specified.", + name = L["Update"], + desc = L["This will update the marker selected in the 'edit marker' box with the values specified."], func = function() if self.moduleSettings.markers and lastEditMarkerConfig <= #self.moduleSettings.markers then self:EditMarker(lastEditMarkerConfig, lastMarkerPosConfig / 100, lastMarkerColorConfig, lastMarkerHeightConfig) @@ -730,8 +731,8 @@ if not self.moduleSettings.bHideMarkerSettings then }, deleteMarker = { type = "execute", - name = "Remove", - desc = "This will remove the marker selected in the 'edit marker' box. This action is irreversible.", + name = L["Remove"], + desc = L["This will remove the marker selected in the 'edit marker' box. This action is irreversible."], func = function() if self.moduleSettings.markers and lastEditMarkerConfig <= #self.moduleSettings.markers then self:RemoveMarker(lastEditMarkerConfig) diff --git a/IceCastBar.lua b/IceCastBar.lua index 545f04c..4941ae1 100644 --- a/IceCastBar.lua +++ b/IceCastBar.lua @@ -1,3 +1,4 @@ +local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) IceCastBar = IceCore_CreateClass(IceBarElement) @@ -70,8 +71,8 @@ function IceCastBar.prototype:GetOptions() opts["showCastTime"] = { type = 'toggle', - name = 'Show spell cast time', - desc = 'Whether or not to show the remaining cast time of a spell being cast.', + name = L["Show spell cast time"], + desc = L["Whether or not to show the remaining cast time of a spell being cast."], get = function() return self.moduleSettings.showCastTime end, @@ -87,8 +88,8 @@ function IceCastBar.prototype:GetOptions() opts["showSpellRank"] = { type = 'toggle', - name = 'Show spell rank', - desc = 'Whether or not to show the rank of a spell being cast.', + name = L["Show spell rank"], + desc = L["Whether or not to show the rank of a spell being cast."], get = function() return self.moduleSettings.showSpellRank end, @@ -103,12 +104,12 @@ function IceCastBar.prototype:GetOptions() opts["iconSettings"] = { type = 'group', - name = '|c'..self.configColor..'Icon Settings|r', + name = "|c"..self.configColor..L["Icon Settings"].."|r", args = { displayAuraIcon = { type = 'toggle', - name = "Display aura icon", - desc = "Whether or not to display an icon for the aura that this bar is tracking", + name = L["Display aura icon"], + desc = L["Whether or not to display an icon for the aura that this bar is tracking"], get = function() return self.moduleSettings.displayAuraIcon end, @@ -133,8 +134,8 @@ function IceCastBar.prototype:GetOptions() min = -250, max = 250, step = 1, - name = "Aura icon horizontal offset", - desc = "Adjust the horizontal position of the aura icon", + name = L["Aura icon horizontal offset"], + desc = L["Adjust the horizontal position of the aura icon"], get = function() return self.moduleSettings.auraIconXOffset end, @@ -153,8 +154,8 @@ function IceCastBar.prototype:GetOptions() min = -250, max = 250, step = 1, - name = "Aura icon vertical offset", - desc = "Adjust the vertical position of the aura icon", + name = L["Aura icon vertical offset"], + desc = L["Adjust the vertical position of the aura icon"], get = function() return self.moduleSettings.auraIconYOffset end, @@ -173,8 +174,8 @@ function IceCastBar.prototype:GetOptions() min = 0.1, max = 3.0, step = 0.05, - name = 'Aura icon scale', - desc = 'Adjusts the size of the aura icon for this bar', + name = L["Aura icon scale"], + desc = L["Adjusts the size of the aura icon for this bar"], get = function() return self.moduleSettings.auraIconScale end, @@ -192,8 +193,8 @@ function IceCastBar.prototype:GetOptions() opts["reverseChannel"] = { type = 'toggle', - name = "Reverse channeling", - desc = "Whether or not to reverse the direction of the cast bar when a spell is being channeled. For example, if a normal cast causes this bar to fill up, then checking this option will cause a channeled spell to empty the bar instead.", + name = L["Reverse channeling"], + desc = L["Whether or not to reverse the direction of the cast bar when a spell is being channeled. For example, if a normal cast causes this bar to fill up, then checking this option will cause a channeled spell to empty the bar instead."], get = function() return self.moduleSettings.reverseChannel end, diff --git a/IceCore.lua b/IceCore.lua index c9a9d75..b5659c8 100644 --- a/IceCore.lua +++ b/IceCore.lua @@ -1,3 +1,4 @@ +local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) function IceCore_CreateClass(parent) local class = { prototype = {} } if parent then @@ -336,7 +337,7 @@ function IceCore.prototype:GetModuleOptions() options["aaaClickPlus"] = { type = 'description', fontSize = 'large', - name = 'Click the + next to |cffffdc42Module Settings|r to see the available modules that you can tweak.\n\nAlso notice that some modules have a + next to them. This will open up additional settings such as text tweaks and icon tweaks on that module.', + name = L["Click the + next to |cffffdc42Module Settings|r to see the available modules that you can tweak.\n\nAlso notice that some modules have a + next to them. This will open up additional settings such as text tweaks and icon tweaks on that module."], order = 1 } @@ -345,7 +346,7 @@ function IceCore.prototype:GetModuleOptions() local opt = self.elements[i]:GetOptions() options[modName] = { type = 'group', - desc = 'Module options', + desc = L["Module options"], name = modName, args = opt } diff --git a/IceElement.lua b/IceElement.lua index 6dc4f5c..94f0a5e 100644 --- a/IceElement.lua +++ b/IceElement.lua @@ -1,3 +1,4 @@ +local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) local SML = LibStub("LibSharedMedia-3.0") IceElement = IceCore_CreateClass() @@ -118,8 +119,8 @@ function IceElement.prototype:GetOptions() opts["enabled"] = { type = "toggle", - name = "Enabled", - desc = "Enable/disable module", + name = L["Enabled"], + desc = L["Enable/disable module"], get = function() return self.moduleSettings.enabled end, @@ -136,15 +137,15 @@ function IceElement.prototype:GetOptions() opts["headerVisibility"] = { type = 'header', - name = 'Visibility Settings', + name = L["Visibility Settings"], order = 27 } opts["scale"] = { type = 'range', - name = "Scale", - desc = 'Scale of the element', + name = L["Scale"], + desc = L["Scale of the element"], min = 0.2, max = 2, step = 0.1, @@ -166,8 +167,8 @@ function IceElement.prototype:GetOptions() opts["alwaysFullAlpha"] = { type = 'toggle', - name = 'Always show at 100% alpha', - desc = 'Whether to always show this module at 100% alpha or not', + name = L["Always show at 100% alpha"], + desc = L["Whether to always show this module at 100% alpha or not"], width = 'double', get = function() return self.moduleSettings.alwaysFullAlpha diff --git a/IceHUD.lua b/IceHUD.lua index 4694347..19faf2d 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -1,3 +1,4 @@ +local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) IceHUD = LibStub("AceAddon-3.0"):NewAddon("IceHUD", "AceConsole-3.0") local SML = LibStub("LibSharedMedia-3.0") @@ -43,21 +44,21 @@ IceHUD.Location = "Interface\\AddOns\\IceHUD" IceHUD.options = { type = 'group', - name = "IceHUD", - desc = "IceHUD", + name = L["IceHUD"], + desc = L["IceHUD"], icon = "Interface\\Icons\\Spell_Frost_Frost", args = { headerGeneral = { type = 'header', - name = "General Settings", + name = L["General Settings"], order = 10 }, faq = { type = 'group', - name = 'FAQs', - desc = 'Answers to questions that are frequently asked.', + name = L["FAQs"], + desc = L["Answers to questions that are frequently asked."], order = 1, args = { test = { @@ -104,14 +105,14 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe positioningSettings = { type = 'group', - name = 'Positioning Settings', - desc = 'Settings related to positioning and alpha', + name = L["Positioning Settings"], + desc = L["Settings related to positioning and alpha"], order = 11, args = { vpos = { type = 'range', - name = 'Vertical position', - desc = 'Vertical position', + name = L["Vertical position"], + desc = L["Vertical position"], get = function() return IceHUD.IceCore:GetVerticalPos() end, @@ -126,8 +127,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe hpos = { type = 'range', - name = 'Horizontal position', - desc = 'Horizontal position (for you dual screen freaks)', + name = L["Horizontal position"], + desc = L["Horizontal position (for you dual screen freaks)"], get = function() return IceHUD.IceCore:GetHorizontalPos() end, @@ -142,8 +143,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe gap = { type = 'range', - name = 'Gap', - desc = 'Distance between the left and right bars', + name = L["Gap"], + desc = L["Distance between the left and right bars"], get = function() return IceHUD.IceCore:GetGap() end, @@ -158,8 +159,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe scale = { type = 'range', - name = 'Scale', - desc = 'HUD scale', + name = L["Scale"], + desc = L["HUD scale"], get = function() return IceHUD.IceCore:GetScale() end, @@ -178,20 +179,20 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe alphaSettings = { type = 'group', - name = 'Transparency Settings', - desc = 'Settings for bar transparencies', + name = L["Transparency Settings"], + desc = L["Settings for bar transparencies"], order = 12, args = { headerAlpha = { type = 'header', - name = "Bar Alpha", + name = L["Bar Alpha"], order = 10 }, alphaic = { type = 'range', - name = 'Alpha in combat', - desc = 'Bar alpha In Combat', + name = L["Alpha in combat"], + desc = L["Bar alpha In Combat"], get = function() return IceHUD.IceCore:GetAlpha("IC") end, @@ -207,8 +208,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe alphaooc = { type = 'range', - name = 'Alpha out of combat', - desc = 'Bar alpha Out Of Combat without target', + name = L["Alpha out of combat"], + desc = L["Bar alpha Out Of Combat without target"], get = function() return IceHUD.IceCore:GetAlpha("OOC") end, @@ -224,8 +225,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe alphaTarget = { type = 'range', - name = 'Alpha OOC and Target', - desc = 'Bar alpha Out Of Combat with target accuired (takes precedence over Not Full)', + name = L["Alpha OOC and Target"], + desc = L["Bar alpha Out Of Combat with target accuired (takes precedence over Not Full)"], get = function() return IceHUD.IceCore:GetAlpha("Target") end, @@ -241,8 +242,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe alphaNotFull = { type = 'range', - name = 'Alpha OOC and not full', - desc = 'Bar alpha Out Of Combat with target accuired or bar not full (Target takes precedence over this)', + name = L["Alpha OOC and not full"], + desc = L["Bar alpha Out Of Combat with target accuired or bar not full (Target takes precedence over this)"], get = function() return IceHUD.IceCore:GetAlpha("NotFull") end, @@ -259,14 +260,14 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe headerAlphaBackground = { type = 'header', - name = "Background Alpha", + name = L["Background Alpha"], order = 20 }, alphaicbg = { type = 'range', - name = 'BG Alpha in combat', - desc = 'Background alpha for bars IC', + name = L["BG Alpha in combat"], + desc = L["Background alpha for bars IC"], get = function() return IceHUD.IceCore:GetAlphaBG("IC") end, @@ -282,8 +283,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe alphaoocbg = { type = 'range', - name = 'BG Alpha out of combat', - desc = 'Background alpha for bars OOC without target', + name = L["BG Alpha out of combat"], + desc = L["Background alpha for bars OOC without target"], get = function() return IceHUD.IceCore:GetAlphaBG("OOC") end, @@ -299,8 +300,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe alphaTargetbg = { type = 'range', - name = 'BG Alpha OOC and Target', - desc = 'Background alpha for bars OOC and target accuired (takes precedence over Not Full)', + name = L["BG Alpha OOC and Target"], + desc = L["Background alpha for bars OOC and target accuired (takes precedence over Not Full)"], get = function() return IceHUD.IceCore:GetAlphaBG("Target") end, @@ -316,8 +317,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe alphaNotFullbg = { type = 'range', - name = 'BG Alpha OOC and not Full', - desc = 'Background alpha for bars OOC and bar not full (Target takes precedence over this)', + name = L["BG Alpha OOC and not Full"], + desc = L["Background alpha for bars OOC and bar not full (Target takes precedence over this)"], get = function() return IceHUD.IceCore:GetAlphaBG("NotFull") end, @@ -334,14 +335,14 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe headerBarAdvanced = { type = 'header', - name = "Other", + name = L["Other"], order = 30 }, backgroundToggle = { type = "toggle", - name = "Contextual Background", - desc = "Toggles contextual background coloring", + name = L["Contextual Background"], + desc = L["Toggles contextual background coloring"], get = function() return IceHUD.IceCore:GetBackgroundToggle() end, @@ -353,8 +354,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe backgroundColor = { type = 'color', - name = 'Background Color', - desc = 'Background Color', + name = L["Background Color"], + desc = L["Background Color"], get = function() return IceHUD.IceCore:GetBackgroundColor() end, @@ -369,8 +370,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe textSettings = { type = 'select', - name = 'Font', - desc = 'IceHUD Font', + name = L["Font"], + desc = L["IceHUD Font"], order = 19, get = function(info) return IceHUD:GetSelectValue(info, IceHUD.IceCore:GetFontFamily()) @@ -384,14 +385,14 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe barSettings = { type = 'group', - name = 'Bar Settings', - desc = 'Settings related to bars', + name = L["Bar Settings"], + desc = L["Settings related to bars"], order = 20, args = { barPresets = { type = 'select', - name = 'Presets', - desc = 'Predefined settings for different bars', + name = L["Presets"], + desc = L["Predefined settings for different bars"], get = function(info) return IceHUD:GetSelectValue(info, IceHUD.IceCore:GetBarPreset()) end, @@ -405,14 +406,14 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe headerBarAdvanced = { type = 'header', - name = "Advanced Bar Settings", + name = L["Advanced Bar Settings"], order = 10 }, barTexture = { type = 'select', - name = 'Bar Texture', - desc = 'IceHUD Bar Texture', + name = L["Bar Texture"], + desc = L["IceHUD Bar Texture"], get = function(info) return IceHUD:GetSelectValue(info, IceHUD.IceCore:GetBarTexture()) end, @@ -425,8 +426,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe barWidth = { type = 'range', - name = 'Bar Width', - desc = 'Bar texture width (not the actual bar!)', + name = L["Bar Width"], + desc = L["Bar texture width (not the actual bar!)"], get = function() return IceHUD.IceCore:GetBarWidth() end, @@ -441,8 +442,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe barHeight = { type = 'range', - name = 'Bar Height', - desc = 'Bar texture height (not the actual bar!)', + name = L["Bar Height"], + desc = L["Bar texture height (not the actual bar!)"], get = function() return IceHUD.IceCore:GetBarHeight() end, @@ -457,8 +458,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe barProportion = { type = 'range', - name = 'Bar Proportion', - desc = 'Determines the bar width compared to the whole texture width', + name = L["Bar Proportion"], + desc = L["Determines the bar width compared to the whole texture width"], get = function() return IceHUD.IceCore:GetBarProportion() end, @@ -474,8 +475,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe barSpace = { type = 'range', - name = 'Bar Space', - desc = 'Space between bars on the same side', + name = L["Bar Space"], + desc = L["Space between bars on the same side"], get = function() return IceHUD.IceCore:GetBarSpace() end, @@ -490,8 +491,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe bgBlendMode = { type = 'select', - name = 'Bar Background Blend Mode', - desc = 'IceHUD Bar Background Blend mode', + name = L["Bar Background Blend Mode"], + desc = L["IceHUD Bar Background Blend mode"], get = function(info) return IceHUD.IceCore:GetBarBgBlendMode() end, @@ -504,8 +505,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe barBlendMode = { type = 'select', - name = 'Bar Blend Mode', - desc = 'IceHUD Bar Blend mode', + name = L["Bar Blend Mode"], + desc = L["IceHUD Bar Blend mode"], get = function(info) return IceHUD.IceCore:GetBarBlendMode() end, @@ -521,24 +522,24 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe modules = { type='group', - desc = 'Module configuration options', - name = 'Module Settings', + desc = L["Module configuration options"], + name = L["Module Settings"], args = {}, order = 41 }, colors = { type='group', - desc = 'Module color configuration options', - name = 'Colors', + desc = L["Module color configuration options"], + name = L["Colors"], args = {}, order = 42 }, enabled = { type = "toggle", - name = "Enabled", - desc = "Enable/disable IceHUD", + name = L["Enabled"], + desc = L["Enable/disable IceHUD"], get = function() return IceHUD.IceCore:IsEnabled() end, @@ -554,8 +555,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe debug = { type = "toggle", - name = "Debugging", - desc = "Enable/disable debug messages", + name = L["Debugging"], + desc = L["Enable/disable debug messages"], get = function() return IceHUD.IceCore:GetDebug() end, @@ -584,8 +585,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe customModuleSelect = { type = "select", - name = "Create custom module", - desc = "Select a custom module that you want to create here, then press the 'Create' button.", + name = L["Create custom module"], + desc = L["Select a custom module that you want to create here, then press the 'Create' button."], get = function(info) return lastCustomModule end, @@ -598,8 +599,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe customModuleCreate = { type = "execute", - name = "Create", - desc = "Creates the selected custom module", + name = L["Create"], + desc = L["Creates the selected custom module"], func = function() IceHUD:CreateCustomModuleAndNotify(lastCustomModule) end, @@ -608,8 +609,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe configMode = { type = 'toggle', - name = 'Configuration Mode', - desc = "Makes all modules visible so you can see where they're placed and find any that are overlapping.", + name = L["Configuration Mode"], + desc = L["Makes all modules visible so you can see where they're placed and find any that are overlapping."], get = function() return IceHUD.IceCore:IsInConfigMode() end, @@ -621,8 +622,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe useDogTags = { type = 'toggle', - name = 'Use Dog Tags', - desc = 'Whether or not the addon should use the DogTag library (this will increase the CPU usage of the mod). DogTag controls all text displayed around bars such as health or mana amounts. Type |cffffff78/dog|r to see all DogTag options.\n\nNOTE: after changing this option, you must reload the UI or else bad things happen', + name = L["Use Dog Tags"], + desc = L["Whether or not the addon should use the DogTag library (this will increase the CPU usage of the mod). DogTag controls all text displayed around bars such as health or mana amounts. Type |cffffff78/dog|r to see all DogTag options.\n\nNOTE: after changing this option, you must reload the UI or else bad things happen"], get = function() return IceHUD.IceCore:ShouldUseDogTags() end, @@ -638,8 +639,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe updatePeriod = { type = 'range', - name = 'Update Period', - desc = 'Time between display updates in seconds', + name = L["Update Period"], + desc = L["Time between display updates in seconds"], get = function() return IceHUD.IceCore:UpdatePeriod() end, @@ -654,8 +655,8 @@ Expand "|cffffdc42Module Settings|r", expand PlayerInfo (or TargetInfo for targe showMinimap = { type = 'toggle', - name = "Show Minimap Icon", - desc = "Whether or not to show an IceHUD icon on the minimap.", + name = L["Show Minimap Icon"], + desc = L["Whether or not to show an IceHUD icon on the minimap."], get = function(info) return not IceHUD.db.profile.minimap.hide end, @@ -926,8 +927,8 @@ function IceHUD:SetupProfileImportButtons() AceSerializer:Embed(self) self.options.args.profiles.args.export = { type = 'execute', - name = 'Export profile', - desc = 'Exports your active profile to something you can copy and paste to another user or use on another account.', + name = L["Export profile"], + desc = L["Exports your active profile to something you can copy and paste to another user or use on another account."], func = function() local frame = AceGUI:Create("Frame") frame:SetTitle("Profile data") @@ -967,8 +968,8 @@ function IceHUD:SetupProfileImportButtons() self.options.args.profiles.args.import = { type = 'execute', - name = 'Import profile', - desc = "Imports a profile as exported from another user's IceHUD.", + name = L["Import profile"], + desc = L["Imports a profile as exported from another user's IceHUD."], func = function() local frame = AceGUI:Create("Frame") frame:SetTitle("Profile data") diff --git a/IceHUD.toc b/IceHUD.toc index cee2d37..2724c68 100644 --- a/IceHUD.toc +++ b/IceHUD.toc @@ -15,6 +15,9 @@ embeds.xml #@end-no-lib-strip@ +# Localization +loc\loc.xml + # IceHUD core functionality IceCore.lua IceHUD.lua diff --git a/IceUnitBar.lua b/IceUnitBar.lua index fd32af6..d6cdf79 100644 --- a/IceUnitBar.lua +++ b/IceUnitBar.lua @@ -1,3 +1,4 @@ +local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false) IceUnitBar = IceCore_CreateClass(IceBarElement) IceUnitBar.prototype.unit = nil @@ -69,8 +70,8 @@ function IceUnitBar.prototype:GetOptions() opts["lowThreshold"] = { type = 'range', - name = 'Low Threshold', - desc = 'Threshold of pulsing the bar (0 means never) (for player applies only to mana, not rage/energy/runic power)', + name = L["Low Threshold"], + desc = L["Threshold of pulsing the bar (0 means never) (for player applies only to mana, not rage/energy/runic power)"], get = function() return self.moduleSettings.lowThreshold end, @@ -89,8 +90,8 @@ function IceUnitBar.prototype:GetOptions() } opts["lowThresholdFlash"] = { type = 'toggle', - name = 'Flash bar below Low Threshold', - desc = 'Flashes the bar when it is below the Low Threshold specified above', + name = L["Flash bar below Low Threshold"], + desc = L["Flashes the bar when it is below the Low Threshold specified above"], width = 'double', get = function() return self.moduleSettings.lowThresholdFlash @@ -105,8 +106,8 @@ function IceUnitBar.prototype:GetOptions() } opts["lowThresholdColor"] = { type = "toggle", - name = "Low Threshold color", - desc = "Colors the bar minColor when % is < lowThreshold (requires scaleColor to be enabled)", + name = L["Low Threshold color"], + desc = L["Colors the bar minColor when % is < lowThreshold (requires scaleColor to be enabled)"], get = function() return self.moduleSettings.lowThresholdColor end, diff --git a/embeds.xml b/embeds.xml index f84a2de..56d4c03 100644 --- a/embeds.xml +++ b/embeds.xml @@ -9,6 +9,7 @@ +