Changes
Jump to navigation
Jump to search
Module:Parameter validation/default config (view source)
Revision as of 16:49, 6 December 2020
, 16:49, 6 December 2020readd mainspace only
function create(cat, msg)
return mw.ustring.format("{{main other|[[Category:Pages using tname_naked with %s parameters]]}}", cat) .. create_message(msg)
end
function create_message(msg)
return mw.ustring.format("<div class=\"hatnote\" style=\"color:red\"><strong>Warning:</strong> [[templatename]] used with %s (this message is shown only in preview).</div>", msg)
end
local options = {
["undeclared"] = create("unknown", 'unknown parameter(s): paramname'),
["deprecated"] = create("deprecated", 'deprecated parameter(s): paramname'),
["duplicate"] = create("duplicate", 'duplicate parameter(s): paramandvalue'),
["doc-subpage"] = "doc",
}
local result = {
[0] = options,
[2] = options,
[4] = options,
[6] = options,
[10] = options,
[12] = options,
[14] = options,
}
return result
return mw.ustring.format("{{main other|[[Category:Pages using tname_naked with %s parameters]]}}", cat) .. create_message(msg)
end
function create_message(msg)
return mw.ustring.format("<div class=\"hatnote\" style=\"color:red\"><strong>Warning:</strong> [[templatename]] used with %s (this message is shown only in preview).</div>", msg)
end
local options = {
["undeclared"] = create("unknown", 'unknown parameter(s): paramname'),
["deprecated"] = create("deprecated", 'deprecated parameter(s): paramname'),
["duplicate"] = create("duplicate", 'duplicate parameter(s): paramandvalue'),
["doc-subpage"] = "doc",
}
local result = {
[0] = options,
[2] = options,
[4] = options,
[6] = options,
[10] = options,
[12] = options,
[14] = options,
}
return result