This module is used by Module:etymology/templates and its submodules and is not meant to be used from anywhere else.
-- For internal use only with ] and its submodules.
local process_params = require("Module:parameters").process
local export = {}
do
local function get_params(frame, has_text, no_family)
local alias_of_t = {alias_of = "t"}
local boolean = {type = "boolean"}
local plain = {}
local params = {
= {
required = true,
type = "language",
default = "und"
},
= {
required = true,
sublist = true,
type = "language",
family = not no_family,
default = "und"
},
= plain,
= {alias_of = "alt"},
= alias_of_t,
= plain,
= plain,
= {list = true},
= alias_of_t,
= plain,
= plain,
= plain,
= plain,
= plain,
= plain,
= {type = "script"},
= plain,
= boolean,
= plain,
= plain,
}
if has_text then
params = boolean
params = boolean
end
return process_params(frame:getParent().args, params)
end
function export.parse_2_lang_args(frame, has_text, no_family)
local args = get_params(frame, has_text, no_family)
local sources = args
return args, args, {
lang = sources,
sc = args,
term = args,
alt = args,
id = args,
genders = args,
tr = args,
ts = args,
gloss = args,
pos = args,
lit = args
}, #sources > 1 and sources or nil
end
end
return export