-
Notifications
You must be signed in to change notification settings - Fork 1
/
Localization.lua
63 lines (51 loc) · 2.42 KB
/
Localization.lua
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
function FeedbackUI_Localize()
if GetLocale() == "esES" or GetLocale() == "frFR" or GetLocale() == "deDE" then
FeedbackUI:SetWidth(450);
FeedbackUIWelcomeFrameSurveysBtn:SetWidth(175);
FeedbackUIWelcomeFrameSuggestionsBtn:SetWidth(175);
FeedbackUIWelcomeFrameBugsBtn:SetWidth(175);
if ( GetLocale() == "deDE" ) then
FeedbackUISurveyFrameReset:SetWidth(110);
FeedbackUISurveyFrameBack:SetWidth(110);
FeedbackUISuggestFrameBack:SetWidth(110);
FeedbackUISuggestFrameReset:SetWidth(110);
FeedbackUIBugFrameBack:SetWidth(110);
FeedbackUIBugFrameReset:SetWidth(110);
FeedbackUISurveyFrameSkip:SetWidth(80);
end
end
end
function FeedbackUI_GetLocalizedCharString (level, race, gender, class)
if ( GetLocale() == "deDE" ) then
return FEEDBACKUI_LEVELPREFIX .. " " .. level .. " " .. race .. " " .. class .. " " .. gender;
else
return FEEDBACKUI_LEVELPREFIX .. " " .. level .. " " .. race .. " " .. gender .. " " .. class;
end
end
function FeedbackUI_SetupTargets()
g_FeedbackUI_surveysTable = ( g_FeedbackUI_surveysTable or {} );
g_FeedbackUI_surveysTable["Targets"] = {};
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_UTGARDEKEEP .. "1"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_UTGARDEPINNACLE .. "1"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_NEXUS .. "1"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_DRAKTHARONKEEP .. "1"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_ULDUAR .. "1"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_HOL .. "1"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_KAJA] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_TAC .. "1"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_TAC .. "2"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_TAC .. "3"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_TAC .. "4"] = true;
g_FeedbackUI_surveysTable["Targets"][FEEDBACKUI_IOC .. "3"] = true;
end
function QuestAlert_SerializeCSVFileToLua(filename)
assert(filename, "Syntax: CombatScanner_SerializeCSVFileToLua(filename)");
local newData = "";
local data = ReadFile(filename);
if ( not data ) then return; end
for id in gmatch(data, "(%d+)") do
newData = newData .. "g_FeedbackUI_surveysTable[\"Targets\"][\"" .. id .. "\"] = true;\r\n";
end
DeleteFile("Interface\\AddOns\\FeedbackUI\\output.txt")
AppendToFile("Interface\\AddOns\\FeedbackUI\\output.txt", newData);
end