Content deleted Content added
change invalid action oldids from an error to a warning |
remove the error message from args.dykdate2 etc., and instead categorise them in Category:Article history templates with deprecated parameters |
||
Line 117:
end
if args[prefix .. 'date2'] then
data.hasDeprecatedParams = true -- For adding a tracking category
local t = {}
do
local
▲ t.date = validateDate(oldKey, args[oldKey], articleHistoryObj)
end
for i, suffix in ipairs(suffixes) do
local
▲ t[suffix] = args[oldKey]
end
data[#data + 1] = t
end
if prefixArgs[prefix] then
Line 180 ⟶ 167:
local dateList = mw.text.listToText(dates, ', ', ', and ')
return mw.message.newRawMessage(blurb, dateList):plain()
end
local function makeDeprecatedParamsCategory(data)
if data and data.hasDeprecatedParams then
return Category.new('Article history templates with deprecated parameters')
end
end
Line 1,724 ⟶ 1,717:
end
cats[1] = Category.new(cat)
cats[2] = makeDeprecatedParamsCategory(collapsibleNoticeObj:getData())
return cats
end
Line 1,757 ⟶ 1,751:
return makeDateText(data, blurb)
end,
categories =
local cats = {}
cats[1] = Category.new('Wikipedia In the news articles')
cats[2] = makeDeprecatedParamsCategory(collapsibleNoticeObj:getData())
return cats
end
},
Line 1,790 ⟶ 1,789:
return makeDateText(data, blurb)
end,
categories =
local cats = {}
cats[1] = Category.new('Selected anniversaries articles')
cats[2] = makeDeprecatedParamsCategory(collapsibleNoticeObj:getData())
return cats
end
},
|