Changes

Jump to: navigation, search

Module:Protection banner/config

339 bytes removed, 11:10, 3 July 2014
convert the following parameters to use functions inside the config: DISPUTEBLURB, DISPUTESECTION, OFFICEBLURB, RESETBLURB
-- display message "current-version-edit-display" or
-- "current-version-move-display".
--
-- ${DISPUTEBLURB} - a blurb about editing disputes, using the INTROBLURB
-- parameter and the DISPUTESECTION parameter. E.g. "This page is protected
-- from editing until disputes have been resolved."
--
-- ${DISPUTESECTION} - if a section link is passed to the module, this is
-- a link to that section with the display message
-- "dispute-section-link-display". Otherwise it is just the display
-- message with no link.
--
-- ${EDITREQUEST} - a link to create an edit request for the current page.
-- is set. E.g. "Editing of this page by new or unregistered users is currently
-- disabled until dd Month YYYY"
--
-- ${OFFICEBLURB} - a blurb about pages protected by the WMF office. If the
-- protection date has been specified, includes a sentence saying when the page
-- was protected.
--
-- ${PAGETYPE} - the type of the page, e.g. "article" or "template".
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,
-- depending on the protection action.
--
-- ${RESETBLURB} - a blurb for pages using {{pp-reset}}. If the protection
-- date is specified, this includes information about when the page was
-- protected.
--
-- ${TALKPAGE} - a link to the talk page. If a section is specified, links
dispute = {
description = 'For pages protected due to editing disputes.',
text = function (protectionObj, blurbData) -- Find the value of "disputes". local display = 'disputes' local disputes if blurbData.section then disputes = string.format( '[[%s:%s#%s|%s]]', mw.site.namespaces[protectionObj.title.namespace].talk.name, protectionObj.title.text, blurbData.section, display ) else disputes = display end  -- Make the blurb, depending on the expiry. local msg if type(protectionObj.expiry) == 'number' then msg = '${INTROBLURB} or until editing %s have been resolved.' else msg = '${DISPUTEBLURBINTROBLURB}until editing %s have been resolved.' end return string.format(msg, disputes) end,
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
office = {
description = 'For pages protected by the Wikimedia Foundation.',
text = function (protectionDate, blurbData) local ret = 'This ${OFFICEBLURBPAGETYPE}is currently under the' .. ' scrutiny of the' .. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]' .. ' and is protected.' if protectiobObj.protectionDate then ret = ret .. ' It has been protected since ${PROTECTIONDATE}.' end return ret end,
explanation = "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not remove protection from this"
image = 'Padlock-black.svg',
},
--------------------------------------------------------------------------------
-- Reset blurb
--------------------------------------------------------------------------------
 
['reset-blurb-protectiondate'] = 'On ${PROTECTIONDATE} this article was'
.. ' reduced to a simplified, "bare bones" version so that it may be'
.. ' completely rewritten to ensure it meets the policies of'
.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].',
['reset-blurb-noprotectiondate'] = 'This article has been reduced to a'
.. ' simplified, "bare bones" version so that it may be completely'
.. ' rewritten to ensure it meets the policies of'
.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].',
 
reset = {
description = 'For pages protected by the Wikimedia Foundation and'
.. ' "reset" to a bare-bones version.',
text = function (protectionObj, blurbData) local ret = '' if protectionObj.protectionDate then ret = ret .. 'On ${RESETBLURBPROTECTIONDATE}this article was' else ret = ret .. 'This article has been' end ret = ret .. 'reduced to a' .. ' simplified, "bare bones" version so that it may be completely' .. ' rewritten to ensure it meets the policies of' .. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].'
.. ' Standard Wikipedia policies will apply to its rewriting—which'
.. ' will eventually be open to all editors—and will be strictly'
.. " same date.\n\n'''Administrators may not override this action"
.. ' without approval from someone from the [[WP:OFFICE|Office]].'
.. " No editor may remove this notice.'''" return ret end,
explanation = "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not remove protection from this"
.. ' page protection#Current requests for reduction in protection level'
.. '|ask]] for it to be unprotected.',
 
--------------------------------------------------------------------------------
-- Dispute blurb
--------------------------------------------------------------------------------
 
['dispute-blurb-expiry'] = '${INTROBLURB} or until editing ${DISPUTESECTION}'
.. ' have been resolved.',
 
['dispute-blurb-noexpiry'] = '${INTROBLURB} until editing ${DISPUTESECTION}'
.. ' have been resolved.',
 
['dispute-section-link-display'] = 'disputes',
--------------------------------------------------------------------------------
['edit-request-full-display'] = 'submit a request',
['edit-request-semi-display'] = 'request an edit',
 
--------------------------------------------------------------------------------
-- Office blurb
--------------------------------------------------------------------------------
 
['office-blurb-protectiondate'] = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' and is protected. It has been protected since ${PROTECTIONDATE}.',
 
['office-blurb-noprotectiondate'] = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' and is protected.',
 
--------------------------------------------------------------------------------
-- Reset blurb
--------------------------------------------------------------------------------
 
['reset-blurb-protectiondate'] = 'On ${PROTECTIONDATE} this article was'
.. ' reduced to a simplified, "bare bones" version so that it may be'
.. ' completely rewritten to ensure it meets the policies of'
.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].',
['reset-blurb-noprotectiondate'] = 'This article has been reduced to a'
.. ' simplified, "bare bones" version so that it may be completely'
.. ' rewritten to ensure it meets the policies of'
.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].',
--------------------------------------------------------------------------------
Anonymous user

Navigation menu