Module:pollasena-roots: Difference between revisions

No edit summary
No edit summary
Line 4: Line 4:
local m_param = require("Module:parameters")
local m_param = require("Module:parameters")
local m_param_utils = require("Module:parameter utilities")
local m_param_utils = require("Module:parameter utilities")
local m_etym = require("Module:etymology")


local gsub = mw.ustring.gsub
local gsub = mw.ustring.gsub
Line 142: Line 143:
local params = {
local params = {
["nocat"] = {type = "boolean"},
["nocat"] = {type = "boolean"},
["nocap"] = {type = "boolean"},
}
}
Line 154: Line 156:


function export.qsc(frame)
function export.qsc(frame)
local parent_args = frame:getParent().args
local ancestor_codes = {
local ancestor_codes = {
["sekh"] = {},
["sekh"] = {},
Line 159: Line 163:
}
}
local parent_args = frame:getParent().args
local terms, args = parse_args(parent_args, "qsc", ancestor_codes)
local terms, args = parse_args(parent_args, "qsc", ancestor_codes)
local capital = args.nocap and "f" or "F"
m_etym.format_derived {
lang = args[1],
sources = args[2],
terms = terms,
sort_key = args.sort,
nocat = args.nocat,
sourceconj = args.sourceconj,
conj = args.conj,
template_name = "derived",
force_cat = force_cat,
}
return capital .. "rom " .. table.concat(evolution, ", from ") .. "."
end


function export.lyti(frame)
local parent_args = frame:getParent().args
local source_code = parent_args.source
local ancestor_codes = {
["lyti-mid"] = {optional = not parent_args.mid},
["lyti-old"] = {optional = not parent_args.old},
[source_code] = {},
}
local terms, args = parse_args(parent_args, "lyti", ancestor_codes)
end
end


return export
return export