Jump to content

Module:Sandbox/ProcrastinatingReader

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ProcrastinatingReader (talk | contribs) at 19:05, 12 October 2020 (neater). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
function create(cat, msg) 
	return mw.ustring.format("[[Category:Parameter error (%s)]]", cat) .. create_message(msg)
end

function create_message(msg) 
	return mw.ustring.format("<div class=\"hatnote\" style=\"color:red\"><strong>Warning:</strong> %s (this message is shown only in preview).</div>", msg)
end

local options = {
	["undeclared"] = create("invalid", 'Parameter "paramname" does not exist.'),
	["deprecated"] = create("deprecated", 'Parameter "paramname" is deprecated'),
	["duplicate"] = create("duplicate", 'Parameter "paramname" is a duplicate'),
	["doc-subpage"] = "doc",
}

local result = {
	[0] = options,
	[2] = options,
	[4] = options,
	[6] = options,
	[10] = options,
	[12] = options,
	[14] = options,
}
return result