Content deleted Content added
rework the functions so that they take an action object as input |
add category code |
||
Line 50:
},
blurb = '',
image = '',
categories = {
function (actionObj)
local result = actionObj:getResult()
if result == 'demoted' or result == 'merged' then
local currentStatus = actionObj:getCurrentStatus()
local sortKey = actionObj.title.subjectPageTitle.prefixedText
if currentStatus == 'FA' or currentStatus == 'FL' then
sortKey = '#' .. sortKey
end
return 'Wikipedia former featured articles', sortKey
end
end
}
},
BP = {
Line 82 ⟶ 95:
},
blurb = '',
image = '',
categories = {
function (actionObj)
if actionObj:getResult() == 'not kept' then
return 'Wikipedia former brilliant prose', actionObj.title.text
end
end
}
},
FLC = {
Line 125 ⟶ 145:
},
blurb = '',
image = '',
categories = {
function (actionObj)
local result = actionObj:getResult()
if result == 'demoted' or result == 'merged' then
local sortKey
if actionObj:getCurrentStatus() == 'FL' then
sortKey = '#' .. actionObj.title.subjectPageTitle.prefixedText
else
sortKey = actionObj.title.text
end
return 'Wikipedia former featured lists', sortKey
end
end
}
},
FTC = {
Line 228 ⟶ 262:
},
blurb = '',
image = '',
categories = {
function (actionObj)
if actionObj:getResult() == 'not listed' then
local currentStatus = actionObj:getCurrentStatus()
if currentStatus ~= 'FA'
and currentStatus ~= 'GA'
and currentStatus ~= 'FFA'
and currentStatus ~= 'FFA/GA'
then
return 'Former good article nominees', actionObj.title.text
end
end
end
}
},
GAR = {
Line 256 ⟶ 304:
},
blurb = '',
image = '',
categories = {
function (actionObj)
if actionObj:getResult() == 'delisted' then
local currentStatus = actionObj:getCurrentStatus()
if currentStatus ~= 'FA'
and currentStatus ~= 'GA'
and currentStatus ~= 'FFA/GA'
then
return 'Delisted good articles', actionObj.title.text
end
end
end
}
},
GTC = {
Line 306 ⟶ 367:
validStatuses = false,
blurb = '',
image = '',
categories = {'Old requests for peer review'}
},
WPR = {
Line 316 ⟶ 378:
maindate = "Today's featured article"
}
local result = actionObj:
return result and names[result] or 'WikiProject peer review'
end,
|