ElvUI WindTools

ElvUI WindTools

3M Downloads

[Bug] Chat filter function is applying to MDT links

Nnoggie opened this issue ยท 3 comments

commented

Describe the bug

The chat filter function that adds a translation helper (?) to english words is applying to words within MDT links and breaking them. I think the filter function should not apply to chat links of any kind.

commented

I will take a look of this after work.

commented

the translation only works for item link, mdt link should not be affected, and I checked mdt routes with english name in game, everything works great.

msg = gsub(msg, "(|Hitem:%d+:.-|h.-|h)", AddItemInfo)

->

if CL.db.translateItem then
local localizedName = C_Item_GetItemNameByID(itemID)
if localizedName then
local professionIcon = strmatch(link, "|A:Professions.-|a")
if professionIcon then
localizedName = localizedName .. " " .. professionIcon
end
link = gsub(link, "|h%[(.+)%]|h", "|h[" .. localizedName .. "]|h")
end
end

commented

image