comparison main.lua @ 2:4d9949e554ef

Add trivial localization.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Sat, 19 Feb 2011 01:05:01 +0000
parents cf3106134425
children e76c327b62e4
comparison
equal deleted inserted replaced
1:cf3106134425 2:4d9949e554ef
1 local nametag, addon = ... 1 local nametag, addon = ...
2 2
3 -----------------------------------------------------------------------------
4 local on = false
5 local L = GetLocale()
3 6
4 ----------------------------------------------------------------------------- 7 -- Please use the Localization App on WoWAce to Update this
5 -- other locals 8 -- http://www.wowace.com/addons/what-just-procced/localization/
6 local on = false 9 if L == 'deDE' then
7 10 L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
11 elseif L == 'enUS' or L == 'enGB' then
12 L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
13 elseif L == 'esES' or L == 'esMX' then
14 L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
15 elseif L == 'frFR' then
16 L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
17 elseif L == 'koKR' then
18 L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
19 elseif L == 'ruRU' then
20 L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
21 elseif L == 'zhCN' then
22 L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
23 elseif L == 'zhTW' then
24 L = --@localization(locale="enUS", format="lua_table", handle-unlocalized="comment")@
25 end
8 26
9 ----------------------------------------------------------------------------- 27 -----------------------------------------------------------------------------
10 addon = LibStub("AceAddon-3.0"):NewAddon(addon, nametag, 28 addon = LibStub("AceAddon-3.0"):NewAddon(addon, nametag,
11 "AceConsole-3.0", "AceEvent-3.0") 29 "AceConsole-3.0", "AceEvent-3.0")
12 30
20 if on then 38 if on then
21 self:RegisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW") 39 self:RegisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW")
22 else 40 else
23 self:UnregisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW") 41 self:UnregisterEvent("SPELL_ACTIVATION_OVERLAY_SHOW")
24 end 42 end
25 self:Print(on and "Activated" or "Deactivated") 43 self:Print(on and L["Activated"] or L["Deactivated"])
26 end 44 end
27 45
28 function addon:SPELL_ACTIVATION_OVERLAY_SHOW(...) 46 function addon:SPELL_ACTIVATION_OVERLAY_SHOW(...)
29 local _,spellID,_,positions = ... 47 local _,spellID,_,positions = ...
30 local spell = GetSpellLink(spellID) or GetSpellInfo(spellID) or spellID 48 local spell = GetSpellLink(spellID) or GetSpellInfo(spellID) or spellID
31 self:Printf("%s at position: %s.", spell, positions) 49 self:Printf(L["%s at position %s ."], spell, positions)
32 end 50 end
33 51
34 -- vim:noet 52 -- vim:noet