Module:coinage: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
local out = "" | local out = "" | ||
if not args["notext"] then | if not args["notext"] then | ||
out = out .. "[[Appendix:Glossary#coinage|" .. (args["nocap"] and "c" or "C") .. "oined]]" .. (args[2] and " | out = out .. "[[Appendix:Glossary#coinage|" .. (args["nocap"] and "c" or "C") .. "oined]]" .. (args[2] and " by " or "") | ||
end | end | ||
if args[2] then out = out .. args[2] end | if args[2] then out = out .. args[2] end |
Revision as of 11:28, 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 language = require("Module:languages").get_by_code(args[1])
local out = ""
if not args["notext"] then
out = out .. "[[Appendix:Glossary#coinage|" .. (args["nocap"] and "c" or "C") .. "oined]]" .. (args[2] and " by " or "")
end
if args[2] then out = out .. args[2] end
if args["in"] then out = out .. " in " .. args["in"] end
if not args["nocat"] then out = out .. "[[Category:" .. language.name .. " coinages]]" end
return out
end
return export