Skip to content

Commit

Permalink
Added text values to summon status (GH issue #248)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnpsp committed Jun 30, 2024
1 parent fcfda32 commit 3ef2ade
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 1 deletion.
6 changes: 6 additions & 0 deletions locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ L["talking"] = "Spricht"
-- L["Me"] = ""
---}}}

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
L["None"] = "Keine"
L["Solo"] = "Allein"
Expand Down
6 changes: 6 additions & 0 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ L["Me"] = true
L["combat"] = true
---}}}

--{{{ Summon
L["Pending"] = true
L["Accepted"] = true
L["Declined"] = true
---}}}

--Layouts
L["None"] = true
L["Solo"] = true
Expand Down
6 changes: 6 additions & 0 deletions locales/esES.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ L["Me"] = "Yo"
L["combat"] = "Combate"
--}}

--{{{ Summon
L["Pending"] = "Pendiente"
L["Accepted"] = "Aceptado"
L["Declined"] = "Rechazado"
---}}}

--Layouts
L["None"] = "Ninguno"
L["Solo"] = "Solo"
Expand Down
6 changes: 6 additions & 0 deletions locales/esMX.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ L["Revived"] = "Revivido"
-- L["Me"] = ""
---}}}

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
L["None"] = "Ninguno"
L["Solo"] = "Solo"
Expand Down
6 changes: 6 additions & 0 deletions locales/frFR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ L["talking"] = "Parle"
-- L["Me"] = ""
---}}}

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
L["None"] = "Aucun"
L["Solo"] = "Seul"
Expand Down
6 changes: 6 additions & 0 deletions locales/itIT.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ L["vehicle"] = "veicolo"
L["X"] = "X"
L["Me"] = "Io"

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
L["None"] = "Nessuno"
L["Solo"] = "Solo"
Expand Down
6 changes: 6 additions & 0 deletions locales/koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ L["Revived"] = "부활"
-- L["Me"] = ""
---}}}

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
L["None"] = "없음"
L["Solo"] = "솔로잉"
Expand Down
6 changes: 6 additions & 0 deletions locales/ptBR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ L["Revived"] = "Reviver"
-- L["Me"] = ""
---}}}

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
L["None"] = "Nada"
L["Solo"] = "Sozinho"
Expand Down
6 changes: 6 additions & 0 deletions locales/ruRU.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ L["talking"] = "Говорит"
-- L["Me"] = ""
---}}}

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
-- L["None"] = ""
L["Solo"] = "Соло"
Expand Down
6 changes: 6 additions & 0 deletions locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ L["Revived"] = "已复活"
-- L["Me"] = ""
---}}}

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
L["None"] = ""
L["Solo"] = "单人"
Expand Down
6 changes: 6 additions & 0 deletions locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ L["Revived"] = "已復活"
-- L["Me"] = ""
---}}}

--{{{ Summon
-- L["Pending"] = ""
-- L["Accepted"] = ""
-- L["Declined"] = ""
---}}}

--Layouts
L["None"] = ""
L["Solo"] = "單人"
Expand Down
14 changes: 13 additions & 1 deletion modules/StatusSummon.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
if Grid2.isClassic then return end

local L = LibStub:GetLibrary("AceLocale-3.0"):GetLocale("Grid2")

local status = Grid2.statusPrototype:new("summon")

local HasIncomingSummon = C_IncomingSummon.HasIncomingSummon
local IncomingSummonStatus = C_IncomingSummon.IncomingSummonStatus

local texts = {
[1] = L["Pending"],
[2] = L["Accepted"],
[3] = L["Declined"],
}

function status:INCOMING_SUMMON_CHANGED(_, unit)
self:UpdateIndicators(unit)
end
Expand Down Expand Up @@ -48,8 +56,12 @@ function status:GetTexCoord(unit)
end
end

function status:GetText(unit)
return texts[ IncomingSummonStatus(unit) ] or ""
end

Grid2.setupFunc["summon"] = function(baseKey, dbx)
Grid2:RegisterStatus(status, {"color", "icon"}, baseKey, dbx)
Grid2:RegisterStatus(status, {"text", "color", "icon"}, baseKey, dbx)
return status
end

Expand Down

0 comments on commit 3ef2ade

Please sign in to comment.