Content deleted Content added
HouseBlaster (talk | contribs) refactor |
HouseBlaster (talk | contribs) refactor |
||
Line 8:
local restrictionsDefinition = mw.loadJsonData("Template:Contentious topics/Restrictions definition.json")
local standardSet = mw.loadJsonData("Template:Contentious topics/Standard set.json")
}▼
local function collectTopics(args, sectionParameter)
Line 21 ⟶ 26:
if value then
value = mw.ustring.lower(mw.text.trim(value))
value =
▲ value = topicAliases[value] or value -- normalize to the canonical name after we find the applicableSection
if value ~= '' and not seen[value] then
if applicableSection then
Line 197 ⟶ 202:
local function addToMessage(s)
messageBody = messageBody .. s
▲ end
▲ local function callFromList(code, arg)
▲ return frame:expandTemplate{
▲ title = "Contentious topics/list/sandbox", -- REMOVE /sandbox when publishing
▲ args = { [arg] = code }
end
local function getTopicBlurb(code)
return
end
local function getSuptopicBlurb(code)
return
end
-- returns the code for a superTopic
local function getSupertopic(code)
return
end
Line 236 ⟶ 233:
end
-- check for a superTopic (e.g. South Asia is the superTopic of Indian military history)
local superTopic =
if
-- we have a superTopic, so explain that
addToMessage(', a subtopic of <b>' .. getTopicBlurb(superTopic) .. '</b>\n')
Line 284 ⟶ 281:
local suptopicBlurb = getSuptopicBlurb(theCTOP)
if suptopicBlurb ~= '' then
addToMessage(' to <b>' .. suptopicBlurb .. '</b>, part of the contentious topic designation for <b>' .. getTopicBlurb(
else
addToMessage(' to <b>' .. getTopicBlurb(theCTOP) .. '</b>, a contentious topic.')
Line 298 ⟶ 295:
else
addToMessage('<b>' .. getTopicBlurb(completeTopics[1]) .. '</b>')
local superTopic =
if superTopic then
addToMessage(', part of the contentious topic designation for <b>' .. getTopicBlurb(superTopic) .. '</b>.</p>')
Line 332 ⟶ 329:
addToMessage(', in particular the parts about <b>' .. scope .. '</b>')
end
local superTopic =
if superTopic then
addToMessage('. This is a subtopic of <b>' .. getTopicBlurb(superTopic) .. '</b>.</p>')
|