From 987f223b588a219ca265ce4a19b0d42bd299fe6c Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Sun, 28 Mar 2010 21:17:34 -0400 Subject: [PATCH] Selections in the sort-type dropdown box are now properly localized. --- Frame.lua | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/Frame.lua b/Frame.lua index 11f39d4..04f7c83 100644 --- a/Frame.lua +++ b/Frame.lua @@ -1219,6 +1219,21 @@ local function SetSortName() end end +local function TranslateSortName(sort_type) + if sort_type == "Name" then + return _G.NAME + elseif sort_type == "SkillAsc" then + return L["Skill (Asc)"] + elseif sort_type == "SkillDesc" then + return L["Skill (Desc)"] + elseif sort_type == "Acquisition" then + return L["Acquisition"] + elseif sort_type == "Location" then + return L["Location"] + end + return _G.UNKNOWN +end + local function ARL_DD_Sort_OnClick(button, value) CloseDropDownMenus() addon.db.profile.sorting = value @@ -1230,36 +1245,36 @@ local function ARL_DD_Sort_Initialize() local info = _G.UIDropDownMenu_CreateInfo() local k = "Name" - info.text = k - info.arg1 = info.text + info.text = TranslateSortName(k) + info.arg1 = k info.func = ARL_DD_Sort_OnClick info.checked = (addon.db.profile.sorting == k) _G.UIDropDownMenu_AddButton(info) k = "SkillAsc" - info.text = k - info.arg1 = info.text + info.text = TranslateSortName(k) + info.arg1 = k info.func = ARL_DD_Sort_OnClick info.checked = (addon.db.profile.sorting == k) _G.UIDropDownMenu_AddButton(info) k = "SkillDesc" - info.text = k - info.arg1 = info.text + info.text = TranslateSortName(k) + info.arg1 = k info.func = ARL_DD_Sort_OnClick info.checked = (addon.db.profile.sorting == k) _G.UIDropDownMenu_AddButton(info) k = "Acquisition" - info.text = k - info.arg1 = info.text + info.text = TranslateSortName(k) + info.arg1 = k info.func = ARL_DD_Sort_OnClick info.checked = (addon.db.profile.sorting == k) _G.UIDropDownMenu_AddButton(info) k = "Location" - info.text = k - info.arg1 = info.text + info.text = TranslateSortName(k) + info.arg1 = k info.func = ARL_DD_Sort_OnClick info.checked = (addon.db.profile.sorting == k) _G.UIDropDownMenu_AddButton(info) -- 1.7.9.5