Module:head: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 14: Line 14:
end
end
local args = (frame:getParent() and frame:getParent().args) or frame.args
local params = {
[1] = {required = "true"},
[2] = {required = "true"},
["head"] = {default = make_head(mw.title.getCurrentTitle().text)},
["nocat"] = {type = "boolean"}
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local language = get_by_code(args[1])
local language = get_by_code(args[1])
local pos = args[2] or args["pos"]
if not pos then
error("Part of speech must be supplied")
end
local head = args["head"] or make_head(mw.title.getCurrentTitle().text)
return "'''" .. head .. "'''" .. ((args["nocat"] and "") or "[[Category:" .. language.name .. " " .. pos .. "s]]")
return "'''" .. head .. "'''" .. ((args["nocat"] and "") or "[[Category:" .. language.name .. " " .. pos .. "s]]")
end
end


return export
return export