Module:pollasena-roots: Difference between revisions
No edit summary |
No edit summary |
||
| Line 157: | Line 157: | ||
required = not lang_options.optional, | required = not lang_options.optional, | ||
} | } | ||
if lang_options.annotated then | |||
params["parts"] = { | |||
sublist = true, | |||
} | |||
end | |||
end | end | ||
| Line 257: | Line 263: | ||
conj = lang_options.roots and separator or nil, | conj = lang_options.roots and separator or nil, | ||
} | } | ||
if lang_options.annotated then | |||
local referrals = {} | |||
for _, part in args.parts do | |||
local referral = m_links.full_link { | |||
lang = dest_lang, | |||
term = part, | |||
} | |||
table.insert(referrals, referral) | |||
end | |||
etymology = etymology .. " (see " .. m_table.serialCommaJoin(referrals) .. ")" | |||
end | |||
table.insert(etymologies, etymology) | table.insert(etymologies, etymology) | ||
termarg_index = termarg_index + 1 | termarg_index = termarg_index + 1 | ||
| Line 289: | Line 310: | ||
end | end | ||
function export.lyti(frame) | function export.lyti_inh(frame) | ||
local parent_args = frame:getParent().args | |||
local ancestor_codes = { | |||
{ code = "lyti-mid", options = {} }, | |||
{ code = "lyti-old", options = {} }, | |||
{ code = "cel-pro", options = {annotated = true} }, | |||
{ code = "ine-pro", options = {roots = true} }, | |||
} | |||
local extra_params = { | |||
mid = {type = "boolean"}, | |||
old = {type = "boolean"}, | |||
source = {}, | |||
} | |||
local evolution, args, categories = parse_args(parent_args, "lyti", ancestor_codes) | |||
return concat_etymologies(args, evolution) .. categories | |||
end | |||
function export.lyti_loan(frame) | |||
local parent_args = frame:getParent().args | local parent_args = frame:getParent().args | ||
local source_code = parent_args.source or "und" | local source_code = parent_args.source or "und" | ||
| Line 305: | Line 347: | ||
} | } | ||
local evolution, args = parse_args(parent_args, "lyti", ancestor_codes | local evolution, args, categories = parse_args(parent_args, "lyti", ancestor_codes) | ||
return concat_etymologies(args, evolution) | return concat_etymologies(args, evolution) .. categories | ||
end | end | ||
return export | return export | ||