Module:coinage: Difference between revisions

From Laenkea
Jump to navigation Jump to search
(Created page with "local export = {} local params = { [1] = {required = true}, [2] = {}, ["in"] = {}, ["nocap"] = {type = "boolean"}, ["notext"] = {type = "boolean"}, ["nocat"] = {type = "boolean"}, } function export.show(frame) local args = require("Module:parameters").process(frame:getParent().args, params) local out = "" if not args["notext"] then out = out .. "" .. (args["nocap"] and "c" or "C") .. "oined" .. (args[2] and " in " or "") end if...")
(No difference)

Revision as of 01:30, 27 February 2024

Documentation for this module may be created at Module:coinage/documentation

local export = {}
local params = {
	[1] = {required = true},
	[2] = {},
	["in"] = {},
	["nocap"] = {type = "boolean"},
	["notext"] = {type = "boolean"},
	["nocat"] = {type = "boolean"},
}
function export.show(frame)
	local args = require("Module:parameters").process(frame:getParent().args, params)
	local out = ""
	if not args["notext"] then
		out = out .. "[[Appendix:Glossary#coinage|" .. (args["nocap"] and "c" or "C") .. "oined]]" .. (args[2] and " in " or "")
	end
	if args[2] then out = out .. args[2] end
	if args["in"] then out = " in " .. args["in"] end
	return out
end
return export