11,201
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 34: | Line 34: | ||
end | end | ||
function export.get_linked_term(code, term, gender) | function export.get_linked_term(code, term, alt, gender) | ||
local out = "[[wikt:" .. term .. "#" .. data[code].name .. "|" .. term .. "]]" | local out = "[[wikt:" .. term .. "#" .. data[code].name .. "|" .. (alt or term) .. "]]" | ||
if gender then out = out .. " " .. format_gender(gender) end | if gender then out = out .. " " .. format_gender(gender) end | ||
return out | return out | ||
Line 55: | Line 55: | ||
term, term_args = m_inline.parse(args[i]) | term, term_args = m_inline.parse(args[i]) | ||
if not (i == 2 or args[i-1] == "" or args[i-1] == nil) then out = out .. ", " end | if not (i == 2 or args[i-1] == "" or args[i-1] == nil) then out = out .. ", " end | ||
out = out .. export.get_linked_term(language.code, term, term_args.g) | out = out .. export.get_linked_term(language.code, term, term_args.alt, term_args.g) | ||
end | end | ||