Module:User:Benwing2/etymology/templates/cognate

local export = {}

local m_internal = require("Module:User:Benwing2/etymology/templates/internal")

function export.cognate(frame) local args = frame:getParent.args if args.gloss then require("Module:debug/track")("cognate/gloss param") end local params = { [1] = {required = true, default = "und"}, [2] = {},		[3] = {alias_of = "alt"}, [4] = {alias_of = "t"}, ["alt"] = {}, ["g"] = {list = true}, ["id"] = {}, ["lit"] = {}, ["pos"] = {}, ["t"] = {}, ["gloss"] = {alias_of = "t"}, ["tr"] = {}, ["ts"] = {}, ["sc"] = {}, ["sort"] = {}, }	args = require("Module:parameters").process(args, params) local source, sources = m_internal.fetch_source_or_sources(args[1], 1) local sc = m_internal.fetch_script(args["sc"], "sc")

local terminfo = { lang = source, sc = sc, term = args[2], alt = args["alt"], id = args["id"], genders = args["g"], tr = args["tr"], ts = args["ts"], gloss = args["t"], pos = args["pos"], lit = args["lit"] }

if sources then return require("Module:User:Benwing2/etymology/multi").format_multi_cognate(sources, terminfo, args.sort) else return require("Module:User:Benwing2/etymology").format_cognate(terminfo, args.sort) end end

function export.noncognate(frame) return export.cognate(frame) end

return export