-------------------------------------------------------------------------------
-- Configuration data for [[Module:Article history]]
-------------------------------------------------------------------------------
local Category = require('Module:Article history/Category')
-------------------------------------------------------------------------------
-- Helper functions
-------------------------------------------------------------------------------
local function getGoodArticleTopic(key)
if not key then
return nil
end
return require('Module:Good article topics')._main(key)
end
local function getGoodArticleTopicLink(key)
local topic = getGoodArticleTopic(key)
local link, display
if topic then
link = 'Wikipedia:Good articles/' .. topic
display = topic .. ' good articles'
else
link = 'Wikipedia:Good articles'
display = 'good articles'
end
return link, display
end
return {
-------------------------------------------------------------------------------
-- CONFIG TABLE START
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Actions
-------------------------------------------------------------------------------
actions = {
FAC = {
id = 'FAC',
name = 'Featured article candidate',
results = {
promoted = {
id = 'promoted',
text = 'Promoted',
aliases = {'pass', 'passed'}
},
['not promoted'] = {
id = 'not promoted',
text = 'Not promoted',
aliases = {'fail', 'failed'}
}
},
validStatuses = {
FFAC = true,
FA = true,
FFA = true
}
},
FAR = {
id = 'FAR',
name = 'Featured article review',
aliases = {'FARC'},
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'pass', 'passed', 'keep'}
},
demoted = {
id = 'demoted',
text = 'Demoted',
aliases = {'fail', 'failed', 'remove', 'removed'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
}
},
validStatuses = {
FA = true,
FFA = true
},
categories = function (articleHistoryObj, actionObj)
local ret = {}
local result = actionObj.resultId
if result == 'demoted' or result == 'merged' then
local status = articleHistoryObj:getStatusId()
local sortKey = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
if status == 'FA' or status == 'FL' then
sortKey = '#' .. sortKey
end
ret[#ret + 1] = Category.new(
'Wikipedia former featured articles',
sortKey
)
end
return ret
end
},
BP = {
id = 'BP',
name = 'Brilliant prose',
results = {
nominated = {
id = 'nominated',
text = 'Nominated',
aliases = {'pass', 'promoted', 'nom'}
}
},
validStatuses = {
}
},
RBP = {
id = 'RBP',
name = 'Refreshing brilliant prose',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'pass', 'passed', 'keep'}
},
['not kept'] = {
id = 'not kept',
text = 'Not kept',
aliases = {'fail', 'failed', 'remove', 'removed', 'demoted'}
}
},
validStatuses = {
FA = true,
FFAC = true
},
categories = function (articleHistoryObj, actionObj)
local ret = {}
if actionObj.resultId == 'not kept' then
ret[#ret + 1] = Category.new(
'Wikipedia former brilliant prose',
articleHistoryObj.currentTitle.text
)
end
return ret
end
},
FLC = {
id = 'FLC',
name = 'Featured list candidate',
results = {
promoted = {
text = 'Promoted',
aliases = {'pass', 'passed'}
},
['not promoted'] = {
text = 'Not promoted',
aliases = {'fail', 'failed'}
}
},
validStatuses = {
FFLC = true,
FL = true,
FFL = true
}
},
FLR = {
id = 'FLR',
name = 'Featured list removal candidate',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'pass', 'passed', 'keep'}
},
demoted = {
id = 'demoted',
text = 'Demoted',
aliases = {'fail', 'failed', 'remove', 'removed'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
}
},
validStatuses = {
FL = true,
FFL = true
},
categories = function (articleHistoryObj, actionObj)
local ret = {}
local result = actionObj.resultId
if result == 'demoted' or result == 'merged' then
local sortKey
if articleHistoryObj:getStatusId() == 'FL' then
sortKey = '#' .. articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
else
sortKey = articleHistoryObj.currentTitle.text
end
ret[#ret + 1] = Category.new(
'Wikipedia former featured lists',
sortKey
)
end
return ret
end
},
FTC = {
id = 'FTC',
name = 'Featured topic candidate',
results = {
promoted = {
id = 'promoted',
text = 'Promoted',
aliases = {'pass', 'passed'}
},
['not promoted'] = {
id = 'not promoted',
text = 'Not promoted',
aliases = {'fail', 'failed'}
}
},
validStatuses = false, -- Any status
},
FTR = {
id = 'FTR',
name = 'Featured topic removal candidate',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'pass', 'passed', 'keep'}
},
demoted = {
id = 'demoted',
text = 'Demoted',
aliases = {'fail', 'failed', 'remove', 'removed'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
}
},
validStatuses = false, -- Any status
},
FPOC = {
id = 'FPOC',
name = 'Featured portal candidate',
results = {
promoted = {
id = 'promoted',
text = 'Promoted',
aliases = {'pass', 'passed'}
},
['not promoted'] = {
id = 'not promoted',
text = 'Not promoted',
aliases = {'fail', 'failed'}
}
},
validStatuses = {
FFPOC = true,
FPO = true,
FFPO = true
}
},
FPOR = {
id = 'FPOR',
name = 'Featured portal review',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'pass', 'passed', 'keep'}
},
demoted = {
id = 'demoted',
text = 'Demoted',
aliases = {'fail', 'failed', 'remove', 'removed'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
}
},
validStatuses = {
FPO = true,
FFPO = true
}
},
GAN = {
id = 'GAN',
name = 'Good article nominee',
aliases = {'GAC'},
results = {
listed = {
id = 'listed',
text = 'Listed',
aliases = {'pass', 'passed', 'promoted'}
},
['not listed'] = {
id = 'not listed',
text = 'Not listed',
aliases = {'fail', 'failed', 'not promoted'}
}
},
validStatuses = {
FGAN = true,
GA = true,
DGA = true,
FFAC = true,
FA = true,
FFA = true
},
categories = function (articleHistoryObj, actionObj)
local ret = {}
if actionObj.resultId == 'not listed' then
local status = articleHistoryObj:getStatusId()
if status ~= 'FA'
and status ~= 'GA'
and status ~= 'FFA'
then
ret[#ret + 1] = Category.new(
'Former good article nominees',
articleHistoryObj.currentTitle.text
)
end
end
return ret
end
},
GAR = {
id = 'GAR',
name = 'Good article reassessment',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'pass', 'passed', 'keep'}
},
delisted = {
id = 'delisted',
text = 'Delisted',
aliases = {'fail', 'failed'}
},
listed = {
id = 'listed',
text = 'Listed'
},
['not listed'] = {
id = 'not listed',
text = 'Not listed'
}
},
validStatuses = {
GA = true,
DGA = true,
FFAC = true,
FA = true,
FFA = true
},
categories = function (articleHistoryObj, actionObj)
local ret = {}
if actionObj.resultId == 'delisted' then
local status = articleHistoryObj:getStatusId()
if status ~= 'FA'
and status ~= 'GA'
then
ret[#ret + 1] = Category.new(
'Delisted good articles',
articleHistoryObj.currentTitle.text
)
end
end
end
},
GTC = {
id = 'GTC',
name = 'Good topic candidate',
results = {
promoted = {
id = 'promoted',
text = 'Promoted',
aliases = {'pass', 'passed'}
},
['not promoted'] = {
id = 'not promoted',
text = 'Not promoted',
aliases = {'fail', 'failed'}
}
},
validStatuses = false
},
GTR = {
id = 'GTR',
name = 'Good topic removal candidate',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'pass', 'passed', 'keep'}
},
demoted = {
id = 'demoted',
text = 'Demoted',
aliases = {'fail', 'failed', 'remove', 'removed'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
}
},
validStatuses = false
},
PR = {
id = 'PR',
name = 'Peer review',
results = {
reviewed = {
id = 'reviewed',
text = 'Reviewed',
},
['not reviewed'] = {
id = 'not reviewed',
text = 'Not reviewed',
}
},
validStatuses = false,
categories = {'Old requests for peer review'}
},
WPR = {
id = 'WPR',
name = function (articleHistoryObj, actionObj)
local names = {
approved = 'WikiProject approved revision',
copyedited = 'Guild of Copy Editors',
collaboration = 'WikiProject collaboration',
maindate = "Today's featured article"
}
local result = actionObj.resultId
return result and names[result] or 'WikiProject peer review'
end,
results = {
approved = {
id = 'approved',
text = function(articleHistoryObj, actionObj)
if actionObj.oldid then
local url = mw.uri.fullUrl(
articleHistoryObj.currentTitle.prefixedText,
{diff = 'cur', oldid = actionObj.oldid}
)
return string.format(
'[%s %s]',
tostring(url),
'Diff to current version'
)
else
error(string.format(
"No oldid detected for the approved version; " ..
"please set the 'action%doldid' parameter " ..
"or give the 'action%dresult' parameter a " ..
"different value.",
actionObj.paramNum,
actionObj.paramNum
))
end
end,
aliases = {'approved version'}
},
copyedited = {
id = 'copyedited',
text = 'Copyedited',
aliases = {'copyedit', 'proofread'}
},
maindate = {
id = 'maindate',
text = 'Main Page'
},
collaborated = {
id = 'collaborated',
text = 'Collaborated',
aliases = {'cotw', 'collaboration'}
},
reviewed = {
id = 'reviewed',
text = 'Reviewed',
aliases = {''} -- This is "Reviewed" if the reason is blank, but not absent.
}
},
validStatuses = false
},
WAR = {
id = 'WAR',
name = 'WikiProject A-class review',
results = {
approved = {
id = 'approved',
text = 'Approved',
aliases = {'pass', 'passed'}
},
['not approved'] = {
id = 'not approved',
text = 'Not approved',
aliases = {'fail', 'failed', 'not reviewed'}
},
reviewed = {
id = 'reviewed',
text = 'Reviewed',
aliases = {''}
},
kept = {
id = 'kept',
text = 'Kept',
aliases = {'keep'}
},
demoted = {
id = 'demoted',
text = 'Demoted',
aliases = {'demote'}
},
},
validStatuses = false
},
AFD = {
id = 'AFD',
name = 'Articles for deletion',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'withdrawn', 'keep'}
},
deleted = {
id = 'deleted',
text = 'Deleted',
aliases = {'delete'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
},
['no consensus'] = {
id = 'no consensus',
text = 'No consensus'
},
['speedily kept'] = {
id = 'speedily kept',
text = 'Speedily kept',
aliases = {'speedy keep'}
},
['speedily deleted'] ={
id = 'speedily deleted',
text = 'Speedily deleted',
aliases = {'speedy delete'}
},
redirected = {
id = 'redirected',
text = 'Redirected',
aliases = {'redirect'}
},
renamed = {
id = 'renamed',
text = 'Renamed',
aliases = {'rename', 'move', 'moved'}
}
},
validStatuses = false
},
MFD = {
id = 'MFD',
name = 'Miscellanea for deletion',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'withdrawn', 'keep'}
},
deleted = {
id = 'deleted',
text = 'Deleted',
aliases = {'delete'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
},
['no consensus'] = {
id = 'no consensus',
text = 'No consensus'
},
['speedily kept'] = {
id = 'speedily kept',
text = 'Speedily kept',
aliases = {'speedy keep'}
},
['speedily deleted'] = {
id = 'speedily deleted',
text = 'Speedily deleted',
aliases = {'speedy delete'}
},
redirected = {
id = 'redirected',
text = 'Redirected',
aliases = {'redirect'}
},
renamed = {
id = 'renamed',
text = 'Renamed',
aliases = {'rename', 'move', 'moved'}
}
},
validStatuses = false
},
TFD = {
id = 'TFD',
name = 'Templates for discussion',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'withdrawn', 'keep'}
},
deleted = {
id = 'deleted',
text = 'Deleted',
aliases = {'delete'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
},
['no consensus'] = {
id = 'no consensus',
text = 'No consensus'
},
['speedily kept'] = {
id = 'speedily kept',
text = 'Speedily kept',
aliases = {'speedy keep'}
},
['speedily deleted'] = {
id = 'speedily deleted',
text = 'Speedily deleted',
aliases = {'speedy delete'}
},
redirected = {
text = 'Redirected',
aliases = {'redirect'}
},
renamed = {
text = 'Renamed',
aliases = {'rename', 'move', 'moved'}
}
},
validStatuses = false
},
CSD = {
id = 'CSD',
name = 'Candidate for speedy deletion',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'withdrawn', 'keep'}
},
deleted = {
id = 'deleted',
text = 'Deleted',
aliases = {'delete'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
},
['no consensus'] = {
id = 'no consensus',
text = 'No consensus'
},
['speedily kept'] = {
id = 'speedily kept',
text = 'Speedily kept',
aliases = {'speedy keep'}
},
['speedily deleted'] = {
id = 'speedily deleted',
text = 'Speedily deleted',
aliases = {'speedy delete'}
},
redirected = {
id = 'redirected',
text = 'Redirected',
aliases = {'redirect'}
},
renamed = {
id = 'renamed',
text = 'Renamed',
aliases = {'rename', 'move', 'moved'}
}
},
validStatuses = false
},
PROD = {
id = 'PROD',
name = 'Proposed deletion',
results = {
kept = {
id = 'kept',
text = 'Kept',
aliases = {'withdrawn', 'keep'}
},
deleted = {
id = 'deleted',
text = 'Deleted',
aliases = {'delete'}
},
merged = {
id = 'merged',
text = 'Merged',
aliases = {'merge'}
},
['no consensus'] = {
id = 'no consensus',
text = 'No consensus'
},
['speedily kept'] = {
id = 'no consensus',
text = 'Speedily kept',
aliases = {'speedy keep'}
},
['speedily deleted'] = {
id = 'speedily deleted',
text = 'Speedily deleted',
aliases = {'speedy delete'}
},
redirected = {
id = 'redirected',
text = 'Redirected',
aliases = {'redirect'}
},
renamed = {
id = 'renamed',
text = 'Renamed',
aliases = {'rename', 'move', 'moved'}
}
},
validStatuses = false
},
DRV = {
id = 'DRV',
name = 'Deletion review',
results = {
endorsed = {
id = 'endorsed',
text = 'Endorsed',
aliases = {'endorse'}
},
relisted = {
id = 'relisted',
text = 'Relisted',
aliases = {'relist'}
},
overturned = {
id = 'overturned',
text = 'Overturned',
aliases = {'overturn'}
},
['no consensus'] = {
id = 'no consensus',
text = 'No consensus'
}
},
validStatuses = false
}
},
-------------------------------------------------------------------------------
-- Statuses
-- Configuration for possible current statuses of the article.
-------------------------------------------------------------------------------
-- The statuses table contains valid statuses.
-- Each status can have the following fields:
--
-- id: the main ID for the status.
-- aliases: a table of ID aliases that can be used to access the config table.
-- icon: The status icon.
-- iconSize: The icon size, including "px" suffix. The default is defined in
-- defaultStatusIconSize.
-- iconSmallSize: The icon size if we are outputting a small template. The
-- default is defined in defaultSmallStatusIconSize.
-- text: The status text. This may be a string or a function. If it is a
-- function, it takes an article history object as input, and should return
-- the text string. If it is a string, it can have the following parameters:
-- $1 - The full page name of the article or subject page
-- $2 - The page name without the namespace name
-- categories: An array of categories used by the status.
statuses = {
FA = {
id = 'FA',
name = 'Featured article',
icon = 'Featured article star.svg',
text = function (articleHistoryObj)
local articlePage = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
local actions = articleHistoryObj:getActionObjects()
local link
for i = #actions, 1, -1 do
local actionObj = actions[i]
if actionObj.id == 'FAC' then
link = actionObj.link
break
end
end
link = link or 'Wikipedia:Featured article candidates/' .. articlePage
local text = "'''%s''' is a [[Wikipedia:Featured articles|featured article]]; " ..
"it (or a previous version of it) has been '''''[[%s|identified]]''''' " ..
"as one of the best articles produced by the [[Wikipedia:Wikipedians|Wikipedia community]]. " ..
"Even so, if you can update or improve it, [[Wikipedia:Be bold|please do so]]."
return string.format(text, articlePage, link)
end,
categories = {'Wikipedia featured articles'}
},
FFA = {
id = 'FFA',
name = 'Former featured article',
icon = 'Featured article star - cross.svg',
iconSize = '48px',
text = "'''$1''' is a [[Wikipedia:Former featured articles|former featured article]]. " ..
"Please see the links under Article milestones below for its original nomination page " ..
"(for older articles, check [[Wikipedia:Featured article candidates/Archived nominations/Index|the nomination archive]]) " ..
"and why it was removed.",
categories = {'Wikipedia former featured articles'}
},
FFAC = {
id = 'FFAC',
name = 'Former featured article candidate',
aliases = {'FACFAILED'},
icon = 'Cscr-former.svg',
text = "'''$1''' is a former [[Wikipedia:Featured article candidates|featured article candidate]]. " ..
"Please view the links under Article milestones below to see why " ..
"the nomination failed. For older candidates, please check the " ..
"[[Wikipedia:Featured article candidates/Archived nominations/Index|archive]]."
},
FL = {
id = 'FL',
name = 'Featured list',
icon = 'Featured article star.svg',
iconSize = '48px',
text = function (articleHistoryObj)
local articlePage = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
local actions = articleHistoryObj:getActionObjects()
local link
for i = #actions, 1, -1 do
local actionObj = actions[i]
if actionObj.id == 'FLC' then
link = actionObj.link
break
end
end
link = link or 'Wikipedia:Featured list candidates/' .. articlePage
local text = "'''%s''' is a [[Wikipedia:Featured lists|featured list]], " ..
"which means it has been '''''[[%s|identified]]''''' as one of the best " ..
"[[Wikipedia:Lists|lists]] produced by the [[Wikipedia:Wikipedians|Wikipedia community]]. " ..
"If you can update or improve it, [[Wikipedia:Be bold|please do so]]."
return string.format(text, articlePage, link)
end,
categories = {'Wikipedia featured lists'}
},
FFL = {
id = 'FFL',
name = 'Former featured list',
icon = 'Cscr-featured-strike.svg',
text = "'''$1''' is a [[Wikipedia:Former featured lists|former featured list]]. " ..
"Please see the links under Article milestones below for its original " ..
"nomination page and why it was removed. If it has improved again to " ..
"[[Wikipedia:Featured list criteria|featured list standard]], you may " ..
"[[Wikipedia:Featured list candidates|renominate]] the article to " ..
"become a [[Wikipedia:Featured list|featured list]]."
},
FFLC = {
id = 'FFLC',
name = 'Former featured list candidate',
icon = 'Cscr-former.svg',
iconCaption = 'Former FLC',
text = "'''$1''' is a former [[Wikipedia:Featured list candidates|featured list candidate]]. " ..
"Please view the link under Article milestones below to see why the nomination failed. " ..
"Once the objections have been addressed you may " ..
"[[Wikipedia:Featured list candidates#Resubmitting nominations|resubmit]] " ..
"the article for featured list status.",
categories = {'Wikipedia featured list candidates (contested)'}
},
['FFA/GA'] = {
id = 'FFA/GA',
name = 'Former featured article, current good article',
isDouble = true,
statuses = {'FFA', 'GA'}
},
GA = {
id = 'GA',
name = 'Good article',
icon = 'Symbol support vote.svg',
iconSize = '40px',
text = function (articleHistoryObj)
local link, display = getGoodArticleTopicLink(articleHistoryObj.args.topic)
local articlePage = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
local text = "'''%s''' has been listed as one of the '''''[[%s|%s]]''''' " ..
"under the [[Wikipedia:Good article criteria|good article criteria]]. " ..
"If you can improve it further, [[Wikipedia:Be bold|please do so]]. " ..
"<small>''If it no longer meets these criteria, you can " ..
"'''[[Wikipedia:Good article reassessment|reassess]]''' it''.</small>"
return string.format(text, articlePage, link, display)
end,
categories = function (articleHistoryObj)
local ret = {}
local title = articleHistoryObj.currentTitle
if title.namespace == 1 then
ret[#ret + 1] = Category.new('Wikipedia good articles')
ret[#ret + 1] = Category.new('Wikipedia CD Selection-GAs')
ret[#ret + 1] = Category.new('GA-Class Good articles')
local topic = getGoodArticleTopic(articleHistoryObj.args.topic)
if topic then
ret[#ret + 1] = Category.new(
topic .. ' good articles',
title.text
)
else
ret[#ret + 1] = Category.new(
'Good articles without topic parameter',
title.text
)
end
end
return ret
end
},
FGAN = {
id = 'FGAN',
name = 'Former good article nominee',
aliases = {'FAILEDGA'},
icon = 'Symbol unsupport vote.svg',
text = function (articleHistoryObj)
local articlePage = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
local link, display = getGoodArticleTopicLink(articleHistoryObj.args.topic)
local text = "'''%s''' was a '''''[[%s|%s]]''''' nominee, " ..
"but did not meet the [[Wikipedia:Good article criteria|good article criteria]] " ..
"at the time. There are suggestions below for improving the article. " ..
"Once these issues have been addressed, the article can be " ..
"[[Wikipedia:Good article nominations|renominated]]. " ..
"Editors may also seek a '''[[Wikipedia:Good article reassessment|reassessment]]''' " ..
"of the decision if they believe there was a mistake."
return string.format(text, articlePage, link, display)
end,
categories = {'Former good article nominees'}
},
DGA = {
id = 'DGA',
name = 'Former good article',
aliases = {'DELISTEDGA'},
icon = 'Symbol unsupport vote.svg',
text = function (articleHistoryObj)
local articlePage = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
local link, display = getGoodArticleTopicLink(articleHistoryObj.args.topic)
local text = "'''%s''' was one of the '''''[[%s|%s]]''''', " ..
"but it has been removed from the list. " ..
"There are suggestions below for improving the article to meet the " ..
"[[Wikipedia:Good article criteria|good article criteria]]. " ..
"Once these issues have been addressed, the article can be " ..
"[[Wikipedia:Good article nominations|renominated]]. " ..
"Editors may also seek a '''[[Wikipedia:Good article reassessment|reassessment]]''' " ..
"of the decision if they believe there was a mistake."
return string.format(text, articlePage, link, display)
end,
categories = {'Delisted good articles'}
},
FFT = {
id = 'FFT',
name = 'Part of former featured topic',
icon = 'Cscr-featured-strike.svg',
iconCaption = 'Former featured topic',
text = "This article is part of a " ..
"''[[Wikipedia:Former featured topics|former featured topic]]'' series. " ..
"If it has improved again to " ..
"[[Wikipedia:Featured topic criteria|featured topic standard]], " ..
"you may [[Wikipedia:Featured topic candidates|renominate]] " ..
"the topic to become a [[Wikipedia:Featured topic|featured topic]]."
},
FFTC = {
id = 'FFTC',
name = 'Former featured topic candidate',
icon = 'Cscr-former.svg',
text = "This article is part of a ''former'' " ..
"[[Wikipedia:Featured topic candidates|featured topic candidate]]. " ..
"Please view the links under Article milestones below to see why " ..
"the nomination failed."
},
FPO = {
id = 'FPO',
name = 'Featured portal',
icon = 'Cscr-former.svg',
text = "The '''$2 Portal''' is a [[Wikipedia:Featured portals|featured portal]], " ..
"which means it has been " ..
"'''''[[Wikipedia:Featured portal candidates/Portal:$2|identified]]''''' " ..
"as one of the best portals on [[Wikipedia]]. " ..
"If you see a way this portal can be updated or improved without " ..
"compromising previous work, please feel free to contribute.",
categories = function (articleHistoryObj)
return {Category.new(
'Wikipedia featured portals',
articleHistoryObj.currentTitle.text
)}
end
},
FFPO = {
id = 'FFPO',
name = 'Former featured portal',
icon = 'Featured article star - cross.svg',
text = "This portal is a [[Wikipedia:Former featured portals|former featured portal]]. " ..
"Please see the links under Portal milestones below for its " ..
"original nomination page and why it was removed.",
categories = function (articleHistoryObj)
return {Category.new(
'Wikipedia former featured portals',
articleHistoryObj.currentTitle.text
)}
end
},
FFPOC = {
id = 'FFPOC',
name = 'Former featured portal candidate',
icon = 'Cscr-former.svg',
text = "This portal is a '''''former''''' " ..
"[[Wikipedia:Featured portal candidates|featured portal candidate]]. " ..
"Please see the links under Portal milestones below for its " ..
"original nomination page and why the nomination failed.",
categories = function (articleHistoryObj)
return {Category.new(
'Wikipedia featured portal candidates (contested)',
articleHistoryObj.currentTitle.text
)}
end
},
PR = {
-- Peer review is a valid current status, but it doesn't trigger a
-- header row.
id = 'PR',
name = 'Peer reviewed'
}
},
-- The following are statuses that
nullStatuses = {
PR = true
},
invalidStatuses = {
FAC = {
id = 'FAC'
},
FAR = {
id = 'FAR'
},
STUB = {
id = 'STUB',
aliases = {'START', 'B', 'A'}
},
NA = {
id = 'NA',
aliases = {'PR', ''}
},
},
getStatusIdFunction = function (articleHistoryObj)
-- Get the status ID. The status code is the code passed in from the
-- arguments, and the ID is the value contained in the config.
local statuses = articleHistoryObj.cfg.statuses
local statusCode = articleHistoryObj.args.currentstatus
local statusId = articleHistoryObj:getStatusIdForCode(statusCode)
-- Check for former featured articles.
if statusId ~= 'FA'
and statusId ~= 'FL'
and statusId ~= 'FFA'
and statusId ~= 'FFL'
and statusId ~= 'FFA/GA'
then
local ffaObj
local actions = articleHistoryObj:getActionObjects()
for i = #actions, 1, -1 do
local actionObj = actions[i]
if actionObj.id == 'FAR' and actionObj.resultId == 'demoted' then
ffaObj = actionObj
break
end
end
if ffaObj then
if not statusId then
-- @TODO: Error
elseif statusId == 'GA' then
statusId = 'FFA/GA'
elseif statusId ~= 'FFA' then
-- @TODO: Error -
end
end
end
return statusId
end,
-------------------------------------------------------------------------------
-- Notices
-------------------------------------------------------------------------------
notices = {
{
param = 'ftname'
}
},
-------------------------------------------------------------------------------
-- Collapsible notices
-------------------------------------------------------------------------------
collapsibleNotices = {
},
-------------------------------------------------------------------------------
-- Parameters
-------------------------------------------------------------------------------
-- The parameter values used to generate the page actions. These are used as
-- Lua patterns, so any of the magic characters *+-.^$%[] should be escaped
-- with a preceding % symbol.
actionParamPrefix = 'action',
actionParamSuffixes = {
[''] = 'code',
date = 'date',
link = 'link',
result = 'resultCode',
oldid = 'oldid'
},
-------------------------------------------------------------------------------
-- Other settings
-------------------------------------------------------------------------------
-- If this number or fewer of collapsible rows are present (including actions
-- and collapsible notices) they will not be collapsed. If this is set to the
-- string "all", all rows will always be visible. Otherwise, the input must be
-- a number. The default is three rows.
uncollapsedRows = 3,
-- The default size for icons. The default is 30px.
defaultIconSize = '30px',
-- The default size for icons for small templates. The default is 15px.
defaultSmallIconSize = '15px',
-- The default size for status icons. The default is 50px.
defaultStatusIconSize = '50px',
-- The default size for status icons for small templates. The default is 30px.
defaultSmallStatusIconSize = '30px',
-- The default size for notice bar icons. The default is 15px.
defaultNoticeBarIconSize = '15px',
-------------------------------------------------------------------------------
-- Messages
-------------------------------------------------------------------------------
msg = {
-- The heading for the collapsible table of actions if we are in the main
-- namespace or the talk namespace.
['milestones-header'] = 'Article milestones',
-- The heading for the collapsible table of actions if we are in a different
-- namespace.
-- $1 - the subject namespace name.
['milestones-header-other-ns'] = '$1 milestones',
-- The milestones date header.
['milestones-date-header'] = 'Date',
-- The milestones process header.
['milestones-process-header'] = 'Process',
-- The milestones result header.
['milestones-result-header'] = 'Result',
-- The text displayed when the current status is unknown.
['status-unknown'] = '?',
-- The format to display the action dates in. The syntax is the same as the
-- #time parser function.
['action-date-format'] = 'F j, Y',
-- The category to use if any errors are detected.
['error-category'] = 'ArticleHistory errors'
}
-------------------------------------------------------------------------------
-- CONFIG TABLE END
-------------------------------------------------------------------------------
}