Ugrás a tartalomhoz

Modul:affixusex

A Wikiszótárból, a nyitott szótárból

A modult aModul:affixusex/doclapon tudod dokumentálni

localexport={}

localm_links=require("Module:links")

localrsplit=mw.text.split

-- main function

functionexport.format_affixusex(lang,sc,parts)
result={}

-- Loop over all terms. We simply call full_link() on each term, along with the
-- associated params, to format the link, but need some special-casing for affixes.
forindex,partinipairs(parts)do
localterm=part.term
localalt=part.alt

ifpart.fulljoinerthen
table.insert(result,part.fulljoiner)
elseifpart.joinerthen
table.insert(result,""..part.joiner.."")
elseifindex==#partsorpart.arrowthen
table.insert(result,"→")
elseifindex>1then
table.insert(result,"+")
end
table.insert(result,"‎")

terminfo={
lang=lang,sc=sc,term=term,gloss=part.t,tr=part.tr,ts=part.ts,
genders=part.gandrsplit(part.g,",")or{},id=part.id,alt=alt,
lit=part.lit,pos=part.pos,accel=part.accel
}

ifpart.langthen
terminfo.lang=part.lang
terminfo.sc=part.sc
table.insert(result,require("Module:etymology").format_derived(nil,terminfo,nil,"affixusex"))
else
table.insert(result,m_links.full_link(terminfo,"term"))
end

ifpart.qthen
table.insert(result,""..require("Module:qualifier").format_qualifier(part.q))
end
end

returntable.concat(result)
end

returnexport