Module:Sandbox/Od Mishehu/cfd explained

local p = ;

p.all = function(frame)

text = "This category is being considered for ";

type = frame.args[1]; targetText=""; if type

"d" then text = text .. "deletion"; elseif type

"r" then text = text .. "renaming to "; target=frame.args["target"] if target

nil then text = text .. "some other name" else targetText = ""; text = text .. targetText; end elseif type

"m" then text = text .. "merging into "; target=frame.args["target"] if target

nil then text = text .. "some other category" else targetText = "" target2=frame.args["target2"] if not (target2

nil) then target3 = frame.args["target3"] if target3

nil then targetText = targetText .. " and " else targetText = targetText .. ", and " end end text = text .. targetText; end elseif type

"l" then text = text .. "conversion into a list"; target=frame.args["target"] if not(target

nil) then targetText = ""..target..""; text = text .. " named "..targetText end end

text = text .. "." section = frame.args["section"] if not (section

nil) then text = text .. " This nomination is part of a discussion of several related categories." end

text = text .. "
This does not mean that any of the pages in the category will be deleted. They may, however, be recategorized.
"

year = frame.args["year"] month = frame.args["month"] day = frame.args["day"]

discussionPlace = "Wikipedia:Categories for discussion/Log/"..year.." "..month.." "..day.."#" if section

nil then discussionPlace = discussionPlace .. mw.title.getCurrentTitle.fullText else discussionPlace = discussionPlace ..section end

text = text .. "Please share your thoughts on the matter at this category's entry on the Categories for discussion page. Please do not empty the category or remove this notice while the discussion is in progress.
"

discussionpage = "Categories for discussion/Log/" .. os.date("%Y %B %e") text = text .. "" .. frame:expandTemplate..": "

if type

"r" then adminMsg = " "&wpReason="..mw.uri.encode(""..discussionPlace.."]").."&wpNewTitle="..mw.uri.encode("Category:"..target).." Click here to rename]."; else adminMsg = "If this category is empty, " adminMsg = adminMsg .. "and all incoming links have been cleaned up," reason = ""..discussionPlace..""; if type

"d" then reason = "This category has been deleted per the discussion at "..reason elseif type

"m" then if targetText

"" then reason = "Merged per "..reason; else reason = "Merged into "..targetText.." per "..reason end elseif type

"l" then if targetText

"" then reason = "Listified per "..reason; else reason = "Listified into "..targetText.." per "..reason end end adminMsg = adminMsg .. " ["..mw.title.getCurrentTitle:fullUrl.."?action=delete&wpReason=" ..mw.uri.encode(reason) adminMsg = adminMsg .. " click here to delete]." adminMsg = adminMsg .. '

' adminMsg = adminMsg .. mw.uri.encode(""..discussionPlace.."") adminMsg = adminMsg .. ' ' end

text = text .. '



' .. "Administrators: " .. adminMsg .. "
"

category=""

if mw.title.getCurrentTitle.namespace

14 then category="" category=category..frame:expandTemplate end

return frame:expandTemplate..category;end

return p;