Bu modul uchun Modul:attention/doc nomli hujjat sahifasini yaratishingiz mumkin

local format_categories = require("Module:utilities").format_categories
local html_create = mw.html.create
local concat = table.concat
local insert = table.insert
local process_params = require("Module:parameters").process

local export = {}

function export.show(frame)
	local args = process_params(frame:getParent().args, {
		[1] = {required = true, type = "language"},
		[2] = true,
		["id"] = true,
		["sort"] = true,
	})
	local lang = args[1]
	local lang_code = lang:getCode()
	local title = args[2]
	local id = args["id"] or ""
	
	local categories = {format_categories({"Requests for attention concerning " .. lang:getCanonicalName()}, lang)}
	
	if not (title or mw.title.getCurrentTitle().nsText == "Template") then
		insert(categories, format_categories({"attention lacking explanation"}, lang, "-"))
	end
	
	-- mw.html escapes special characters in the id and title attributes.
	local ret = html_create("span")
		:addClass("attentionseeking")
		:attr("lang", lang_code)
	
	if id ~= "" then
		ret = ret:attr("id", "attentionseeking" .. lang_code .. id)
	end
	
	if title then
		ret = ret:attr("title", title)
	end
	
	return tostring(ret) .. concat(categories)
end

return export