vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | |
2 | ------------------------------ |
||
3 | -- Are you local? -- |
||
4 | ------------------------------ |
||
5 | |||
6 | local L = AceLibrary("AceLocale-2.2"):new("BigWigsTest") |
||
7 | |||
8 | ---------------------------- |
||
9 | -- Localization -- |
||
10 | ---------------------------- |
||
11 | |||
12 | L:RegisterTranslations("enUS", function() return { |
||
13 | ["test"] = true, |
||
14 | ["Test"] = true, |
||
15 | ["Test Bar"] = true, |
||
16 | ["Test Bar 2"] = true, |
||
17 | ["Test Bar 3"] = true, |
||
18 | ["Test Bar 4"] = true, |
||
19 | ["Testing"] = true, |
||
20 | ["OMG Bear!"] = true, |
||
21 | ["*RAWR*"] = true, |
||
22 | ["Victory!"] = true, |
||
23 | ["Options for testing."] = true, |
||
24 | ["local"] = true, |
||
25 | ["Local test"] = true, |
||
26 | ["Perform a local test of BigWigs."] = true, |
||
27 | ["sync"] = true, |
||
28 | ["Sync test"] = true, |
||
29 | ["Perform a sync test of BigWigs."] = true, |
||
30 | ["Testing Sync"] = true, |
||
31 | } end) |
||
32 | |||
33 | L:RegisterTranslations("koKR", function() return { |
||
34 | -- ["test"] = "테스트", |
||
35 | ["Test"] = "테스트", |
||
36 | ["Test Bar"] = "테스트 바", |
||
37 | ["Test Bar 2"] = "테스트 바 2", |
||
38 | ["Test Bar 3"] = "테스트 바 3", |
||
39 | ["Test Bar 4"] = "테스트 바 4", |
||
40 | ["Testing"] = "테스트중", |
||
41 | ["OMG Bear!"] = "OMG Bear!", |
||
42 | ["*RAWR*"] = "*공격대경고*", |
||
43 | ["Victory!"] = "승리!", |
||
44 | ["Options for testing."] = "테스트 설정", |
||
45 | -- ["local"] = "지역", |
||
46 | ["Local test"] = "지역 테스트", |
||
47 | ["Perform a local test of BigWigs."] = "BigWigs의 지역 테스트 실행", |
||
48 | -- ["sync"] = "동기화", |
||
49 | ["Sync test"] = "동기화 테스트", |
||
50 | ["Perform a sync test of BigWigs."] = "BigWigs의 동기화 테스트 실행", |
||
51 | ["Testing Sync"] = "동기화 테스트 중", |
||
52 | } end) |
||
53 | |||
54 | L:RegisterTranslations("zhCN", function() return { |
||
55 | ["Test"] = "测试", |
||
56 | ["Test Bar"] = "测试计时条", |
||
57 | ["Test Bar 2"] = "测试计时条2", |
||
58 | ["Test Bar 3"] = "测试计时条3", |
||
59 | ["Test Bar 4"] = "测试计时条4", |
||
60 | ["Testing"] = "测试中", |
||
61 | ["OMG Bear!"] = "老天!熊!", |
||
62 | ["*RAWR*"] = "*RAWR*", |
||
63 | ["Victory!"] = "胜利!", |
||
64 | ["Options for testing."] = "测试选项", |
||
65 | ["Local test"] = "本地测试", |
||
66 | ["Perform a local test of BigWigs."] = "执行一次本地测试。", |
||
67 | ["Sync test"] = "同步测试", |
||
68 | ["Perform a sync test of BigWigs."] = "执行一次同步测试(需要助力或更高权限)。", |
||
69 | ["Testing Sync"] = "同步测试中", |
||
70 | } end) |
||
71 | |||
72 | L:RegisterTranslations("zhTW", function() return { |
||
73 | ["Test"] = "測試", |
||
74 | ["Test Bar"] = "測試計時條", |
||
75 | ["Test Bar 2"] = "測試計時條2", |
||
76 | ["Test Bar 3"] = "測試計時條3", |
||
77 | ["Test Bar 4"] = "測試計時條4", |
||
78 | ["Testing"] = "測試中", |
||
79 | ["OMG Bear!"] = "天哪!蘇聯北極熊!", |
||
80 | ["*RAWR*"] = "*RAWR*", |
||
81 | ["Victory!"] = "勝利!", |
||
82 | ["Options for testing."] = "測試選項", |
||
83 | ["Local test"] = "本地測試", |
||
84 | ["Perform a local test of BigWigs."] = "執行一次本地測試。", |
||
85 | ["Sync test"] = "同步測試", |
||
86 | ["Perform a sync test of BigWigs."] = "執行一次同步測試(需要助手或領隊權限)。", |
||
87 | ["Testing Sync"] = "同步測試中", |
||
88 | } end) |
||
89 | |||
90 | L:RegisterTranslations("deDE", function() return { |
||
91 | -- ["test"] = true, |
||
92 | --["Test"] = "Test", |
||
93 | ["Test Bar"] = "Test Balken", |
||
94 | ["Test Bar 2"] = "Test Balken 2", |
||
95 | ["Test Bar 3"] = "Test Balken 3", |
||
96 | ["Test Bar 4"] = "Test Balken 4", |
||
97 | ["Testing"] = "Teste", |
||
98 | ["OMG Bear!"] = "OMG B\195\164r!", |
||
99 | ["*RAWR*"] = "RAWR", |
||
100 | ["Victory!"] = "Sieg!", |
||
101 | ["Options for testing."] = "Optionen f\195\188r den Test von BigWigs.", |
||
102 | ["local"] = "Lokal", |
||
103 | ["Local test"] = "Lokaler Test", |
||
104 | ["Perform a local test of BigWigs."] = "Lokalen Test durchf\195\188hren.", |
||
105 | --["sync"] = "sync", |
||
106 | ["Sync test"] = "Synchronisations-Test", |
||
107 | ["Perform a sync test of BigWigs."] = "Sychronisations-Test durchf\195\188hren.", |
||
108 | ["Testing Sync"] = "Synchronisation testen", |
||
109 | } end) |
||
110 | |||
111 | L:RegisterTranslations("frFR", function() return { |
||
112 | --["test"] = "test", |
||
113 | --["Test"] = "Test", |
||
114 | ["Test Bar"] = "Barre de test", |
||
115 | ["Test Bar 2"] = "Barre de test 2", |
||
116 | ["Test Bar 3"] = "Barre de test 3", |
||
117 | ["Test Bar 4"] = "Barre de test 4", |
||
118 | ["Testing"] = "Test", |
||
119 | ["OMG Bear!"] = "Un ours !", |
||
120 | ["*RAWR*"] = "*GRRR*", |
||
121 | ["Victory!"] = "Victoire !", |
||
122 | ["Options for testing."] = "Options concernant les tests.", |
||
123 | --["local"] = "local", |
||
124 | ["Local test"] = "Test local", |
||
125 | ["Perform a local test of BigWigs."] = "Effectue un test local de BigWigs.", |
||
126 | --["sync"] = "sync", |
||
127 | ["Sync test"] = "Test de synchronisation", |
||
128 | ["Perform a sync test of BigWigs."] = "Effectue un test de synchronisation de BigWigs.", |
||
129 | ["Testing Sync"] = "Test synchro", |
||
130 | } end) |
||
131 | |||
132 | ---------------------------------- |
||
133 | -- Module Declaration -- |
||
134 | ---------------------------------- |
||
135 | |||
136 | BigWigsTest = BigWigs:NewModule(L["Test"]) |
||
137 | BigWigsTest.revision = tonumber(string.sub("$Revision: 14954 $", 12, -3)) |
||
138 | |||
139 | BigWigsTest.consoleCmd = L["test"] |
||
140 | BigWigsTest.consoleOptions = { |
||
141 | type = "group", |
||
142 | name = L["Test"], |
||
143 | desc = L["Options for testing."], |
||
144 | args = { |
||
145 | [L["local"]] = { |
||
146 | type = "execute", |
||
147 | name = L["Local test"], |
||
148 | desc = L["Perform a local test of BigWigs."], |
||
149 | func = function() BigWigsTest:TriggerEvent("BigWigs_Test") end, |
||
150 | }, |
||
151 | [L["sync"]] = { |
||
152 | type = "execute", |
||
153 | name = L["Sync test"], |
||
154 | desc = L["Perform a sync test of BigWigs."], |
||
155 | func = function() BigWigsTest:TriggerEvent("BigWigs_SyncTest") end, |
||
156 | disabled = function() return ( not IsRaidLeader() and not IsRaidOfficer() ) end, |
||
157 | }, |
||
158 | } |
||
159 | } |
||
160 | |||
161 | function BigWigsTest:OnEnable() |
||
162 | self:RegisterEvent("BigWigs_Test") |
||
163 | self:RegisterEvent("BigWigs_RecvSync") |
||
164 | self:TriggerEvent("BigWigs_ThrottleSync", "TestSync", 5) |
||
165 | self:RegisterEvent("BigWigs_SyncTest") |
||
166 | end |
||
167 | |||
168 | |||
169 | function BigWigsTest:BigWigs_SyncTest() |
||
170 | self:TriggerEvent("BigWigs_SendSync", "TestSync") |
||
171 | end |
||
172 | |||
173 | |||
174 | function BigWigsTest:BigWigs_RecvSync(sync) |
||
175 | if sync == "TestSync" then |
||
176 | self:TriggerEvent("BigWigs_Message", L["Testing Sync"], "Positive") |
||
177 | self:TriggerEvent("BigWigs_StartBar", self, L["Testing Sync"], 10, "Interface\\Icons\\Spell_Frost_FrostShock", true, "Green", "Blue", "Yellow", "Red") |
||
178 | end |
||
179 | end |
||
180 | |||
181 | |||
182 | function BigWigsTest:BigWigs_Test() |
||
183 | self:TriggerEvent("BigWigs_StartBar", self, L["Test Bar"], 15, "Interface\\Icons\\Spell_Nature_ResistNature") |
||
184 | self:TriggerEvent("BigWigs_Message", L["Testing"], "Attention", true, "Long") |
||
185 | self:ScheduleEvent("BigWigs_Message", 5, L["OMG Bear!"], "Important", true, "Alert") |
||
186 | self:ScheduleEvent("BigWigs_Message", 10, L["*RAWR*"], "Urgent", true, "Alarm") |
||
187 | self:ScheduleEvent("BigWigs_Message", 15, L["Victory!"], "Bosskill", true, "Victory") |
||
188 | |||
189 | self:TriggerEvent("BigWigs_StartBar", self, L["Test Bar 2"], 10, "Interface\\Icons\\Spell_Nature_ResistNature") |
||
190 | self:TriggerEvent("BigWigs_StartBar", self, L["Test Bar 3"], 5, "Interface\\Icons\\Spell_Nature_ResistNature") |
||
191 | self:TriggerEvent("BigWigs_StartBar", self, L["Test Bar 4"], 3, "Interface\\Icons\\Spell_Nature_ResistNature", true, "black") |
||
192 | end |