10,731
edits
TheNightAvl (talk | contribs) mNo edit summary |
TheNightAvl (talk | contribs) mNo edit summary |
||
Line 5: | Line 5: | ||
local m_inline = require("Module:inline") | local m_inline = require("Module:inline") | ||
function export.descendant(frame) | function export.descendant(frame) | ||
local args = getArgs(frame) | local args = getArgs(frame) | ||
local out = "" | local out = "" | ||
Line 15: | Line 15: | ||
if borrowed then out = "<span class=\"desc-arrow\" title=\"borrowed\">→</span>" .. out end | if borrowed then out = "<span class=\"desc-arrow\" title=\"borrowed\">→</span>" .. out end | ||
if not noname then out = out .. lang.name .. ": " end | if not noname then out = out .. lang.name .. ": " end | ||
Line 21: | Line 20: | ||
local terms = {} | local terms = {} | ||
local i = 2 | local i = 2 | ||
while args[i] do | while args[i] do | ||
local term, term_args = m_inline.parse(args[i]) | local term, term_args = m_inline.parse(args[i]) | ||
table.insert(terms, m_links.full_link({ | table.insert(terms, m_links.full_link({ | ||
language = lang, | language = lang, | ||
Line 35: | Line 32: | ||
}) | }) | ||
) | ) | ||
i = i + 1 | i = i + 1 | ||
end | end | ||
out = out .. table.concat(terms, ", ") | out = out .. table.concat(terms, ", ") | ||
if see_desc then out = out .. frame:expandTemplate{ title = 'see descendants' } end | if see_desc then out = out .. frame:expandTemplate{ title = 'see descendants' } end | ||
else | else |