Module:Icon/data: Difference between revisions

Content deleted Content added
add a "link" field which determines whether links should be displayed or suppressed, and copy data into a new table before returning to avoid undefined behaviour
add icon data for WP:GOCE per Special:Diff/1022892230, and record the canonical code for each icon
Line 303:
link = false,
},
portal = {
image = "Symbol portal class.svg",
tooltip = "Portal",
Line 405:
tooltip = "WikiProject",
link = false,
},
goce = {
image = "Writing Magnifying.PNG",
tooltip = "Guild of Copy Editors",
link = true,
},
wikipedia = {
Line 497 ⟶ 502:
 
-- Make aliases work the same as normal keys, and remove the "aliases" subtables.
local ret = {}
for kcode, ticonData in pairs(data) do
iconData.canonicalCode = code
if t.aliases then
for if i, alias in ipairs(ticonData.aliases) dothen
for _, alias in ipairs(iconData.aliases) do
ret[alias] = ticonData
end
ticonData.aliases = nil
end
ret[kcode] = ticonData
end