Mercurial > wow > whichrankdoeswhat
diff main.lua @ 3:001b15e07b87
Poke the localizer.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Sat, 12 Feb 2011 19:09:57 +0000 |
| parents | 78ff21480511 |
| children | e66407f67848 |
line wrap: on
line diff
--- a/main.lua Fri Jan 14 02:09:34 2011 +0000 +++ b/main.lua Sat Feb 12 19:09:57 2011 +0000 @@ -1,4 +1,5 @@ local nametag, addon = ... +local L = LibStub("AceLocale-3.0"):GetLocale(nametag) addon.defaults = { profile = { @@ -17,8 +18,8 @@ set = "SetOption", args = { general = { - name = "General", - desc = "General options", + name = GENERAL, + desc = L["General options"], type = 'group', order = 10, args = { @@ -31,15 +32,15 @@ order = 1, }, enable = { - name = "Enable", - desc = "Use this addon", + name = ENABLE, + desc = L["Use this addon"], type = 'toggle', arg = "ToggleEnable", order = 5, }, guildcontrol = { - name = "Guild Control for non-GMs", - desc = [[Make the grayed-out Guild Control button activate this addon instead.]], + name = L["Guild Control for non-GMs"], + desc = L["Make the grayed-out Guild Control button activate this addon instead."], type = 'toggle', order = 10, }, @@ -52,7 +53,7 @@ }, popup = { name = "/wrdw", - desc = "Toggle WRDW window", + desc = L["Toggle WRDW window"], type = 'execute', func = function() InterfaceOptionsFrameCancel:Click() @@ -142,7 +143,7 @@ end function addon:OnDisable() - self:Print([[You will need to relog or /reload to fully disable this addon.]]) + self:Print(L["You will need to relog or /reload to fully disable this addon."]) end function addon:ToggleEnable() @@ -168,10 +169,14 @@ -- Something somewhere has changed, redo the cache -function addon:GUILD_RANKS_UPDATE() - self.perms = nil - if (not incomplete) and self.display and self.display:IsVisible() then - self.display:SetStatusText([[|cffff1010Guild flags have changed!|r You must close and reopen this window to display the changes.]]) +do + local text = '|cffff1010' .. L["Guild flags have changed!"] .. '|r' .. + L["You must close and reopen this window to display the changes."] + function addon:GUILD_RANKS_UPDATE() + self.perms = nil + if (not incomplete) and self.display and self.display:IsVisible() then + self.display:SetStatusText(text) + end end end @@ -280,7 +285,7 @@ tab.tooltip = name end if incomplete then - setstatus[[Guild vault information is incomplete. Be closer to a vault, and give it some time. You may need to relog and/or open the guild roster/vault to force a client update.]] + setstatus(L["Guild vault information is incomplete. Be closer to a vault, and give it some time. You may need to relog and/or open the guild roster/vault to force a client update."]) end end end
