Module:Contentious topics/talk notice/sandbox: Difference between revisions

Content deleted Content added
starting some changes
Line 3:
local TableTools = require('Module:TableTools')
local yesno = require('Module:Yesno')
local setToList = require('Module:Set to list')
local checkForUnknownParameters = require('Module:Check for unknown parameters')._check
local restrictionsDatabase = mw.loadJsonData("Template:Contentious topics/Additional restrictions.json")
Line 170 ⟶ 169:
-- and finally, convert our set to a list to make it easy to work with
restrictions = setToListTableTools.keysToList(restrictionFlags)
--[[
Line 239 ⟶ 238:
.. ' relate to <b>'
.. getTopicBlurb(topic)
.. '</b>, a contentious topic.</p>')
end
else
addToMessage(' This ' .. articleOrPage .. ' relates to <b>'
.. getTopicBlurb(completeTopics[1])
.. '</b>, a contentious topic.</p>'
)
end
Line 283 ⟶ 282:
if yesno(scope, nil) == nil then
-- the scope is not a boolean value, so we have a free-text explanation of the applicable parts
addToMessage(', in particular the parts about <b>' .. scope .. '</b>.')
else
addToMessage('.')
end
addToMessage('.</p>')
end
end
Line 327 ⟶ 325:
if not yesno(args.brief) then
addToMessage(' <p>Editors who repeatedly or seriously fail to adhere to the [[WP:Five pillars|purpose of Wikipedia]], '
.. 'any expected [[WP:Etiquette|standards of behaviour]], '
.. 'or any [[WP:List of policies|normal editorial process]] may be blocked or restricted by an administrator.</p>')
Line 421 ⟶ 419:
 
-- set the tracking category
unknownParameterTable['unknown'] = '[[Category:' .. categoryDatabase['unknown'] .. '|_VALUE_' .. currentTitleObject.text .. ']]'
-- an finally, call the unknownParameterCheck