Module:qualifier/templates: difference between revisions

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Content deleted Content added
Synchronise sense template with Module:qualifier.
add support for {{antsense}}
Line 4: Line 4:
local process_params = require("Module:parameters").process
local process_params = require("Module:parameters").process
local sense = m_qualifier.sense
local sense = m_qualifier.sense
local antsense = m_qualifier.antsense


local export = {}
local export = {}
Line 17: Line 18:
function export.sense_t(frame)
function export.sense_t(frame)
return sense(
return sense(
process_params(frame:getParent().args, {
[1] = {required = true, list = true},
})[1]
)
end

function export.antsense_t(frame)
return antsense(
process_params(frame:getParent().args, {
process_params(frame:getParent().args, {
[1] = {required = true, list = true},
[1] = {required = true, list = true},

Revision as of 15:27, 28 April 2024


local m_qualifier = require("Module:qualifier")

local format_qualifier = m_qualifier.format_qualifier
local process_params = require("Module:parameters").process
local sense = m_qualifier.sense
local antsense = m_qualifier.antsense

local export = {}

function export.qualifier_t(frame)
	return format_qualifier(
		process_params(frame:getParent().args, {
			[1] = {required = true, list = true},
		})[1]
	)
end

function export.sense_t(frame)
	return sense(
		process_params(frame:getParent().args, {
			[1] = {required = true, list = true},
		})[1]
	)
end

function export.antsense_t(frame)
	return antsense(
		process_params(frame:getParent().args, {
			[1] = {required = true, list = true},
		})[1]
	)
end

return export