2023年政策修订增补工作正在进行中,欢迎参与!
Module:BugReportStatus
跳转到导航
跳转到搜索
该模块实现{{BugReport/status}}的功能。
请不要直接调用此模块。
-- Module:BugReportStatus
-- Made with ♥ by User:Leranjun
-- This module implements {{tl|BugReport/status}}.
-- Please refrain from invoking this module directly.
-- To add a new status, insert into the table in [[Module:BugReportStatus/status]].
local p = {}
local getArgs = require("Module:Arguments").getArgs
local STATUS = mw.loadData("Module:BugReportStatus/status")
function p.main(frame)
return frame:expandTemplate {title = "状态", args = p._main(getArgs(frame))}
end
function p._main(args)
local p1, p2 = (args[1] or "pending"), args[2]
local pStatus = STATUS[mw.ustring.lower(p1)]
if (pStatus) then
p1 = pStatus[1]
p2 = pStatus[2]
end
local title = mw.title.getCurrentTitle()
local ignore = title.namespace == 10 and title.rootText == "BugReport"
return {
[1] = p1,
[2] = p2,
color = args.color,
prefix = args.prefix,
category = (p1 or ignore) and "" or "尚未处理的BUG提报页面"
}
end
return p