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

Content deleted Content added
save a WIP
save draft 1
Line 237:
-- .. (section and (' Parts of this ' .. articleOrPage .. ' relate ') or (' This ' .. articleOrPage .. ' relates '))
-- if there's only one topic, we make a short blurb
if numberOfTopics == 1 then
if section then
Line 279 ⟶ 280:
local numberOfPartialTopics = TableTools.size(partialTopics)
if numberOfPartialTopics ~= 0 then
addToMessage('<p>Parts of this ' .. articleOrPage .. ' relate to ')
if numberOfCompleteTopics ~= 0 then
addToMessage('Additionally, parts ')
else
addToMessage('Parts ')
end
addToMessage('of this ' .. articleOrPage .. ' relate to ')
if numberOfPartialTopics > 1 then
--addToMessage('the therefollowing are multiple partialcontentious topics:\n')
for topic, scope in pairs(partialTopics) do
-- TODO THIS BIT
if not yesno(scope, false) then
-- we have a blurb explaining what the scope falls under
makeTopicBulletPoint(topic, nil)
else
makeTopicBulletPoint(topic, scope)
end
end
else
-- ONLYThere's ONEonly partialone topic and scope, so this loop only runs once
for topic, scope in pairs(partialTopics) do
-- TODO
addToMessage(frame:expandTemplate{
title = "Contentious topics/list",
args = { scope = partialTopics[topic] }
}
)
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 ' .. scope)
else
addToMessage('.')
end
end
end
end
-- THEN CHECK FOR PARTIAL TOPICS
-- LOOP FOR MULTIPLE TOPICS
end