vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | local MAJOR_VERSION = "Zone 1.2" |
2 | local MINOR_VERSION = tonumber(string.sub("$Revision: 8254 $", 12, -3)) |
||
3 | |||
4 | if BabbleLib and BabbleLib.versions[MAJOR_VERSION] and BabbleLib.versions[MAJOR_VERSION].minor >= MINOR_VERSION then |
||
5 | return |
||
6 | end |
||
7 | |||
8 | local locale = GetLocale and GetLocale() or "enUS" |
||
9 | |||
10 | local totalZones = { |
||
11 | ["Ahn'Qiraj"] = "Ahn'Qiraj", -- Check |
||
12 | ["Alterac Mountains"] = "Alterac Mountains", |
||
13 | ["Alterac Valley"] = "Alterac Valley", |
||
14 | ["Arathi Basin"] = "Arathi Basin", |
||
15 | ["Arathi Highlands"] = "Arathi Highlands", |
||
16 | ["Ashenvale"] = "Ashenvale", |
||
17 | ["Azshara"] = "Azshara", |
||
18 | ["Badlands"] = "Badlands", |
||
19 | ["The Barrens"] = "The Barrens", |
||
20 | ["Blackfathom Deeps"] = "Blackfathom Deeps", |
||
21 | ["Blackrock Depths"] = "Blackrock Depths", |
||
22 | ["Blackrock Mountain"] = "Blackrock Mountain", |
||
23 | ["Blackrock Spire"] = "Blackrock Spire", |
||
24 | ["Blackwing Lair"] = "Blackwing Lair", |
||
25 | ["Blasted Lands"] = "Blasted Lands", |
||
26 | ["Booty Bay"] = "Booty Bay", |
||
27 | ["Burning Steppes"] = "Burning Steppes", |
||
28 | ["Caverns of Time"] = "Caverns of Time", |
||
29 | ["Darkshore"] = "Darkshore", |
||
30 | ["Darnassus"] = "Darnassus", |
||
31 | ["The Deadmines"] = "The Deadmines", |
||
32 | ["Deadwind Pass"] = "Deadwind Pass", |
||
33 | ["Deeprun Tram"] = "Deeprun Tram", |
||
34 | ["Desolace"] = "Desolace", |
||
35 | ["Dire Maul"] = "Dire Maul", |
||
36 | ["Dun Morogh"] = "Dun Morogh", |
||
37 | ["Durotar"] = "Durotar", |
||
38 | ["Duskwood"] = "Duskwood", |
||
39 | ["Dustwallow Marsh"] = "Dustwallow Marsh", |
||
40 | ["Eastern Plaguelands"] = "Eastern Plaguelands", |
||
41 | ["Elwynn Forest"] = "Elwynn Forest", |
||
42 | ["Felwood"] = "Felwood", |
||
43 | ["Feralas"] = "Feralas", |
||
44 | ["The Forbidding Sea"] = "The Forbidding Sea", |
||
45 | ["Gadgetzan"] = "Gadgetzan", |
||
46 | ["Gnomeregan"] = "Gnomeregan", |
||
47 | ["The Great Sea"] = "The Great Sea", |
||
48 | ["Hall of Legends"] = "Hall of Legends", |
||
49 | ["Hillsbrad Foothills"] = "Hillsbrad Foothills", |
||
50 | ["The Hinterlands"] = "The Hinterlands", |
||
51 | ["Hyjal"] = "Hyjal", |
||
52 | ["Ironforge"] = "Ironforge", |
||
53 | ["Loch Modan"] = "Loch Modan", |
||
54 | ["Maraudon"] = "Maraudon", |
||
55 | ["Molten Core"] = "Molten Core", |
||
56 | ["Moonglade"] = "Moonglade", |
||
57 | ["Mulgore"] = "Mulgore", |
||
58 | ["Naxxramas"] = "Naxxramas", |
||
59 | ["Onyxia's Lair"] = "Onyxia's Lair", |
||
60 | ["Orgrimmar"] = "Orgrimmar", |
||
61 | ["Ratchet"] = "Ratchet", |
||
62 | ["Ragefire Chasm"] = "Ragefire Chasm", |
||
63 | ["Razorfen Downs"] = "Razorfen Downs", |
||
64 | ["Razorfen Kraul"] = "Razorfen Kraul", |
||
65 | ["Redridge Mountains"] = "Redridge Mountains", |
||
66 | ["Ruins of Ahn'Qiraj"] = "Ruins of Ahn'Qiraj", |
||
67 | ["Scarlet Monastery"] = "Scarlet Monastery", |
||
68 | ["Scholomance"] = "Scholomance", |
||
69 | ["Searing Gorge"] = "Searing Gorge", |
||
70 | ["Shadowfang Keep"] = "Shadowfang Keep", |
||
71 | ["Silithus"] = "Silithus", |
||
72 | ["Silverpine Forest"] = "Silverpine Forest", |
||
73 | ["The Stockade"] = "The Stockade", |
||
74 | ["Stonetalon Mountains"] = "Stonetalon Mountains", |
||
75 | ["Stormwind City"] = "Stormwind City", |
||
76 | ["Stranglethorn Vale"] = "Stranglethorn Vale", |
||
77 | ["Stratholme"] = "Stratholme", |
||
78 | ["Swamp of Sorrows"] = "Swamp of Sorrows", |
||
79 | ["Tanaris"] = "Tanaris", |
||
80 | ["Teldrassil"] = "Teldrassil", |
||
81 | ["Temple of Ahn'Qiraj"] = "Temple of Ahn'Qiraj", |
||
82 | ["The Temple of Atal'Hakkar"] = "The Temple of Atal'Hakkar", |
||
83 | ["Thousand Needles"] = "Thousand Needles", |
||
84 | ["Thunder Bluff"] = "Thunder Bluff", |
||
85 | ["Tirisfal Glades"] = "Tirisfal Glades", |
||
86 | ["Uldaman"] = "Uldaman", |
||
87 | ["Un'Goro Crater"] = "Un'Goro Crater", |
||
88 | ["Undercity"] = "Undercity", |
||
89 | ["Wailing Caverns"] = "Wailing Caverns", |
||
90 | ["Warsong Gulch"] = "Warsong Gulch", |
||
91 | ["Western Plaguelands"] = "Western Plaguelands", |
||
92 | ["Westfall"] = "Westfall", |
||
93 | ["Wetlands"] = "Wetlands", |
||
94 | ["Winterspring"] = "Winterspring", |
||
95 | ["Zul'Farrak"] = "Zul'Farrak", |
||
96 | ["Zul'Gurub"] = "Zul'Gurub", |
||
97 | } |
||
98 | |||
99 | local englishToLocal |
||
100 | |||
101 | if locale == "deDE" then |
||
102 | englishToLocal = { |
||
103 | ["Ahn'Qiraj"] = "Ahn'Qiraj", -- Check |
||
104 | ["Alterac Mountains"] = "Alteracgebirge", |
||
105 | ["Alterac Valley"] = "Alteractal", |
||
106 | ["Arathi Basin"] = "Arathibecken", |
||
107 | ["Arathi Highlands"] = "Arathihochland", |
||
108 | ["Ashenvale"] = "Ashenvale", |
||
109 | ["Azshara"] = "Azshara", |
||
110 | ["Badlands"] = "\195\150dland", |
||
111 | ["The Barrens"] = "Brachland", |
||
112 | ["Blackfathom Deeps"] = "Blackfathom-Tiefe", |
||
113 | ["Blackrock Depths"] = "Blackrocktiefen", |
||
114 | ["Blackrock Mountain"] = "Der Blackrock", |
||
115 | ["Blackrock Spire"] = "Blackrockspitze", |
||
116 | ["Blackwing Lair"] = "Pechschwingenhort", |
||
117 | ["Blasted Lands"] = "Verw\195\188steten Lande", |
||
118 | ["Booty Bay"] = "Booty Bay", |
||
119 | ["Burning Steppes"] = "Brennende Steppe", |
||
120 | ["Caverns of Time"] = "Die H\195\182hlen der Zeit", -- Check |
||
121 | ["Darkshore"] = "Dunkelk\195\188ste", |
||
122 | ["Darnassus"] = "Darnassus", |
||
123 | ["The Deadmines"] = "Die Todesminen", |
||
124 | ["Deadwind Pass"] = "Gebirgspass der Totenwinde", |
||
125 | ["Deeprun Tram"] = "Die Tiefenbahn", |
||
126 | ["Desolace"] = "Desolace", |
||
127 | ["Dire Maul"] = "D\195\188sterbruch", |
||
128 | ["Dun Morogh"] = "Dun Morogh", |
||
129 | ["Durotar"] = "Durotar", |
||
130 | ["Duskwood"] = "D\195\164mmerwald", |
||
131 | ["Dustwallow Marsh"] = "Marschen von Dustwallow", |
||
132 | ["Eastern Plaguelands"] = "\195\150stliche Pestl\195\164nder", |
||
133 | ["Elwynn Forest"] = "Wald von Elwynn", |
||
134 | ["Felwood"] = "Teufelswald", |
||
135 | ["Feralas"] = "Feralas", |
||
136 | ["The Forbidding Sea"] = "Das verbotene Meer", |
||
137 | ["Gadgetzan"] = "Gadgetzan", |
||
138 | ["Gnomeregan"] = "Gnomeregan", |
||
139 | ["The Great Sea"] = "Das grosse Meer", |
||
140 | ["Hall of Legends"] = "Halle der Legenden", |
||
141 | ["Hillsbrad Foothills"] = "Vorgebirge von Hillsbrad", |
||
142 | ["The Hinterlands"] = "Hinterland", |
||
143 | ["Hyjal"] = "Hyjal", |
||
144 | ["Ironforge"] = "Ironforge", |
||
145 | ["Loch Modan"] = "Loch Modan", |
||
146 | ["Maraudon"] = "Maraudon", |
||
147 | ["Molten Core"] = "Geschmolzener Kern", |
||
148 | ["Moonglade"] = "Moonglade", |
||
149 | ["Mulgore"] = "Mulgore", |
||
150 | ["Naxxramas"] = "Naxxramas", --Check |
||
151 | ["Onyxia's Lair"] = "Onyxias Hort", |
||
152 | ["Orgrimmar"] = "Orgrimmar", |
||
153 | ["Ratchet"] = "Ratchet", |
||
154 | ["Ragefire Chasm"] = "Ragefireabgrund", |
||
155 | ["Razorfen Downs"] = "Die H\195\188gel von Razorfen", |
||
156 | ["Razorfen Kraul"] = "Der Kral von Razorfen", |
||
157 | ["Redridge Mountains"] = "Rotkammgebirge", |
||
158 | ["Ruins of Ahn'Qiraj"] = "Ruinen von Ahn'Qiraj", |
||
159 | ["Scarlet Monastery"] = "Das Scharlachrote Kloster", |
||
160 | ["Scholomance"] = "Scholomance", |
||
161 | ["Searing Gorge"] = "Sengende Schlucht", |
||
162 | ["Shadowfang Keep"] = "Burg Shadowfang", |
||
163 | ["Silithus"] = "Silithus", |
||
164 | ["Silverpine Forest"] = "Silberwald", |
||
165 | ["The Stockade"] = "Das Verlies", |
||
166 | ["Stonetalon Mountains"] = "Steinkrallengebirge", |
||
167 | ["Stormwind City"] = "Stormwind", |
||
168 | ["Stranglethorn Vale"] = "Schlingendorntal", |
||
169 | ["Stratholme"] = "Stratholme", |
||
170 | ["Swamp of Sorrows"] = "S\195\188mpfe des Elends", |
||
171 | ["Tanaris"] = "Tanaris", |
||
172 | ["Teldrassil"] = "Teldrassil", |
||
173 | ["Temple of Ahn'Qiraj"] = "Tempel von Ahn'Qiraj", |
||
174 | ["The Temple of Atal'Hakkar"] = "Der Tempel von Atal'Hakkar", |
||
175 | ["Thousand Needles"] = "Tausend Nadeln", |
||
176 | ["Thunder Bluff"] = "Thunder Bluff", |
||
177 | ["Tirisfal Glades"] = "Tirisfal", |
||
178 | ["Uldaman"] = "Uldaman", |
||
179 | ["Un'Goro Crater"] = "Un'Goro-Krater", |
||
180 | ["Undercity"] = "Undercity", |
||
181 | ["Wailing Caverns"] = "Die H\195\182hlen des Wehklagens", |
||
182 | ["Warsong Gulch"] = "Warsongschlucht", |
||
183 | ["Western Plaguelands"] = "Westliche Pestl\195\164nder", |
||
184 | ["Westfall"] = "Westfall", |
||
185 | ["Wetlands"] = "Sumpfland", |
||
186 | ["Winterspring"] = "Winterspring", |
||
187 | ["Zul'Farrak"] = "Zul'Farrak", |
||
188 | ["Zul'Gurub"] = "Zul'Gurub", |
||
189 | } |
||
190 | elseif locale == "frFR" then |
||
191 | englishToLocal = { |
||
192 | ["Ahn'Qiraj"] = "Ahn'Qiraj", -- Check |
||
193 | ["Alterac Mountains"] = "Montagnes d'Alterac", |
||
194 | ["Alterac Valley"] = "Vall\195\169e d'Alterac", |
||
195 | ["Arathi Basin"] = "Bassin d'Arathi", |
||
196 | ["Arathi Highlands"] = "Hautes-terres d'Arathi", |
||
197 | ["Ashenvale"] = "Ashenvale", |
||
198 | ["Azshara"] = "Azshara", |
||
199 | ["Badlands"] = "Terres ingrates", |
||
200 | ["The Barrens"] = "Les Tarides", |
||
201 | ["Blackfathom Deeps"] = "Profondeurs de Brassenoire", |
||
202 | ["Blackrock Depths"] = "Profondeurs de Blackrock", |
||
203 | ["Blackrock Mountain"] = "Mont Blackrock", |
||
204 | ["Blackrock Spire"] = "Pic Blackrock", |
||
205 | ["Blackwing Lair"] = "Repaire de l'Aile noire", |
||
206 | ["Blasted Lands"] = "Terres foudroy\195\169es", |
||
207 | ["Booty Bay"] = "Baie-du-Butin", |
||
208 | ["Burning Steppes"] = "Steppes Ardentes", |
||
209 | ["Caverns of Time"] = "Grottes du temps", |
||
210 | ["Darkshore"] = "Sombrivage", |
||
211 | ["Darnassus"] = "Darnassus", |
||
212 | ["The Deadmines"] = "Les mortemines", |
||
213 | ["Deadwind Pass"] = "D\195\169fil\195\169 de Deuillevent", |
||
214 | ["Deeprun Tram"] = "Tram des profondeurs", |
||
215 | ["Desolace"] = "D\195\169solace", |
||
216 | ["Dire Maul"] = "Hache-Tripes", |
||
217 | ["Dun Morogh"] = "Dun Morogh", |
||
218 | ["Durotar"] = "Durotar", |
||
219 | ["Duskwood"] = "Bois de la p\195\169nombre", |
||
220 | ["Dustwallow Marsh"] = "Mar\195\169cage d'\195\130prefange", |
||
221 | ["Eastern Plaguelands"] = "Maleterres de l'est", |
||
222 | ["Elwynn Forest"] = "For\195\170t d'Elwynn", |
||
223 | ["Felwood"] = "Gangrebois", |
||
224 | ["Feralas"] = "Feralas", |
||
225 | ["The Forbidding Sea"] = "La Mer interdite", |
||
226 | ["Gadgetzan"] = "Gadgetzan", -- CHECK |
||
227 | ["Gnomeregan"] = "Gnomeregan", |
||
228 | ["The Great Sea"] = "La Grande mer", |
||
229 | ["Hall of Legends"] = "Hall des L\195\169gendes", |
||
230 | ["Hillsbrad Foothills"] = "Contreforts d'Hillsbrad", |
||
231 | ["The Hinterlands"] = "Les Hinterlands", |
||
232 | ["Hyjal"] = "Hyjal", -- CHECK |
||
233 | ["Ironforge"] = "Ironforge", |
||
234 | ["Loch Modan"] = "Loch Modan", |
||
235 | ["Maraudon"] = "Maraudon", |
||
236 | ["Molten Core"] = "C\221\181r du Magma", |
||
237 | ["Moonglade"] = "Reflet-de-lune", |
||
238 | ["Mulgore"] = "Mulgore", |
||
239 | ["Onyxia's Lair"] = "Repaire d'Onyxia", |
||
240 | ["Naxxramas"] = "Naxxramas", --Check |
||
241 | ["Orgrimmar"] = "Orgrimmar", |
||
242 | ["Ratchet"] = "Ratchet", |
||
243 | ["Ragefire Chasm"] = "Gouffre de Ragefeu", |
||
244 | ["Razorfen Downs"] = "Souilles de Tranchebauge", |
||
245 | ["Razorfen Kraul"] = "Kraal de Tranchebauge", |
||
246 | ["Redridge Mountains"] = "Les Carmines", |
||
247 | ["Ruins of Ahn'Qiraj"] = "Ruines d'Ahn'Qiraj", |
||
248 | ["Scarlet Monastery"] = "Monast\195\168re Ecarlate", |
||
249 | ["Scholomance"] = "Scholomance", |
||
250 | ["Searing Gorge"] = "Gorge des Vents br\195\187lants", |
||
251 | ["Shadowfang Keep"] = "Donjon d'Ombrecroc", |
||
252 | ["Silithus"] = "Silithus", |
||
253 | ["Silverpine Forest"] = "For\195\170t des pins argent\195\169s", |
||
254 | ["The Stockade"] = "La Prison", |
||
255 | ["Stonetalon Mountains"] = "Les Serres-Rocheuses", |
||
256 | ["Stormwind City"] = "Cit\195\169 de Stormwind", |
||
257 | ["Stranglethorn Vale"] = "Vall\195\169e de Strangleronce", |
||
258 | ["Stratholme"] = "Stratholme", |
||
259 | ["Swamp of Sorrows"] = "Marais des Chagrins", |
||
260 | ["Tanaris"] = "Tanaris", |
||
261 | ["Teldrassil"] = "Teldrassil", |
||
262 | ["Temple of Ahn'Qiraj"] = "Le temple d'Ahn'Qiraj", |
||
263 | ["The Temple of Atal'Hakkar"] = "Le Temple d'Atal'Hakkar", |
||
264 | ["Thousand Needles"] = "Mille pointes", |
||
265 | ["Thunder Bluff"] = "Thunder Bluff", |
||
266 | ["Tirisfal Glades"] = "Clairi\195\168res de Tirisfal", |
||
267 | ["Uldaman"] = "Uldaman", |
||
268 | ["Un'Goro Crater"] = "Crat\195\168re d'Un'Goro", |
||
269 | ["Undercity"] = "Undercity", |
||
270 | ["Wailing Caverns"] = "Cavernes des lamentations", |
||
271 | ["Warsong Gulch"] = "Goulet des Warsong", |
||
272 | ["Western Plaguelands"] = "Maleterres de l'ouest", |
||
273 | ["Westfall"] = "Marche de l'Ouest", |
||
274 | ["Wetlands"] = "Les Paluns", |
||
275 | ["Winterspring"] = "Berceau-de-l'Hiver", |
||
276 | ["Zul'Farrak"] = "Zul'Farrak", |
||
277 | ["Zul'Gurub"] = "Zul'Gurub", |
||
278 | } |
||
279 | elseif locale == "zhCN" then |
||
280 | englishToLocal = { |
||
281 | ["Ahn'Qiraj"] = "Ahn'Qiraj", -- Check |
||
282 | ["Alterac Mountains"] = "\229\165\165\231\137\185\229\133\176\229\133\139\229\177\177\232\132\137", |
||
283 | ["Alterac Valley"] = "\229\165\165\231\137\185\229\133\176\229\133\139\229\177\177\232\176\183", |
||
284 | ["Arathi Basin"] = "\233\152\191\230\139\137\229\184\140\231\155\134\229\156\176", |
||
285 | ["Arathi Highlands"] = "\233\152\191\230\139\137\229\184\140\233\171\152\229\156\176", |
||
286 | ["Ashenvale"] = "\231\129\176\232\176\183", |
||
287 | ["Azshara"] = "\232\137\190\232\144\168\230\139\137", |
||
288 | ["Badlands"] = "\232\141\146\232\138\156\228\185\139\229\156\176", |
||
289 | ["The Barrens"] = "\232\180\171\231\152\160\228\185\139\229\156\176", |
||
290 | ["Blackfathom Deeps"] = "\233\187\145\230\154\151\230\183\177\230\184\138", |
||
291 | ["Blackrock Depths"] = "\233\187\145\231\159\179\230\183\177\230\184\138", |
||
292 | ["Blackrock Mountain"] = "\233\187\145\231\159\179\229\177\177", |
||
293 | ["Blackrock Spire"] = "\233\187\145\231\159\179\229\161\148", |
||
294 | ["Blackwing Lair"] = "\233\187\145\231\191\188\228\185\139\229\183\162", |
||
295 | ["Blasted Lands"] = "\232\175\133\229\146\146\228\185\139\229\156\176", |
||
296 | ["Booty Bay"] = "Booty Bay", -- CHECK |
||
297 | ["Burning Steppes"] = "\231\135\131\231\131\167\229\185\179\229\142\159", |
||
298 | ["Caverns of Time"] = "\230\151\182\229\133\137\228\185\139\231\169\180", |
||
299 | ["Darkshore"] = "\233\187\145\230\181\183\229\178\184", |
||
300 | ["Darnassus"] = "\232\190\190\231\186\179\232\139\143\230\150\175", |
||
301 | ["The Deadmines"] = "\230\173\187\228\186\161\231\159\191\228\186\149", |
||
302 | ["Deadwind Pass"] = "\233\128\134\233\163\142\229\176\143\229\190\132", |
||
303 | ["Deeprun Tram"] = "\231\159\191\239\191\189?\239\191\189\229\156\176\239\191\189?", -- CHECK |
||
304 | ["Desolace"] = "\229\135\132\229\135\137\228\185\139\229\156\176", |
||
305 | ["Dire Maul"] = "\229\142\132\232\191\144\228\185\139\230\167\140", |
||
306 | ["Dun Morogh"] = "\228\184\185\232\142\171\231\189\151", |
||
307 | ["Durotar"] = "\230\157\156\233\154\134\229\161\148\229\176\148", |
||
308 | ["Duskwood"] = "\230\154\174\232\137\178\230\163\174\230\158\151", |
||
309 | ["Dustwallow Marsh"] = "\229\176\152\230\179\165\230\178\188\230\179\189", |
||
310 | ["Eastern Plaguelands"] = "\228\184\156\231\152\159\231\150\171\228\185\139\229\156\176", |
||
311 | ["Elwynn Forest"] = "\232\137\190\229\176\148\230\150\135\230\163\174\230\158\151", |
||
312 | ["Felwood"] = "\232\180\185\228\188\141\229\190\183\230\163\174\230\158\151", |
||
313 | ["Feralas"] = "\239\191\189?\239\191\189\230\139\137\230\150\175", -- CHECK |
||
314 | ["The Forbidding Sea"] = "The Forbidding Sea", |
||
315 | ["Gadgetzan"] = "Gadgetzan", -- CHECK |
||
316 | ["Gnomeregan"] = "\232\175\186\232\142\171\231\145\158\230\160\185", |
||
317 | ["The Great Sea"] = "The Great Sea", -- CHECK |
||
318 | ["Hall of Legends"] = "Hall of Legends", -- CHECK |
||
319 | ["Hillsbrad Foothills"] = "\229\184\140\229\176\148\230\150\175\229\184\131\232\142\177\229\190\183\228\184\152\233\153\181", |
||
320 | ["The Hinterlands"] = "\232\190\155\231\137\185\229\133\176", |
||
321 | ["Hyjal"] = "Hyjal", -- CHECK |
||
322 | ["Ironforge"] = "\233\147\129\231\130\137\229\160\161", |
||
323 | ["Loch Modan"] = "\230\180\155\229\133\139\232\142\171\228\184\185", |
||
324 | ["Maraudon"] = "\231\142\155\230\139\137\233\161\191", |
||
325 | ["Molten Core"] = "\231\134\148\231\129\171\228\185\139\229\191\131", |
||
326 | ["Moonglade"] = "\230\156\136\229\133\137\230\158\151\229\156\176", |
||
327 | ["Mulgore"] = "\232\142\171\233\171\152\233\155\183", |
||
328 | ["Naxxramas"] = "Naxxramas", --Check |
||
329 | ["Onyxia's Lair"] = "\229\165\165\229\166\174\229\133\139\232\165\191\228\186\154\231\154\132\229\183\162\231\169\180", |
||
330 | ["Orgrimmar"] = "\229\165\165\230\160\188\231\145\158\231\142\155", |
||
331 | ["Ratchet"] = "Ratchet", -- CHECK |
||
332 | ["Ragefire Chasm"] = "\230\128\146\231\132\176\232\163\130\232\176\183", |
||
333 | ["Razorfen Downs"] = "\229\137\131\229\136\128\233\171\152\229\156\176", |
||
334 | ["Razorfen Kraul"] = "\229\137\131\229\136\128\230\178\188\230\179\189", |
||
335 | ["Redridge Mountains"] = "\232\181\164\232\132\138\229\177\177", |
||
336 | ["Ruins of Ahn'Qiraj"] = "\229\174\137\229\133\182\230\139\137\229\186\159\229\162\159", |
||
337 | ["Scarlet Monastery"] = "\232\161\128\232\137\178\228\191\174\233\129\147\233\153\162", |
||
338 | ["Scholomance"] = "\233\128\154\231\129\181\229\173\166\233\153\162", -- CHECK |
||
339 | ["Searing Gorge"] = "\231\129\188\231\131\173\229\179\161\232\176\183", |
||
340 | ["Shadowfang Keep"] = "\229\189\177\231\137\153\229\159\142\229\160\161", |
||
341 | ["Silithus"] = "\229\184\140\229\136\169\239\191\189?\230\150\175", -- CHECK |
||
342 | ["Silverpine Forest"] = "\233\147\182\239\191\189?\239\191\189\230\163\174\230\158\151", -- CHECK |
||
343 | ["The Stockade"] = "\230\154\180\233\163\142\229\159\142\231\155\145\231\139\177", |
||
344 | ["Stonetalon Mountains"] = "\231\159\179\231\136\170\229\177\177\232\132\137", |
||
345 | ["Stormwind City"] = "\230\154\180\233\163\142\229\159\142", |
||
346 | ["Stranglethorn Vale"] = "\232\141\134\230\163\152\232\176\183", |
||
347 | ["Stratholme"] = "\230\150\175\229\157\166\231\180\162\229\167\134", |
||
348 | ["Swamp of Sorrows"] = "\230\130\178\228\188\164\230\178\188\230\179\189", |
||
349 | ["Tanaris"] = "\229\161\148\231\186\179\229\136\169\230\150\175", |
||
350 | ["Teldrassil"] = "\230\179\176\232\190\190\229\184\140\229\176\148", |
||
351 | ["Temple of Ahn'Qiraj"] = "\229\174\137\229\133\182\230\139\137\231\165\158\230\174\191", |
||
352 | ["The Temple of Atal'Hakkar"] = "\233\152\191\229\161\148\229\147\136\239\191\189?\239\191\189\231\165\158\229\186\153", -- CHECK |
||
353 | ["Thousand Needles"] = "\239\191\189?\239\191\189\233\146\136\231\159\179", -- CHECK |
||
354 | ["Thunder Bluff"] = "\233\155\183\233\156\134\229\180\150", |
||
355 | ["Tirisfal Glades"] = "\230\143\144\231\145\158\230\150\175\230\179\149\230\158\151\229\156\176", |
||
356 | ["Uldaman"] = "\229\165\165\232\190\190\230\155\188", |
||
357 | ["Un'Goro Crater"] = "\231\142\175\229\158\139\229\177\177", |
||
358 | ["Undercity"] = "\229\185\189\230\154\151\229\159\142", |
||
359 | ["Wailing Caverns"] = "\229\147\128\229\154\142\230\180\158\231\169\180", |
||
360 | ["Warsong Gulch"] = "\230\136\152\230\173\140\229\179\161\232\176\183", |
||
361 | ["Western Plaguelands"] = "\232\165\191\231\152\159\231\150\171\228\185\139\229\156\176", |
||
362 | ["Westfall"] = "\232\165\191\233\131\168\232\141\146\233\135\142", |
||
363 | ["Wetlands"] = "\230\185\191\229\156\176", |
||
364 | ["Winterspring"] = "\229\134\172\230\179\137\232\176\183", |
||
365 | ["Zul'Farrak"] = "\231\165\150\229\176\148\230\179\149\230\139\137\229\133\139", |
||
366 | ["Zul'Gurub"] = "\231\165\150\229\176\148\230\160\188\230\139\137\229\184\131", |
||
367 | } |
||
368 | elseif locale == "koKR" then |
||
369 | englishToLocal = { |
||
370 | ["Ahn'Qiraj"] = "안퀴라즈", -- 확인요망 |
||
371 | ["Alterac Mountains"] = "알터랙 산맥", |
||
372 | ["Alterac Valley"] = "알터랙 계곡", |
||
373 | ["Arathi Basin"] = "아라시 분지", |
||
374 | ["Arathi Highlands"] = "아라시 고원", |
||
375 | ["Ashenvale"] = "잿빛 골짜기", |
||
376 | ["Azshara"] = "아즈샤라", |
||
377 | ["Badlands"] = "황야의 땅", |
||
378 | ["The Barrens"] = "불모의 땅", |
||
379 | ["Blackfathom Deeps"] = "검은 심연의 나락", |
||
380 | ["Blackrock Depths"] = "검은바위 나락", |
||
381 | ["Blackrock Mountain"] = "검은바위 산", |
||
382 | ["Blackrock Spire"] = "검은바위 첨탑", |
||
383 | ["Blackwing Lair"] = "검은날개 둥지", |
||
384 | ["Blasted Lands"] = "저주받은 땅", |
||
385 | ["Booty Bay"] = "무법항", |
||
386 | ["Burning Steppes"] = "불타는 평원", |
||
387 | ["Caverns of Time"] = "시간의 동굴", |
||
388 | ["Darkshore"] = "어둠의 해안", |
||
389 | ["Darnassus"] = "다르나서스", |
||
390 | ["The Deadmines"] = "죽음의 폐광", |
||
391 | ["Deadwind Pass"] = "죽음의 고개", |
||
392 | ["Deeprun Tram"] = "깊은굴 지하철", |
||
393 | ["Desolace"] = "잊혀진 땅", |
||
394 | ["Dire Maul"] = "혈투의 전장", |
||
395 | ["Dun Morogh"] = "던 모로", |
||
396 | ["Durotar"] = "듀로타", |
||
397 | ["Duskwood"] = "그늘숲", |
||
398 | ["Dustwallow Marsh"] = "먼지진흙 습지대", |
||
399 | ["Eastern Plaguelands"] = "동부 역병지대", |
||
400 | ["Elwynn Forest"] = "엘윈 숲", |
||
401 | ["Felwood"] = "악령의 숲", |
||
402 | ["Feralas"] = "페랄라스", |
||
403 | ["The Forbidding Sea"] = "성난폭풍 해안", |
||
404 | ["Gadgetzan"] = "가젯잔", |
||
405 | ["Gnomeregan"] = "놈리건", |
||
406 | ["The Great Sea"] = "대해", |
||
407 | ["Hall of Legends"] = "용사의 전당", |
||
408 | ["Hillsbrad Foothills"] = "힐스브래드 구릉지", |
||
409 | ["The Hinterlands"] = "동부 내륙지", |
||
410 | ["Hyjal"] = "하이잘", |
||
411 | ["Ironforge"] = "아이언포지", |
||
412 | ["Loch Modan"] = "모단 호수", |
||
413 | ["Maraudon"] = "마라우돈", |
||
414 | ["Molten Core"] = "화산 심장부", |
||
415 | ["Moonglade"] = "달의 숲", |
||
416 | ["Mulgore"] = "멀고어", |
||
417 | ["Naxxramas"] = "낙스라마스", |
||
418 | ["Onyxia's Lair"] = "오닉시아의 둥지", |
||
419 | ["Orgrimmar"] = "오그리마", |
||
420 | ["Ratchet"] = "톱니항", |
||
421 | ["Ragefire Chasm"] = "성난 불길협곡", |
||
422 | ["Razorfen Downs"] = "가시덩쿨 구릉", |
||
423 | ["Razorfen Kraul"] = "가시덩쿨 우리", |
||
424 | ["Redridge Mountains"] = "붉은마루 산맥", |
||
425 | ["Ruins of Ahn'Qiraj"] = "안퀴라즈 폐허", |
||
426 | ["Scarlet Monastery"] = "붉은 십자군 수도원", |
||
427 | ["Scholomance"] = "스칼로맨스", |
||
428 | ["Searing Gorge"] = "이글거리는 협곡", |
||
429 | ["Shadowfang Keep"] = "그림자 송곳니 성채", |
||
430 | ["Silithus"] = "실리더스", |
||
431 | ["Silverpine Forest"] = "은빛소나무 숲", |
||
432 | ["The Stockade"] = "지하감옥", |
||
433 | ["Stonetalon Mountains"] = "돌발톱 산맥", |
||
434 | ["Stormwind City"] = "스톰윈드", |
||
435 | ["Stranglethorn Vale"] = "가시덤불 골짜기", |
||
436 | ["Stratholme"] = "스트라솔름", |
||
437 | ["Swamp of Sorrows"] = "슬픔의 늪", |
||
438 | ["Tanaris"] = "타나리스", |
||
439 | ["Teldrassil"] = "텔드랏실", |
||
440 | ["Temple of Ahn'Qiraj"] = "안퀴라즈", |
||
441 | ["The Temple of Atal'Hakkar"] = "아탈학카르 신전", |
||
442 | ["Thousand Needles"] = "버섯구름 봉우리", |
||
443 | ["Thunder Bluff"] = "썬더 블러프", |
||
444 | ["Tirisfal Glades"] = "티리스팔 숲", |
||
445 | ["Uldaman"] = "울다만", |
||
446 | ["Un'Goro Crater"] = "운고로 분화구", |
||
447 | ["Undercity"] = "언더시티", |
||
448 | ["Wailing Caverns"] = "통곡의 동굴", |
||
449 | ["Warsong Gulch"] = "전쟁노래 협곡", |
||
450 | ["Western Plaguelands"] = "서부 역병지대", |
||
451 | ["Westfall"] = "서부 몰락지대", |
||
452 | ["Wetlands"] = "저습지", |
||
453 | ["Winterspring"] = "여명의 설원", |
||
454 | ["Zul'Farrak"] = "줄파락", |
||
455 | ["Zul'Gurub"] = "줄구룹", |
||
456 | } |
||
457 | elseif locale ~= "enUS" then |
||
458 | -- no translations |
||
459 | englishToLocal = { |
||
460 | } |
||
461 | end |
||
462 | |||
463 | if englishToLocal then |
||
464 | for key in pairs(englishToLocal) do |
||
465 | if not totalZones[key] then |
||
466 | error("Improper translation exists. %q is likely misspelled for locale %s.", key, locale) |
||
467 | break |
||
468 | end |
||
469 | end |
||
470 | end |
||
471 | |||
472 | -------------IRIEL'S-STUB-CODE-------------- |
||
473 | local stub = {}; |
||
474 | |||
475 | -- Instance replacement method, replace contents of old with that of new |
||
476 | function stub:ReplaceInstance(old, new) |
||
477 | for k,v in pairs(old) do old[k]=nil; end |
||
478 | for k,v in pairs(new) do old[k]=v; end |
||
479 | end |
||
480 | |||
481 | -- Get a new copy of the stub |
||
482 | function stub:NewStub() |
||
483 | local newStub = {}; |
||
484 | self:ReplaceInstance(newStub, self); |
||
485 | newStub.lastVersion = ''; |
||
486 | newStub.versions = {}; |
||
487 | return newStub; |
||
488 | end |
||
489 | |||
490 | -- Get instance version |
||
491 | function stub:GetInstance(version) |
||
492 | if (not version) then version = self.lastVersion; end |
||
493 | local versionData = self.versions[version]; |
||
494 | if (not versionData) then |
||
495 | message("Cannot find library instance with version '" |
||
496 | .. version .. "'"); |
||
497 | return; |
||
498 | end |
||
499 | return versionData.instance; |
||
500 | end |
||
501 | |||
502 | -- Register new instance |
||
503 | function stub:Register(newInstance) |
||
504 | local version,minor = newInstance:GetLibraryVersion(); |
||
505 | self.lastVersion = version; |
||
506 | local versionData = self.versions[version]; |
||
507 | if (not versionData) then |
||
508 | -- This one is new! |
||
509 | versionData = { instance = newInstance, |
||
510 | minor = minor, |
||
511 | old = {} |
||
512 | }; |
||
513 | self.versions[version] = versionData; |
||
514 | newInstance:LibActivate(self); |
||
515 | return newInstance; |
||
516 | end |
||
517 | if (minor <= versionData.minor) then |
||
518 | -- This one is already obsolete |
||
519 | if (newInstance.LibDiscard) then |
||
520 | newInstance:LibDiscard(); |
||
521 | end |
||
522 | return versionData.instance; |
||
523 | end |
||
524 | -- This is an update |
||
525 | local oldInstance = versionData.instance; |
||
526 | local oldList = versionData.old; |
||
527 | versionData.instance = newInstance; |
||
528 | versionData.minor = minor; |
||
529 | local skipCopy = newInstance:LibActivate(self, oldInstance, oldList); |
||
530 | table.insert(oldList, oldInstance); |
||
531 | if (not skipCopy) then |
||
532 | for i, old in ipairs(oldList) do |
||
533 | self:ReplaceInstance(old, newInstance); |
||
534 | end |
||
535 | end |
||
536 | return newInstance; |
||
537 | end |
||
538 | |||
539 | -- Bind stub to global scope if it's not already there |
||
540 | if (not BabbleLib) then |
||
541 | BabbleLib = stub:NewStub(); |
||
542 | end |
||
543 | |||
544 | -- Nil stub for garbage collection |
||
545 | stub = nil; |
||
546 | -----------END-IRIEL'S-STUB-CODE------------ |
||
547 | |||
548 | local function assert(condition, message) |
||
549 | if not condition then |
||
550 | local stack = debugstack() |
||
551 | local first = string.gsub(stack, "\n.*", "") |
||
552 | local file = string.gsub(first, "^(.*\\.*).lua:%d+: .*", "%1") |
||
553 | file = string.gsub(file, "([%(%)%.%*%+%-%[%]%?%^%$%%])", "%%%1") |
||
554 | if not message then |
||
555 | local _,_,second = string.find(stack, "\n(.-)\n") |
||
556 | message = "assertion failed! " .. second |
||
557 | end |
||
558 | message = "BabbleLib-Zone: " .. message |
||
559 | local i = 1 |
||
560 | for s in string.gfind(stack, "\n([^\n]*)") do |
||
561 | i = i + 1 |
||
562 | if not string.find(s, file .. "%.lua:%d+:") then |
||
563 | error(message, i) |
||
564 | return |
||
565 | end |
||
566 | end |
||
567 | error(message, 2) |
||
568 | return |
||
569 | end |
||
570 | return condition |
||
571 | end |
||
572 | |||
573 | local function argCheck(arg, num, kind, kind2, kind3, kind4) |
||
574 | if tostring(type(arg)) ~= kind then |
||
575 | if kind2 then |
||
576 | if tostring(type(arg)) ~= kind2 then |
||
577 | if kind3 then |
||
578 | if tostring(type(arg)) ~= kind3 then |
||
579 | if kind4 then |
||
580 | if tostring(type(arg)) ~= kind4 then |
||
581 | local _,_,func = string.find(debugstack(), "\n.-`(.-)'\n") |
||
582 | assert(false, format("Bad argument #%d to `%s' (%s, %s, %s, or %s expected, got %s)", num, func, kind, kind2, kind3, kind4, type(arg))) |
||
583 | end |
||
584 | else |
||
585 | local _,_,func = string.find(debugstack(), "\n.-`(.-)'\n") |
||
586 | assert(false, format("Bad argument #%d to `%s' (%s, %s, or %s expected, got %s)", num, func, kind, kind2, kind3, type(arg))) |
||
587 | end |
||
588 | end |
||
589 | else |
||
590 | local _,_,func = string.find(debugstack(), "\n.-`(.-)'\n") |
||
591 | assert(false, format("Bad argument #%d to `%s' (%s or %s expected, got %s)", num, func, kind, kind2, type(arg))) |
||
592 | end |
||
593 | end |
||
594 | else |
||
595 | local _,_,func = string.find(debugstack(), "\n.-`(.-)'\n") |
||
596 | assert(false, format("Bad argument #%d to `%s' (%s expected, got %s)", num, func, kind, type(arg))) |
||
597 | end |
||
598 | end |
||
599 | end |
||
600 | |||
601 | local lib = {} |
||
602 | local localToEnglish |
||
603 | |||
604 | if locale == "enUS" then |
||
605 | function lib:GetEnglish(zone) |
||
606 | argCheck(zone, 2, "string") |
||
607 | assert(totalZones[zone], format("Zone %q does not exist", zone)) |
||
608 | return zone |
||
609 | end |
||
610 | |||
611 | function lib:GetLocalized(zone) |
||
612 | argCheck(zone, 2, "string") |
||
613 | assert(totalZones[zone], format("Zone %q does not exist", zone)) |
||
614 | return zone |
||
615 | end |
||
616 | |||
617 | function lib:GetIterator() |
||
618 | return pairs(totalZones) |
||
619 | end |
||
620 | |||
621 | lib.GetReverseIterator = lib.GetIterator |
||
622 | |||
623 | function lib:HasZone(zone) |
||
624 | argCheck(zone, 2, "string") |
||
625 | return totalZones[zone] and true or false |
||
626 | end |
||
627 | else |
||
628 | function lib:GetEnglish(zone) |
||
629 | argCheck(zone, 2, "string") |
||
630 | local z = localToEnglish[zone] |
||
631 | assert(z, format("Zone %q does not exist or is not translated into %s", zone, locale)) |
||
632 | return z |
||
633 | end |
||
634 | |||
635 | function lib:GetLocalized(zone) |
||
636 | argCheck(zone, 2, "string") |
||
637 | assert(totalZones[zone], format("Zone %q does not exist", zone)) |
||
638 | local z = englishToLocal[zone] |
||
639 | assert(z, format("Zone %q is not translated into %s", zone, locale)) |
||
640 | return z |
||
641 | end |
||
642 | |||
643 | local improperTranslation = nil |
||
644 | for zone in pairs(totalZones) do |
||
645 | if not englishToLocal[zone] then |
||
646 | improperTranslation = zone |
||
647 | break |
||
648 | end |
||
649 | end |
||
650 | |||
651 | if improperTranslation then |
||
652 | function lib:GetIterator() |
||
653 | assert(false, "Zone %q not translated into %s", improperTranslation, locale) |
||
654 | end |
||
655 | |||
656 | lib.GetReverseIterator = lib.GetIterator |
||
657 | else |
||
658 | function lib:GetIterator() |
||
659 | return pairs(englishToLocal) |
||
660 | end |
||
661 | |||
662 | function lib:GetReverseIterator() |
||
663 | return pairs(localToEnglish) |
||
664 | end |
||
665 | end |
||
666 | |||
667 | function lib:HasZone(zone) |
||
668 | argCheck(zone, 2, "string") |
||
669 | return (totalZones[zone] or localToEnglish[zone]) and true or false |
||
670 | end |
||
671 | end |
||
672 | |||
673 | function lib:GetLibraryVersion() |
||
674 | return MAJOR_VERSION, MINOR_VERSION |
||
675 | end |
||
676 | |||
677 | function lib:LibActivate(stub, oldLib, oldList) |
||
678 | if locale ~= "enUS" then |
||
679 | localToEnglish = {} |
||
680 | for english, localized in pairs(englishToLocal) do |
||
681 | localToEnglish[localized] = english |
||
682 | end |
||
683 | end |
||
684 | |||
685 | local mt = getmetatable(self) or {} |
||
686 | mt.__call = self.GetLocalized |
||
687 | setmetatable(self, mt) |
||
688 | end |
||
689 | |||
690 | function lib:LibDeactivate() |
||
691 | totalZones, localToEnglish, englishToLocal = nil |
||
692 | end |
||
693 | |||
694 | BabbleLib:Register(lib) |
||
695 | lib = nil |