public
Description: WoW Powerleveling addon
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/tourguide.git
Click here to lend your support to: tourguide and make a donation at www.pledgie.com !
tekkub (author)
Fri Jun 06 15:56:55 -0700 2008
commit  5c98628ba99887693b44b0d429a27373ba998019
tree    a185872805173ce3a8a8329484faa52aceb15178
parent  f77009951f959b2f316b94555bd5a36ff331e611
tourguide / Locale.lua
100644 51 lines (37 sloc) 1.614 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 
local localized
local loc = GetLocale()
 
 
-----------------------
-- Engrish --
-----------------------
 
local engrish = {
  PART_GSUB = "%s%(Part %d+%)",
  PART_FIND = "(.+)%s%(Part %d+%)",
 
  -- Mapping.lua
  COORD_MATCH = "%(([%d.]+),%s?([%d.]+)%)",
}
 
 
----------------------
-- German --
----------------------
 
if loc == "deDE" then localized = {
  PART_GSUB = "%s%(Teil %d+%)",
  PART_FIND = "(.+)%s%(Teil %d+%)",
  ["(.*) is now your home."] = "(.*) ist jetzt Euer Zuhause.",
  ["Quest accepted: (.*)"] = "Quest angenommen: (.*)",
  ["^You .*Hitem:(%d+).*(%[.+%])"] = "^Ihr .*Hitem:(%d+).*(%[.+%])",
  ["|cffff4500This quest is not listed in your current guide"] = "|cffff4500Diese Quest ist nicht in deinem Guide",
} end
 
 
----------------------
-- French --
----------------------
 
if loc == "frFR" then localized = {
  PART_GSUB = "%s%(Partie %d+%)",
  PART_FIND = "(.+)%s%(Partie %d+%)",
  ["(.*) is now your home."] = "(.*) est maintenant votre foyer.",
  ["Quest accepted: (.*)"] = "Quête acceptée: (.*)",
  ["^You .*Hitem:(%d+).*(%[.+%])"] = "^Vous .*Hitem:(%d+).*(%[.+%])",
  ["|cffff4500This quest is not listed in your current guide"] = "|cffff4500Cette quête n'est pas listé dans votre guide actuel",
} end
 
 
-- Metatable majicks... makes localized table fallback to engrish, or fallback to the index requested.
-- This ensures we ALWAYS get a value back, even if it's the index we requested originally
TOURGUIDE_LOCALE = localized and setmetatable(localized, {__index = function(t,i) return engrish[i] or i end})
  or setmetatable(engrish, {__index = function(t,i) return i end})