Module:goll-headword: Difference between revisions

Nehster9 (talk | contribs)
mNo edit summary
Nehster9 (talk | contribs)
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 129: Line 129:
error("Parameter g= (gender) is required and must be non-empty")
error("Parameter g= (gender) is required and must be non-empty")
end
end
if args.pt then
data.genders = genders
insert(genders, "<i>plural only</i>")
end
 
data.genders = genders


local plurals = parse_term_list(args.pl, "pl")
local plurals = parse_term_list(args.pl, "pl")


if args.pt then
if args.pt then
insert(data.categories, langname .. " pluralia tantum nouns")
insert(data.categories, langname .. " pluralia tantum")
elseif args.nopl or (plurals[1] and plurals[1].term == "-") then
elseif args.nopl or (plurals[1] and plurals[1].term == "-") then
insert(data.categories, langname .. " uncountable nouns")
insert(data.categories, langname .. " uncountable nouns")
Line 168: Line 164:
if part[1] then
if part[1] then
insert_inflection(data, part, "past participle", "pastpart")
insert_inflection(data, part, "past participle", "pastpart")
end
end,
}
pos_functions.adjectives = {
params = {
["f"] = list_param,
["mp"] = list_param,
["fp"] = list_param,
},
func = function(args, data)
local f = parse_term_list(args.f, "f")
local mp = parse_term_list(args.mp, "mp")
local fp = parse_term_list(args.fp, "fp")
if f[1] then
insert_inflection(data, f, "feminine", "f")
end
if mp[1] then
insert_inflection(data, mp, "masculine plural", "m|p")
end
if fp[1] then
insert_inflection(data, fp, "feminine plural", "f|p")
end
end
end,
end,