-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocalization.lua
More file actions
319 lines (298 loc) · 8.34 KB
/
Copy pathlocalization.lua
File metadata and controls
319 lines (298 loc) · 8.34 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
--[[
okay, all localization is in one file. I guess this will be a pain in the ass to get
different people to work on it at first, but later on it'll be eaisier for me to add
single values.
--]]
-- ERR_BAGATTACKPOS is a blizzard defined string. we can compare the value of this string to guess
-- your game's language
ERR_BADATTACKPOS_LOCAL_EN = "You are too far away!";
ERR_BADATTACKPOS_LOCAL_DE = "Ihr seid zu weit entfernt!";
ERR_BADATTACKPOS_LOCAL_FR = "You are too far away! -- But in french";
EILocal = {
["_loaded"] = 0
};
ENGINVENTORY_HELP = {
["EN"] = {
"EngInventory Commands:",
" /ei show -- open window",
" /ei hide -- hide window",
" /ei scale #.## -- set the window scale. use a number between 0.64 and 1.00",
" /ei update",
" /ei debug -- turn debug info on/off",
" /ei display -- display item cache",
" /ei checkhooks -- see if everything is registered properly",
" /ei resetdefaults -- sets everything back to default values"
},
["DE"] = { -- for the slash commands i've seen no use in translating it. Just translated the comments for better understanding
"EngInventory Commands:",
" /ei show",
" /ei hide -- hide window",
" /ei scale #.## -- set the window scale. use a number between 0.64 and 1.00",
" /ei update",
" /ei debug -- Debug Info an/aus",
" /ei display -- Item Cache anzeigen",
" /ei checkhooks -- Sehen, ob alles korrekt registriert wurde",
" /ei resetdefaults -- Auf Defaultwerte zurücksetzen"
},
["FR"] = {
"EngInventory Commands:",
" /ei show",
" /ei hide -- hide window",
" /ei scale #.## -- set the window scale. use a number between 0.64 and 1.00",
" /ei update",
" /ei debug -- turn debug info on/off",
" /ei display -- display item cache",
" /ei checkhooks -- see if everything is registered properly",
" /ei resetdefaults -- sets everything back to default values"
}
};
-- 1st element is EN, 2nd DE, 3rd FR
ENGINVENTORY_LOCALIZATION = {
-- some default items to place in slots manually
["RightClick_MenuTitle"] = {
"EngInventory v"..ENGINVENTORY_VERSION,
"EngInventory v"..ENGINVENTORY_VERSION,
"EngInventory v"..ENGINVENTORY_VERSION
},
["RightClick_ShowNewItems"] = {
"New Items",
"New Items",
"New Items"
},
["soulbound_search"] = { -- looking for soulbound keyword is special
"Soulbound",
"Seelengebunden",
"Soulbound"
},
["Warlock"] = {
"Warlock",
"Warlock",
"Warlock"
},
["Priest"] = {
"Priest",
"Priest",
"Priest"
},
["Mage"] = {
"Mage",
"Mage",
"Mage"
},
["Rogue"] = {
"Rogue",
"Rogue",
"Rogue"
},
["Warrior"] = {
"Warrior",
"Warrior",
"Warrior"
},
["Hunter"] = {
"Hunter",
"Hunter",
"Hunter"
},
["Shaman"] = {
"Shaman",
"Shaman",
"Shaman"
},
["Druid"] = {
"Druid",
"Druid",
"Druid"
},
["Paladin"] = {
"Paladin",
"Paladin",
"Paladin"
},
["Cooking"] = {
"Cooking",
"Cooking",
"Cooking"
},
["First Aid"] = {
"First Aid",
"First Aid",
"First Aid"
},
["string_searches"] = {
{ -- english
{ "FOOD", "Restores ([0-9.]+) health over ([0-9.]+) sec" },
{ "DRINK", "Restores ([0-9.]+) mana over ([0-9.]+) sec" },
{ "HEALINGPOTION", "Restores ([0-9.]+) to ([0-9.]+) health." },
{ "MANAPOTION", "Restores ([0-9.]+) to ([0-9.]+) mana." },
{ "PROJECTILE", "Projectile" },
{ "JUJU", "Juju" },
{ "BANDAGE", " Bandage" },
{ "HEALTHSTONE", " Healthstone" },
{ "RECIPE", "Recipe:" },
{ "PATTERN", "Pattern:" },
{ "SCHEMATIC", "Schematic:" },
{ "FORMULA", "Formula:" },
{ "MINIPET", "Right Click to summon and dismiss your" },
{ "ROGUE_POISON", "Crippling Poison [IV]*" },
{ "ROGUE_POISON", "Deadly Poison [IV]*" },
{ "ROGUE_POISON", "Instant Poison [IV]*" },
{ "ROGUE_POISON", "Mind-numbing Poison [IV]*" },
{ "ROGUE_POISON", "Wound Poison [IV]*" },
{ "ROGUE_POWDER", "Blinding Powder" },
{ "ROGUE_POWDER", "Flash Powder" },
{ "QUESTITEMS", "Use: Bind pages [0-9]" }, -- shredder operating manual & green hills of stranglethorn
{ "KEYS", " Key" }
},
{ -- german
{ "FOOD", "Stellt im Verlauf von ([0-9.]+) Sek. ([0-9.]+) Punkt(e) Gesundheit wieder her." },
{ "DRINK", "Stellt im Verlauf von ([0-9.]+) Sek. ([0-9.]+) Punkt(e) Mana wieder her." },
{ "INSTANT_HP", "Stellt ([0-9.]+) bis ([0-9.]+) Punkt(e) Gesundheit wieder her." },
{ "INSTANT_MANA", "Stellt ([0-9.]+) bis ([0-9.]+) Punkt(e) Mana wieder her." },
{ "PROJECTILE", "Projektil" },
{ "JUJU", "Juju" },
{ "BANDAGE", "Verband" },
{ "HEALTHSTONE", "Gesundheitsstein" },
},
{ -- french
}
}, -- end of string searches
-- values from GetItemInfo() (itemType)
["tradegoods"] = {
"Trade Goods",
"Handwerkswaren",
"Trade Goods"
},
["miscellaneous"] = {
"Miscellaneous",
"Verschiedenes",
"Misellaneous"
},
["reagent"] = {
"Reagent",
"Reagenz",
"Reagent"
},
["quest"] = {
"Quest",
"Quest",
"Quest"
},
["consumable"] = {
"Consumable",
"Verbrauchbar",
"consumable"
},
-- window elements
["EngInventory_Button_HighlightToggle_on"] = {
"Hilight New: ON",
"Hilight New: ON",
"Hilight New: ON"
},
["EngInventory_Button_HighlightToggle_on_tooltip"] = {
"Highlight of new items is on.",
"Highlight of new items is on.",
"Highlight of new items is on."
},
["EngInventory_Button_HighlightToggle_off"] = {
"Hilight New: OFF",
"Hilight New: OFF",
"Hilight New: OFF"
},
["EngInventory_Button_HighlightToggle_off_tooltip"] = {
"Highlight of new items is off.",
"Highlight of new items is off.",
"Highlight of new items is off."
},
["EngInventory_Button_MoveLock_locked"] = {
"L",
"L",
"L"
},
["EngInventory_Button_MoveLock_unlocked"] = {
"U",
"U",
"U"
},
["EngInventory_Button_ChangeEditMode_MoveClass"] = {
"Edit Mode",
"Edit Mode",
"Edit Mode"
},
["EngInventory_Button_ChangeEditMode_MoveItem"] = {
"Move Items",
"Move Items",
"Move Items"
},
["EngInventory_Button_ChangeEditMode_off"] = {
"Edit",
"Edit",
"Edit"
},
["EngInventory_Button_ChangeEditMode_tooltip_title"] = {
"Modify Sort Locations",
"Modify Sort Locations",
"Modify Sort Locations"
},
["EngInventory_Button_ChangeEditMode_tooltip"] = {
"Edit Mode:\n Select this option to move classes of items into different 'bars' (the red numbers).\n\n",
"Edit Mode:\n Select this option to move classes of items into different 'bars' (the red numbers).\n\n",
"Edit Mode:\n Select this option to move classes of items into different 'bars' (the red numbers).\n\n"
},
["EngInventory_Button_ColumnsAdd_buttontitle"] = {
"<<-- -->>",
"<<-- -->>",
"<<-- -->>"
},
["EngInventory_Button_ColumnsAdd_tooltip_title"] = {
"Window Size",
"Window Size",
"Window Size"
},
["EngInventory_Button_ColumnsAdd_tooltip"] = {
"Increase the number of columns displayed",
"Increase the number of columns displayed",
"Increase the number of columns displayed"
},
["EngInventory_Button_ColumnsDel_buttontitle"] = {
"-->> <<--",
"-->> <<--",
"-->> <<--"
},
["EngInventory_Button_ColumnsDel_tooltip_title"] = {
"Window Size",
"Window Size",
"Window Size"
},
["EngInventory_Button_ColumnsDel_tooltip"] = {
"Decrease the number of columns displayed",
"Decrease the number of columns displayed",
"Decrease the number of columns displayed"
},
["help_text"] = {
"EN",
"DE",
"FR"
}
}
function EngInventory_load_Localization(loadlang)
local loadlang_num = 1;
EngInventory_PrintDEBUG("Loading localization: '"..loadlang.."'");
if ( loadlang == "EN" ) then
loadlang_num = 1;
elseif ( loadlang == "DE" ) then
loadlang_num = 2;
elseif ( loadlang == "FR" ) then
loadlang_num = 3;
end
-- the string.gsub is there because the editor I'm using is being stupid and is randomly replaceing spaces with tabs.
for key,value in ENGINVENTORY_LOCALIZATION do
if (type(value[loadlang_num]) == "string") then
EngInventory_PrintDEBUG("localization: "..key.." set to '"..value[loadlang_num].."'");
EILocal[key] = string.gsub(value[loadlang_num], "\t", " ");
else
EILocal[key] = value[loadlang_num];
end
end
EILocal["_loaded"] = 1;
end