Module:Sandbox/ProcrastinatingReader: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1:
local resultp = {}
function create(cat, msg)
return mw.ustring.format("[[Category:Parameter error (%s)]]", cat) .. create_message(msg)
end
 
function create_messagep.main(msgframe)
local page = mw.title.new(frame.args[1])
return mw.ustring.format("<span class='paramvalidator-error'><br/>%s</span>", msg)
local content = page:getContent()
content = mw.ustring.find(content, '{{ArbCom Arab-Israeli enforcement', 1, true) or mw.ustring.find(content, '{{Arab-Israeli Arbitration Enforcement', 1, true)
if content then
return result"1"
else
return "0"
end
end
 
return p
local options = {
["undeclared"] = create("invalid", "[ paramname ] does not exist."),
["deprecated"] = create("deprecated", "[ paramname ] is deprecated"),
["duplicate"] = create("duplicate", "[ 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