Module:Protection banner/config: Difference between revisions

build the whole config all at once, and combine cfg and msg
(construct msg all at once)
(build the whole config all at once, and combine cfg and msg)
Line 1: Line 1:
-- This module provides configuration data for [[Module:Protection banner]].
-- This module provides configuration data for [[Module:Protection banner]].


local cfg = {}
return {


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Line 89: Line 89:
-- specific banner config.
-- specific banner config.


cfg.masterBanner = {
masterBanner = {
text = '${INTROBLURB}.',
text = '${INTROBLURB}.',
explanation = '${EXPLANATIONBLURB}',
explanation = '${EXPLANATIONBLURB}',
Line 95: Line 95:
link = '${IMAGELINK}',
link = '${IMAGELINK}',
alt = 'Page ${PROTECTIONLEVEL}'
alt = 'Page ${PROTECTIONLEVEL}'
}
},


cfg.defaultBanners = {
defaultBanners = {
edit = {},
edit = {},
move = {},
move = {},
create = {},
create = {},
autoreview = {}
autoreview = {
}
autoconfirmed = {
 
alt = 'Page protected with pending changes level 1',
cfg.defaultBanners.autoreview.autoconfirmed = {
tooltip = 'All edits by unregistered and new users are subject to review',
alt = 'Page protected with pending changes level 1',
image = 'Padlock-silver-light.svg'
tooltip = 'All edits by unregistered and new users are subject to review',
},
image = 'Padlock-silver-light.svg'
default = {
}
alt = 'Page protected with pending changes level 2',
 
tooltip = 'All edits by users who are not reviewers or administrators are'
cfg.defaultBanners.autoreview.default = {
.. ' subject to review',
alt = 'Page protected with pending changes level 2',
}
tooltip = 'All edits by users who are not reviewers or administrators are'
}
.. ' subject to review',
},
}


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Line 120: Line 119:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------


cfg.banners = {
banners = {
edit = {},
edit = {
move = {},
blp = {
text = '${INTROBLURB} to promote compliance with'
.. ' [[Wikipedia:Biographies of living persons'
.. "|Wikipedia's policy on the biographies"
.. ' of living people]].',
tooltip = '${TOOLTIPBLURB} to promote compliance with the policy on biographies of'
.. ' living people',
},
dispute = {
text = '${DISPUTEBLURB}',
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
tooltip = 'due to editing disputes',
},
template = {
text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},'
.. ' as it is [[Wikipedia:High-risk templates|high-risk]].',
explanation = 'Please discuss any changes on the ${TALKPAGE}; you may'
.. ' ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] or'
.. ' [[Wikipedia:Template editor|template editor]] to make an edit if'
.. ' it is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by'
.. ' [[Wikipedia:Consensus|consensus]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}'
.. ' to prevent vandalism',
alt = 'Permanently protected ${PAGETYPE}',
},
office = {
text = '${OFFICEBLURB}',
explanation = "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not rem