Module:attention

Hello, you have come here looking for the meaning of the word Module:attention. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:attention, but we will also tell you about its etymology, its characteristics and you will know how to say Module:attention in singular and plural. Everything you need to know about the word Module:attention you have here. The definition of the word Module:attention will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:attention, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module implements the template {{attention}}.


local export = {}

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

function export.show(frame)
	local args = process_params(frame:getParent().args, {
		 = {required = true, type = "language"},
		 = true,
		 = true,
		 = true,
	})
	local lang = args
	local lang_code = lang:getCode()
	local title = args
	local id = args or ""
	
	local categories = {"Requests for attention concerning " .. lang:getCanonicalName()}
	if not title then
		insert(categories, {cat = "attention lacking explanation", sort_key = "-"})
	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) .. format_categories(categories, lang, args.sort)
end

return export