Módulo:Protection banner/config/Testes
Este módulo pode ter sua documentação deficiente. Por favor, documente-o ou melhore suas explicações caso o saiba usar ou tenha conhecimentos para tal. |
Esta é a página de testes de módulos de Módulo:Protection banner/config (dif). |
Este módulo está na categoria sujeitos a proteção de página. Ele é um módulo de alta visibilidade em uso por um grande número de páginas, ou é transcluído muito frequentemente. Por causa do vandalismo ou erros que podem afectar muitas páginas, e mesmo edições triviais podem causar cargas substanciais nos servidores, ele está protegido de editar. |
Descrição[editar código-fonte]
Este Módulo implementa a predefinição . Por favor consulte a predefinição para mais instruções.
Uso[editar código-fonte]
Outra documentação:
A documentação acima é transcluída de Módulo:Protection banner/config/Testes/doc. (editar | histórico) Editores podem experimentar nas páginas de teste (editar | dif) e de exemplos para testes (criar) deste módulo. Subpáginas deste módulo. |
-- This module provides configuration data for [[Module:Protection banner]].
return {
--------------------------------------------------------------------------------
--
-- BANNER DATA
--
--------------------------------------------------------------------------------
--[[
-- Banner data consiste de seis campos:
-- * text - O texto principal da proteção que se mostra no topo da proteção
-- banners.
-- * explanation - O texto que se mostra por baixo do texto principal de
-- proteção, usado para explicar detalhes da proteção.
-- * tooltip - o texto tooltip que se mostra quando se move o rato sobre
-- o pequeno icone do cadeado.
-- * link - a página em que o pequeno ícone do cadeado liga para.
-- * alt - O texto alternativo para o pequeno ícone do cadeado. Isso também
-- é usado como texto de dica de ferramenta text para os grandes banners
-- de proteção.
-- * image - a imagem do cadeado utilizada em ambas as bandeiras de proteção
-- e pequeno icone de cadeado.
--
-- O módulo verifica em três tabelas separadas para encontrar um valor para
-- cada campo. Primeiro, verifica a tabela de banners, que tem valores
-- específicos para o motivo para a página estar protegida. Em seguida,
-- o módulo verifica os padrões tabela, que tem valores específicos para
-- cada nível de proteção. finalmente, o módulo verifica a tabela masterBanner,
-- que contém modelo9s com dados para proteção a serem usados se nenhum dado
-- tiver sido encontrado nas duas tabelas anteriores.
--
-- Os valores nos dados do banner podem levar parâmetros. Estes são
-- especificados utilizando ${TEXTOCOMOESTE} (um sinal de dólar que precede
-- um nome de parâmetro incluído em chaves).
--
-- Parâmetros disponíveis:
--
-- ${CURRENTVERSION} - um link para o histórico da página ou o log de
-- movimento, com a mensagem mostrada "current-version-edit-display" ou
-- "current-version-move-display".
--
-- ${EDITREQUEST} - um link para criar uma solicitação de edição para a
-- página atual.
--
-- ${EXPLANATIONBLURB} - uma explicação blurb, e. "Por favor, discuta
-- quaisquer mudanças na página de discussão; você pode enviar uma
-- solicitação para solicitar a um administrador que faça uma edição se
-- for menor ou apoiada por consenso ".
--
-- ${IMAGELINK} - um link para configurar a imagem, dependendo da proteção
-- nível de ação e proteção.
--
-- ${INTROBLURB} - o parâmetro PROTECTIONBLURB, mais o prazo de caducidade
-- se expirar está definido. Por exemplo. "A edição desta página por usuários
-- novos ou não registados está atualmente desativado até dd Mês AAAA.."
--
-- ${INTROFRAGMENT} - o mesmo que ${INTROBLURB}, mas sem pontuação final
-- para que ele possa ser usado em sentenças de execução.
--
-- ${PAGETYPE} - o tipo da página, e. "artigo" ou "predefinição".
-- Definido na tabela cfg.pagetypes.
--
-- ${PROTECTIONBLURB} - uma explicação que explica o nível de proteção
-- da página, e.g.
-- "A edição desta página por usuários novos ou não registados está
-- atualmente desativada"
--
-- ${PROTECTIONDATE} - a data de proteção, se for fornecida à
-- predefinição.
--
-- ${PROTECTIONLEVEL} - o nível de proteção, e. "totalmente protegido"
-- ou "semiprotegido".
--
-- ${PROTECTIONLOG} - um link para o log de proteção ou o log de
-- alterações pendentes, dependendo da ação de proteção.
--
-- ${TALKPAGE} - um link para a página de discussão. Se uma seção for
-- especificada, links diretos para essa seção de página de discussão.
--
-- ${TOOLTIPBLURB} - usa os parâmetros PAGETYPE, PROTECTIONTYPE e EXPIRY
-- para criar um blurb como "Este modelo é semiprotegido", ou "Este artigo
-- é protegido de mover até DD mês AAAA ".
--
-- ${VANDAL} - links para o nome de usuário especificado (ou o nome da
-- página raiz) usando Módulo:Vandal-m.
--
-- Funções
--
-- Para usuários avançados, é possível usar funções Lua em vez de strings
-- nas tabelas de configuração do banner. O uso de funções oferece
-- flexibilidade que não é possível apenas usando parâmetros. As funções
-- tomam dois argumentos, o objeto de proteção e os argumentos do modelo,
-- e eles devem exibir uma string.
--
-- Por exemplo:
--
-- text = function (protectionObj, args)
-- if protectionObj.level == 'autoconfirmed' then
-- return 'foo'
-- else
-- return 'bar'
-- end
-- end
--
-- Algumas propriedades e métodos do objeto de proteção que podem ser úteis:
-- protectionObj.action - A ação de proteção
-- protectionObj.level - O nível de proteção
-- protectionObj.reason - A razão de proteção
-- protectionObj.expiry - a expiração. Nil se desativado, a string "indef"
-- se configurado para indefinido, e o tempo de proteção em tempo de unix
-- se temporário.
-- protectionObj.protectionDate - a data de proteção no tempo de unix,
-- ou nil se não especificado.
-- protectionObj.bannerConfig - a configuração do banner encontrada pelo
-- módulo. Cuidado de editar o campo de configuração utilizado pela função,
-- pois poderia criar um loop infinito.
-- protectionObj:isProtected - retorna um booleano mostrando se a página
-- é protegida.
-- protectionObj:isTemporary - retorna um booleano que mostra se o prazo
-- de validade é temporário.
-- protectionObj:isIncorrect - retorna um booleano que mostra se a
-- proteção da predefinição está incorreto.
--]]
-- Os dados do banner principal, usados se nenhum valor tiver sido encontrado
-- em banners ou DefaultBanners.
masterBanner = {
text = '${INTROBLURB}',
explanation = '${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPBLURB}',
link = '${IMAGELINK}',
alt = 'Page ${PROTECTIONLEVEL}'
},
-- Os dados de banner padrão. Isso contém dados de banner para proteção
-- de diferentes níveis.
-- * exigido * - esta tabela precisa editar, mover, autoreview e fazer upload
-- de subtabelas.
defaultBanners = {
edit = {},
move = {},
autoreview = {
autoconfirmed = {
alt = 'Página protegida com alterações pendentes de nível 1',
tooltip = 'Todas as edições por usuários não registrados e novos estão sujeitas a revisão antes de serem visíveis para usuários não registrados',
image = 'Padlock-silver-light.svg'
},
default = {
alt = 'Página protegida com alterações pendentes de nível 2',
tooltip = 'Todas as edições por usuários que não são revisores ou administradores são'
.. ' sujeitas a revisão antes de se tornar visível para usuários não registrados',
image = 'Padlock-orange.svg'
}
},
upload = {}
},
-- Os dados do banner. Isso contém dados de banner por diferentes motivos de
-- proteção. De facto, os motivos especificados nesta tabela controlam quais
-- razões são entradas válidas para o primeiro parâmetro de posição.
--
-- Existe também um campo de "descrição" não padrão que pode ser usado para
-- itens nesta tabela. Esta é uma descrição do motivo de proteção para uso
-- na documentação do módulo.
--
-- * exigido * - esta tabela precisa editar, mover, autoreview e fazer upload
-- de subtabelas.
banners = {
edit = {
blp = {
description = 'Para páginas protegidas para promover o cumprimento da'
.. ' política de [[Wikipédia:Biografias de pessoas vivas'
.. '|biografias de pessoas vivas]]',
text = '${INTROFRAGMENT} para promover a conformidade com'
.. ' [[Wikipédia:Biografias de pessoas vivas'
.. "|política da Wikipédia sobre biografias"
.. ' de pessoas vivas]].',
tooltip = '${TOOLTIPFRAGMENT} para promover a conformidade com a política em'
.. ' biografias de pessoas vivas',
},
dmca = {
description = 'Para páginas protegidas pela Fundação Wikimedia'
.. ' devido a pedidos de remoção da [[Digital Millennium Copyright Act]]',
explanation = function (protectionObj, args)
local ret = 'De acordo com um aviso de proprietário de direitos no âmbito da Digital'
.. ' Millennium Copyright Act (DMCA) sobre algum conteúdo'
.. ' neste artigo, a Wikimedia Foundation atuou sob'
.. ' lei aplicável e retirou e restringiu o conteúdo'
.. ' em questão.'
if args.notice then
ret = ret .. ' Uma cópia da notificação recebida pode ser encontrada aqui: '
.. args.notice .. '.'
end
ret = ret .. ' Para mais informações, incluindo sites que discutem'
.. ' como apresentar um aviso de disputa'
.. " [[:en:Wikipedia:Office actions|Wikipedia:Office actions]] e a ${TALKPAGE} do artigo."
.. "'''Não remova este modelo do artigo até as"
.. " as restrições sejam retiradas'''."
return ret
end,
image = 'Padlock-black.svg',
},
dispute = {
description = 'Para páginas protegidas devido a guerras de edição',
text = function (protectionObj, args)
-- Find the value of "guerras".
local display = 'guerras'
local disputes
if args.section then
disputes = string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[protectionObj.title.namespace].talk.name,
protectionObj.title.text,
args.section,
display
)
else
disputes = display
end
-- Make the blurb, depending on the expiry.
local msg
if type(protectionObj.expiry) == 'number' then
msg = '${INTROFRAGMENT} ou até as edições %s terem sido resolvidas.'
else
msg = '${INTROFRAGMENT} até edição %s ter sido resolvida.'
end
return string.format(msg, disputes)
end,
explanation = "Esta proteção '''não''' é um endosso da"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPFRAGMENT} devido a guerras de edição',
},
ecp = {
description = 'Para artigos em áreas temáticas autorizadas por'
.. ' [[:en:Wikipedia:Arbitration Committee|ArbCom]] ou'
.. ' atende aos critérios de uso comunitário',
tooltip = 'Esta ${PAGETYPE} é protegido prolongadamente',
alt = '${PAGETYPE} protegida prolongadamente',
},
mainpage = {
description = 'Para páginas protegidas para serem exibidas na [[Página Principal]]',
text = 'Este ficheiro atualmente está'
.. ' [[Wikipédia:Esta página está protegida|protegida]] de'
.. ' editar porque está atualmente ou será exibido em breve'
.. ' na ´página [[Página principal]].',
explanation = 'As imagens na Página Principal são protegidas devido à sua alta'
.. ' visibilidade. Por favor, discuta as mudanças necessárias na ${TALKPAGE}.'
.. '<br /><span style="font-size:90%;">'
.. "'''Administradores:''' Uma vez que esta imagem está definitivamente fora da Página Principal,"
.. ' desprotege este arquivo ou reduza a semi-proteção,'
.. ' como apropriado.</span>',
},
office = {
description = 'Para páginas protegidas pela Fundação Wikimedia',
text = function (protectionObj, args)
local ret = 'Esta ${PAGETYPE} está atualmente sob o'
.. ' escrutínio da'
.. ' [[:en:Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' e está protegida.'
if protectionObj.protectionDate then
ret = ret .. ' foi protegido desde ${PROTECTIONDATE}.'
end
return ret
end,
explanation = "Se você pode editar esta página, discuta primeiro todas as"
.. " mudanças e adições na ${TALKPAGE}. '''Não remova a proteção desta"
.. " a menos que você seja autorizado pela Fundação Wikimedia para fazer"
.. " isso.'''",
image = 'Padlock-black.svg',
},
reset = {
description = 'Para páginas protegidas pela Fundação Wikimedia e'
.. ' "repostas" para uma versão simples',
text = 'Esta ${PAGETYPE} está atualmente sob o'
.. ' escrutínio da'
.. ' [[:en:Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' e está protegida.',
explanation = function (protectionObj, args)
local ret = ''
if protectionObj.protectionDate then
ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was'
else
ret = ret .. 'This ${PAGETYPE} 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'
.. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while'
.. ' it is being rebuilt.\n\n'
.. 'Any insertion of material directly from'
.. ' pre-protection revisions of the ${PAGETYPE} will be removed, as'
.. ' will any material added to the ${PAGETYPE} that is not properly'
.. ' sourced. The associated talk page(s) were also cleared on the'
.. " same date.\n\n"
.. "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not override"
.. " this action, and do not remove protection from this page,"
.. " unless you are authorized by the Wikimedia Foundation"
.. " to do so. No editor may remove this notice.'''"
return ret
end,
image = 'Padlock-black.svg',
},
sock = {
description = 'For pages protected due to'
.. ' [[Wikipedia:Sock puppetry|sock puppetry]]',
text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of'
.. ' [[Wikipedia:Blocking policy|blocked]] or'
.. ' [[Wikipedia:Banning policy|banned users]]'
.. ' from editing it.',
tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from'
.. ' editing it',
},
template = {
description = 'For [[Wikipedia:High-risk templates|high-risk]]'
.. ' templates and Lua modules',
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}',
},
usertalk = {
description = 'For pages protected against disruptive edits by a'
.. ' particular user',
text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,'
.. ' such as abusing the'
.. ' {{[[Template:unblock|unblock]]}} template.',
explanation = 'If you cannot edit this user talk page and you need to'
.. ' make a change or leave a message, you can'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for edits to a protected page'
.. '|request an edit]],'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]],'
.. ' [[Special:Userlogin|log in]],'
.. ' or [[Special:UserLogin/signup|create an account]].',
},
vandalism = {
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism|vandalism]]',
text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].',
explanation = function (protectionObj, args)
local ret = ''
if protectionObj.level == 'sysop' then
ret = ret .. "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. '
end
return ret .. '${EXPLANATIONBLURB}'
end,
tooltip = '${TOOLTIPFRAGMENT} due to vandalism',
}
},
move = {
dispute = {
description = 'For pages protected against page moves due to'
.. ' disputes over the page title',
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
image = 'Padlock-olive.svg'
},
vandalism = {
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism#Page-move vandalism'
.. ' |page-move vandalism]]'
}
},
autoreview = {},
upload = {}
},
--------------------------------------------------------------------------------
--
-- GENERAL DATA TABLES
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Protection blurbs
--------------------------------------------------------------------------------
-- This table produces the protection blurbs available with the
-- ${PROTECTIONBLURB} parameter. It is sorted by protection action and
-- protection level, and is checked by the module in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
protectionBlurbs = {
edit = {
default = 'This ${PAGETYPE} is currently [[Help:Protection|'
.. 'protected]] from editing',
autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access'
.. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered'
.. ' users|unregistered]] users is currently [[Help:Protection|disabled]]',
extendedconfirmed = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} as a result of'
.. ' [[Wikipedia:Arbitration Committee|ArbCom]] enforcement or meets the'
.. ' [[Wikipédia:Página protegida#extended|criteria for community use]]',
},
move = {
default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from [[Help:Moving a page|page moves]]'
},
autoreview = {
autoconfirmed = 'All edits made to this ${PAGETYPE} by'
.. ' [[Wikipedia:User access levels#New users|new]] or'
.. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'
.. ' users are currently'
.. ' [[Wikipedia:Pending changes|subject to review]]',
default = 'All edits made to this ${PAGETYPE} by users who are not'
.. ' [[Wikipedia:Reviewing|reviewers]] or'
.. ' [[Wikipedia:Administrators|administrators]] are currently'
.. ' [[Wikipedia:Pending changes|subject to review]]'
},
upload = {
default = 'Uploading new versions of this ${PAGETYPE} is currently disabled'
}
},
--------------------------------------------------------------------------------
-- Explanation blurbs
--------------------------------------------------------------------------------
-- This table produces the explanation blurbs available with the
-- ${EXPLANATIONBLURB} parameter. It is sorted by protection action,
-- protection level, and whether the page is a talk page or not. If the page is
-- a talk page it will have a talk key of "talk"; otherwise it will have a talk
-- key of "subject". The table is checked in the following order:
-- 1. page's protection action, page's protection level, page's talk key
-- 2. page's protection action, page's protection level, default talk key
-- 3. page's protection action, default protection level, page's talk key
-- 4. page's protection action, default protection level, default talk key
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
explanationBlurbs = {
edit = {
autoconfirmed = {
subject = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'
.. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].',
default = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].',
},
extendedconfirmed = {
default = 'Extended confirmed protection prevents edits from all IP editors'
.. ' and registered users with fewer than 30 days tenure and 500 edits.'
.. ' The [[Wikipédia:Página protegida#extended|policy on community use]]'
.. ' specifies that extended confirmed protection can be applied to combat'
.. ' disruption, given that semi-protection has proven to be ineffective.'
.. ' Please discuss any changes on the ${TALKPAGE}; you may'
.. ' ${EDITREQUEST} to ask for unconversial changes supported by'
.. ' [[Wikipedia:Consensus|consensus]].'
},
default = {
subject = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] 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 may also [[Wikipedia:Requests for'
.. ' page protection#Current requests for reduction in protection level'
.. '|request]] that this page be unprotected.',
default = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' You may [[Wikipedia:Requests for page'
.. ' protection#Current requests for edits to a protected page|request an'
.. ' edit]] to this page, or [[Wikipedia:Requests for'
.. ' page protection#Current requests for reduction in protection level'
.. '|ask]] for it to be unprotected.'
}
},
move = {
default = {
subject = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves on the'
.. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
default = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves at'
.. ' [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.'
}
},
autoreview = {
default = {
reviewer = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Edits to this ${PAGETYPE} will not be visible to readers'
.. ' until they are accepted by a reviewer or an administrator.'
.. ' To avoid the need for your edits to be reviewed, you may'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]]. Experienced editors may also'
.. ' request the [[Wikipedia:Reviewing|reviewer user right]].',
default = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Edits to this ${PAGETYPE} by new and unregistered users'
.. ' will not be visible to readers until they are accepted by'
.. ' a reviewer. To avoid the need for your edits to be'
.. ' reviewed, you may'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].'
},
},
upload = {
default = {
default = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but new versions of the file'
.. ' cannot be uploaded until it is unprotected. You can'
.. ' request that a new version be uploaded by using a'
.. ' [[Wikipedia:Edit requests|protected edit request]], or you'
.. ' can [[Wikipedia:Requests for page protection|request]]'
.. ' that the file be unprotected.'
}
}
},
--------------------------------------------------------------------------------
-- Protection levels
--------------------------------------------------------------------------------
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which
-- produces a short label for different protection levels. It is sorted by
-- protection action and protection level, and is checked in the following
-- order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
protectionLevels = {
edit = {
default = 'protected',
templateeditor = 'template-protected',
extendedconfirmed = 'extended-protected',
autoconfirmed = 'semi-protected',
},
move = {
default = 'move-protected'
},
autoreview = {
},
upload = {
default = 'upload-protected'
}
},
--------------------------------------------------------------------------------
-- Images
--------------------------------------------------------------------------------
-- This table lists different padlock images for each protection action and
-- protection level. It is used if an image is not specified in any of the
-- banner data tables, and if the page does not satisfy the conditions for using
-- the ['image-filename-indef'] image. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
images = {
edit = {
default = 'Padlock.svg',
templateeditor = 'Padlock-pink.svg',
extendedconfirmed = 'Padlock-blue.svg',
autoconfirmed = 'Crystal Clear action lock3.png'
},
move = {
default = 'Padlock-olive.svg',
},
autoreview = {
autoconfirmed = 'Padlock-silver-light.svg',
default = 'Padlock-orange.svg'
},
upload = {
default = 'Padlock-purple.svg'
}
},
-- Pages with a reason specified in this table will show the special "indef"
-- padlock, defined in the 'image-filename-indef' message, if no expiry is set.
indefImageReasons = {
template = true
},
--------------------------------------------------------------------------------
-- Image links
--------------------------------------------------------------------------------
-- This table provides the data for the ${IMAGELINK} parameter, which gets
-- the image link for small padlock icons based on the page's protection action
-- and protection level. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
imageLinks = {
edit = {
default = 'Wikipédia:Página protegida#full',
templateeditor = 'Wikipédia:Página protegida#template',
extendedconfirmed = 'Wikipédia:Página protegida#extended',
autoconfirmed = 'Wikipédia:Página protegida#semi'
},
move = {
default = 'Wikipédia:Página protegida#move'
},
autoreview = {
autoconfirmed = 'Wikipédia:Página protegida#pc1',
reviewer = 'Wikipédia:Página protegida#pc2'
},
upload = {
default = 'Wikipédia:Página protegida#upload'
}
},
--------------------------------------------------------------------------------
-- Padlock indicator names
--------------------------------------------------------------------------------
-- This table provides the "name" attribute for the <indicator> extension tag
-- with which small padlock icons are generated. All indicator tags on a page
-- are displayed in alphabetical order based on this attribute, and with
-- indicator tags with duplicate names, the last tag on the page wins.
-- The attribute is chosen based on the protection action; table keys must be a
-- protection action name or the string "default".
padlockIndicatorNames = {
autoreview = 'pp-autoreview',
default = 'pp-default'
},
--------------------------------------------------------------------------------
-- Protection categories
--------------------------------------------------------------------------------
--[[
-- The protection categories are stored in the protectionCategories table.
-- Keys to this table are made up of the following strings:
--
-- 1. the expiry date
-- 2. the namespace
-- 3. the protection reason (e.g. "dispute" or "vandalism")
-- 4. the protection level (e.g. "sysop" or "autoconfirmed")
-- 5. the action (e.g. "edit" or "move")
--
-- When the module looks up a category in the table, first it will will check to
-- see a key exists that corresponds to all five parameters. For example, a
-- user page semi-protected from vandalism for two weeks would have the key
-- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module
-- changes the first part of the key to "all" and checks the table again. It
-- keeps checking increasingly generic key combinations until it finds the
-- field, or until it reaches the key "all-all-all-all-all".
--
-- The module uses a binary matrix to determine the order in which to search.
-- This is best demonstrated by a table. In this table, the "0" values
-- represent "all", and the "1" values represent the original data (e.g.
-- "indef" or "file" or "vandalism").
--
-- expiry namespace reason level action
-- order
-- 1 1 1 1 1 1
-- 2 0 1 1 1 1
-- 3 1 0 1 1 1
-- 4 0 0 1 1 1
-- 5 1 1 0 1 1
-- 6 0 1 0 1 1
-- 7 1 0 0 1 1
-- 8 0 0 0 1 1
-- 9 1 1 1 0 1
-- 10 0 1 1 0 1
-- 11 1 0 1 0 1
-- 12 0 0 1 0 1
-- 13 1 1 0 0 1
-- 14 0 1 0 0 1
-- 15 1 0 0 0 1
-- 16 0 0 0 0 1
-- 17 1 1 1 1 0
-- 18 0 1 1 1 0
-- 19 1 0 1 1 0
-- 20 0 0 1 1 0
-- 21 1 1 0 1 0
-- 22 0 1 0 1 0
-- 23 1 0 0 1 0
-- 24 0 0 0 1 0
-- 25 1 1 1 0 0
-- 26 0 1 1 0 0
-- 27 1 0 1 0 0
-- 28 0 0 1 0 0
-- 29 1 1 0 0 0
-- 30 0 1 0 0 0
-- 31 1 0 0 0 0
-- 32 0 0 0 0 0
--
-- In this scheme the action has the highest priority, as it is the last
-- to change, and the expiry has the least priority, as it changes the most.
-- The priorities of the expiry, the protection level and the action are
-- fixed, but the priorities of the reason and the namespace can be swapped
-- through the use of the cfg.bannerDataNamespaceHasPriority table.
--]]
-- If the reason specified to the template is listed in this table,
-- namespace data will take priority over reason data in the protectionCategories
-- table.
reasonsWithNamespacePriority = {
vandalism = true,
},
-- The string to use as a namespace key for the protectionCategories table for each
-- namespace number.
categoryNamespaceKeys = {
[ 2] = 'user',
[ 3] = 'user',
[ 4] = 'project',
[ 6] = 'file',
[ 8] = 'mediawiki',
[ 10] = 'predefinição',
[ 12] = 'projeto',
[ 14] = 'categoria',
[100] = 'portal',
[828] = 'módulo',
},
protectionCategories = {
['all|all|all|all|all'] = '!Páginas protegidas: páginas protegidas',
['all|all|office|all|all'] = '!Páginas protegidas: páginas Office protegidas',
['all|all|reset|all|all'] = '!Páginas protegidas: páginas Office protegidas',
['all|all|dmca|all|all'] = '!Páginas protegidas: páginas Office protegidas',
['all|all|mainpage|all|all'] = '!Páginas protegidas: páginas principais totalmente protegidas',
['all|all|all|extendedconfirmed|all'] = '!Páginas protegidas: páginas com restrição de menos de 30-500 edições',
['all|all|ecp|extendedconfirmed|all'] = '!Páginas protegidas: páginas com restrição de menos de 30-500 edições',
['all|template|all|all|edit'] = '!Páginas protegidas: Predefinições totalmente protegidas',
['all|all|all|autoconfirmed|edit'] = '!Páginas protegidas: semipáginas protegidas',
['indef|all|all|autoconfirmed|edit'] = '!Páginas protegidas: semipáginas indefinitivamente protegidas',
['all|all|blp|autoconfirmed|edit'] = '!Páginas protegidas: biografias de pessoas vivas indefinitivamente semiprotegidas',
['temp|all|blp|autoconfirmed|edit'] = '!Páginas protegidas: biografias de pessoas vivas temporarimente semiprotegidas',
['all|all|dispute|autoconfirmed|edit'] = '!Páginas protegidas: páginas semiprotegidas devida a guerras de edição',
['all|all|sock|autoconfirmed|edit'] = '!Páginas protegidas: páginas semiprotegidas de usuários banidos',
['all|all|vandalism|autoconfirmed|edit'] = '!Páginas protegidas: páginas semiprotegidas contra vandalismo',
['all|category|all|autoconfirmed|edit'] = '!Páginas protegidas: categorias semiprotegidas',
['all|file|all|autoconfirmed|edit'] = '!Páginas protegidas: ficheiros semiprotegidas',
['all|portal|all|autoconfirmed|edit'] = '!Páginas protegidas: portais semiprotegidas',
['all|project|all|autoconfirmed|edit'] = '!Páginas protegidas: páginas de projeto semiprotegidas',
['all|talk|all|autoconfirmed|edit'] = '!Páginas protegidas: discussões semiprotegidas',
['all|template|all|autoconfirmed|edit'] = '!Páginas protegidas: Predefinições semiprotegidas',
['all|user|all|autoconfirmed|edit'] = '!Páginas protegidas: páginas de usuário e discussões semiprotegidas',
['all|template|all|templateeditor|edit'] = '!Páginas protegidas: Predefinições protegidas por predefinição',
['all|all|blp|sysop|edit'] = '!Páginas protegidas: biografias de pessoas vivas indefinitivamente protegidas',
['temp|all|blp|sysop|edit'] = '!Páginas protegidas: biografias de pessoas vivas temporariamente protegidas',
['all|all|dispute|sysop|edit'] = '!Páginas protegidas: páginas protegidas devido a guerras de edição',
['all|all|sock|sysop|edit'] = '!Páginas protegidas: páginas protegidas de usuários banidos',
['all|all|vandalism|sysop|edit'] = '!Páginas protegidas: páginas protegidas contra vandalismo',
['all|category|all|sysop|edit'] = '!Páginas protegidas: categorias protegidas',
['all|file|all|sysop|edit'] = '!Páginas protegidas: ficheiro totalmente protegidas',
['all|project|all|sysop|edit'] = '!Páginas protegidas: páginas de projeto totalmente protegidas',
['all|talk|all|sysop|edit'] = '!Páginas protegidas: discussões totalmente protegidas',
['all|template|all|sysop|edit'] = '!Páginas protegidas: Predefinições totalmente protegidas',
['all|user|all|sysop|edit'] = '!Páginas protegidas: protected user and user talk pages',
['all|module|all|all|edit'] = '!Páginas protegidas: Módulos totalmente protegidos',
['all|module|all|templateeditor|edit'] = '!Páginas protegidas: Módulos protegidos-por-predefinição',
['all|module|all|autoconfirmed|edit'] = '!Páginas protegidas: Módulos semiprotegidos',
['all|all|all|sysop|move'] = '!Páginas protegidas: move-páginas protegidas',
['indef|all|all|sysop|move'] = '!Páginas protegidas: indefinitely move-páginas protegidas',
['all|all|dispute|sysop|move'] = '!Páginas protegidas: pages move-protected due to dispute',
['all|all|vandalism|sysop|move'] = '!Páginas protegidas: pages move-protected due to vandalism',
['all|portal|all|sysop|move'] = '!Páginas protegidas: move-protected portals',
['all|portal|all|sysop|move'] = '!Páginas protegidas: move-protected portals',
['all|project|all|sysop|move'] = '!Páginas protegidas: move-protected project pages',
['all|talk|all|sysop|move'] = '!Páginas protegidas: move-protected talk pages',
['all|template|all|sysop|move'] = '!Páginas protegidas: move-protected templates',
['all|user|all|sysop|move'] = '!Páginas protegidas: move-protected user and user talk pages',
['all|all|all|autoconfirmed|autoreview'] = '!Páginas protegidas: pending changes páginas protegidas (level 1)',
['all|all|all|reviewer|autoreview'] = '!Páginas protegidas: pending changes páginas protegidas (level 2)',
['all|file|all|all|upload'] = '!Páginas protegidas: upload-protected files',
},
--------------------------------------------------------------------------------
-- Expiry category config
--------------------------------------------------------------------------------
-- This table configures the expiry category behaviour for each protection
-- action.
-- * If set to true, setting that action will always categorise the page if
-- an expiry parameter is not set.
-- * If set to false, setting that action will never categorise the page.
-- * If set to nil, the module will categorise the page if:
-- 1) an expiry parameter is not set, and
-- 2) a reason is provided, and
-- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck
-- table.
expiryCheckActions = {
edit = nil,
move = false,
autoreview = true,
upload = false
},
reasonsWithoutExpiryCheck = {
blp = true,
template = true,
},
--------------------------------------------------------------------------------
-- Pagetypes
--------------------------------------------------------------------------------
-- This table produces the page types available with the ${PAGETYPE} parameter.
-- Keys are namespace numbers, or the string "default" for the default value.
pagetypes = {
[0] = 'article',
[6] = 'file',
[10] = 'template',
[14] = 'category',
[828] = 'module',
default = 'page'
},
--------------------------------------------------------------------------------
-- Strings marking indefinite protection
--------------------------------------------------------------------------------
-- This table contains values passed to the expiry parameter that mean the page
-- is protected indefinitely.
indefStrings = {
['indef'] = true,
['indefinite'] = true,
['indefinitely'] = true,
['infinite'] = true,
},
--------------------------------------------------------------------------------
-- Group hierarchy
--------------------------------------------------------------------------------
-- This table maps each group to all groups that have a superset of the original
-- group's page editing permissions.
hierarchy = {
sysop = {},
reviewer = {'sysop'},
filemover = {'sysop'},
templateeditor = {'sysop'},
extendedconfirmed = {'sysop'},
autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'},
user = {'autoconfirmed'},
['*'] = {'user'}
},
--------------------------------------------------------------------------------
-- Wrapper templates and their default arguments
--------------------------------------------------------------------------------
-- This table contains wrapper templates used with the module, and their
-- default arguments. Templates specified in this table should contain the
-- following invocation, and no other template content:
--
-- {{#invoke:Protection banner|main}}
--
-- If other content is desired, it can be added between
-- <noinclude>...</noinclude> tags.
--
-- When a user calls one of these wrapper templates, they will use the
-- default arguments automatically. However, users can override any of the
-- arguments.
wrappers = {
['Template:Pp'] = {},
['Template:Pp-30-500'] = {'ecp'},
['Template:Pp-blp'] = {'blp'},
-- we don't need Template:Pp-create
['Template:Pp-dispute'] = {'dispute'},
['Template:Pp-main-page'] = {'mainpage'},
['Template:Pp-move'] = {action = 'move'},
['Template:Pp-move-dispute'] = {'dispute', action = 'move'},
-- we don't need Template:Pp-move-indef
['Template:Pp-move-vandalism'] = {'vandalism', action = 'move'},
['Template:Pp-office'] = {'office'},
['Template:Pp-office-dmca'] = {'dmca'},
['Template:Pp-pc1'] = {action = 'autoreview', small = true},
['Template:Pp-pc2'] = {action = 'autoreview', small = true},
['Template:Pp-reset'] = {'reset'},
['Template:Pp-semi-indef'] = {small = true},
['Template:Pp-sock'] = {'sock'},
['Template:Pp-template'] = {'template', small = true},
['Template:Pp-upload'] = {action = 'upload'},
['Template:Pp-usertalk'] = {'usertalk'},
['Template:Pp-vandalism'] = {'vandalism'},
},
--------------------------------------------------------------------------------
--
-- MESSAGES
--
--------------------------------------------------------------------------------
msg = {
--------------------------------------------------------------------------------
-- Intro blurb and intro fragment
--------------------------------------------------------------------------------
-- These messages specify what is produced by the ${INTROBLURB} and
-- ${INTROFRAGMENT} parameters. If the protection is temporary they use the
-- intro-blurb-expiry or intro-fragment-expiry, and if not they use
-- intro-blurb-noexpiry or intro-fragment-noexpiry.
-- It is possible to use banner parameters in these messages.
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.',
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.',
['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},',
['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}',
--------------------------------------------------------------------------------
-- Tooltip blurb
--------------------------------------------------------------------------------
-- These messages specify what is produced by the ${TOOLTIPBLURB} parameter.
-- If the protection is temporary the tooltip-blurb-expiry message is used, and
-- if not the tooltip-blurb-noexpiry message is used.
-- It is possible to use banner parameters in these messages.
['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.',
['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.',
['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},',
['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}',
--------------------------------------------------------------------------------
-- Special explanation blurb
--------------------------------------------------------------------------------
-- An explanation blurb for pages that cannot be unprotected, e.g. for pages
-- in the MediaWiki namespace.
-- It is possible to use banner parameters in this message.
['explanation-blurb-nounprotect'] = 'See the [[Wikipédia:Página protegida|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] 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]].',
--------------------------------------------------------------------------------
-- Protection log display values
--------------------------------------------------------------------------------
-- These messages determine the display values for the protection log link
-- or the pending changes log link produced by the ${PROTECTIONLOG} parameter.
-- It is possible to use banner parameters in these messages.
['protection-log-display'] = 'protection log',
['pc-log-display'] = 'pending changes log',
--------------------------------------------------------------------------------
-- Current version display values
--------------------------------------------------------------------------------
-- These messages determine the display values for the page history link
-- or the move log link produced by the ${CURRENTVERSION} parameter.
-- It is possible to use banner parameters in these messages.
['current-version-move-display'] = 'current title',
['current-version-edit-display'] = 'current version',
--------------------------------------------------------------------------------
-- Talk page
--------------------------------------------------------------------------------
-- This message determines the display value of the talk page link produced
-- with the ${TALKPAGE} parameter.
-- It is possible to use banner parameters in this message.
['talk-page-link-display'] = 'talk page',
--------------------------------------------------------------------------------
-- Edit requests
--------------------------------------------------------------------------------
-- This message determines the display value of the edit request link produced
-- with the ${EDITREQUEST} parameter.
-- It is possible to use banner parameters in this message.
['edit-request-display'] = 'submit an edit request',
--------------------------------------------------------------------------------
-- Expiry date format
--------------------------------------------------------------------------------
-- This is the format for the blurb expiry date. It should be valid input for
-- the first parameter of the #time parser function.
['expiry-date-format'] = 'F j, Y',
--------------------------------------------------------------------------------
-- Tracking categories
--------------------------------------------------------------------------------
-- These messages determine which tracking categories the module outputs.
['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates',
['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules',
--------------------------------------------------------------------------------
-- Images
--------------------------------------------------------------------------------
-- These are images that are not defined by their protection action and protection level.
['image-filename-indef'] = 'Padlock.svg',
['image-filename-default'] = 'Transparent.gif',
--------------------------------------------------------------------------------
-- End messages
--------------------------------------------------------------------------------
}
--------------------------------------------------------------------------------
-- End configuration
--------------------------------------------------------------------------------
}