--[[-------------------------------------------------------------------- |
ConfirmLeaveParty |
Asks for confirmation when leaving a group inside an instance. |
Written by Phanx < addons@phanx.net > |
http://www.wowinterface.com/downloads/info16676-ConfirmLeaveParty.html |
http://www.curse.com/addons/wow/confirmleaveparty |
----------------------------------------------------------------------]] |
|
local CONFIRM_LEAVE_PARTY = "Do you really want to leave the group?" |
|
if GetLocale() == "deDE" then |
CONFIRM_LEAVE_PARTY = "Willst du wirklich die Gruppe verlassen?" -- by Shantalya @ WoWI |
elseif GetLocale() == "esES" or GetLocale() == "esMX" then |
CONFIRM_LEAVE_PARTY = "¿Realmente quiere dejar el grupo?" -- by Google Translate |
elseif GetLocale() == "frFR" then |
CONFIRM_LEAVE_PARTY = "Veux-tu vraiment à quitter le groupe?" -- by Google Translate |
elseif GetLocale() == "itIT" then |
CONFIRM_LEAVE_PARTY = "Vuoi lasciare veramente il gruppo?" -- by Google Translate |
elseif GetLocale() == "ptBR" then |
CONFIRM_LEAVE_PARTY = "Tem certeza de que deseja sair o grupo?" -- by Google Translate |
elseif GetLocale() == "ruRU" then |
CONFIRM_LEAVE_PARTY = "ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ
оÑиÑе вÑйÑи из гÑÑппÑ?" -- by Google Translate |
elseif GetLocale() == "koKR" then |
CONFIRM_LEAVE_PARTY = "ë¹ì ì´ ì ë§ë¡ 그룹ì ë ëìê² ìµëê¹?" -- by Google Translate |
elseif GetLocale() == "zhCN" then |
CONFIRM_LEAVE_PARTY = "é¾éä½ ççæ³ç¦»å¼ç»å?" -- by Google Translate |
elseif GetLocale() == "zhTW" then |
CONFIRM_LEAVE_PARTY = "é£éä½ ççæ³é¢éçµå?" -- by Google Translate |
end |
|
------------------------------------------------------------------------ |
|
local ReallyLeaveParty = LeaveParty |
|
StaticPopupDialogs["CONFIRM_LEAVE_PARTY"] = { |
text = CONFIRM_LEAVE_PARTY, |
button1 = YES, |
button2 = NO, |
enterClicksFirstButton = 1, -- YES on enter |
hideOnEscape = 1, -- NO on escape |
timeout = 0, |
preferredIndex = 3, -- helps prevent taint; see http://forums.wowace.com/showthread.php?t=19960 |
OnAccept = ReallyLeaveParty, |
} |
|
LeaveParty = function() |
local _, instanceType = IsInInstance() |
if instanceType == "party" or instanceType == "raid" then |
if GetNumGroupMembers() > 0 or GetNumSubgroupMembers() > 0 then |
return StaticPopup_Show("CONFIRM_LEAVE_PARTY") |
end |
end |
ReallyLeaveParty() |
end |