Module:labels/templates

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

This module is used by the templates {{label}}/{{lb}} and {{term label}}/{{tlb}} to show context labels for definitions.


local export = {}

local labels_module = "Module:labels"

-- Add tracking category for PAGE. The tracking category linked to is ].
local function track(page)
	require("Module:debug/track")("labels/" .. page)
end

function export.show(frame)
	local parent_args = frame:getParent().args
	local compat = (frame.args or "") ~= "" and parent_args
	local term_mode = (frame.args or "") ~= ""
	
	local params = {
		 = {required = true, type = "language", default = "und"},
		 = {required = true, list = true, default = "example"},
		 = {type = "boolean"},
		 = {},
	}
	
	if compat then
		params = params
		params = params
		params = nil
	end
	
	local args = require("Module:parameters").process(parent_args, params)
	
	-- Gather parameters
	local lang = args
	local labels = args

	-- Temporary tracking for the weird arguments.
	if (args.sort) then
		track("sort")
	end
	return require(labels_module).show_labels {
		lang = lang,
		labels = labels,
		sort = args.sort,
		nocat = args.nocat,
		mode = term_mode and "term-label" or nil,
		ok_to_destructively_modify = true,
	}
end

return export