Module:snon-headword: Difference between revisions
No edit summary |
No edit summary |
||
| Line 242: | Line 242: | ||
local lemma = data.pagename | local lemma = data.pagename | ||
if args.inv then | |||
-- invariable adjective | |||
table.insert(data.inflections, {label = glossary_link("invariable")}) | |||
table.insert(data.categories, langname .. " indeclinable " .. category_plpos) | |||
else | else | ||
local new_comps = {} | local comps = m_hw_util.parse_term_list_with_modifiers { | ||
paramname = "comp", | |||
forms = args.comp, | |||
splitchar = ",", | |||
} | |||
if not comps[1] then | |||
comps = {{term = lemma .. "ir"}} | |||
else | |||
local new_comps = {} | |||
for _, c in ipairs(comps) do | |||
if c.term == "+" then | |||
table.insert(new_comps, {term = lemma .. "ir"}) | |||
else | |||
table.insert(new_comps, c) | |||
end | |||
end | end | ||
comps = new_comps | |||
end | end | ||
local sups = m_hw_util.parse_term_list_with_modifiers { | |||
paramname = "sup", | |||
forms = args.sup, | |||
splitchar = ",", | |||
} | |||
if not sups[1] then | |||
sups = {{term = lemma .. "ist"}} | |||
else | |||
local new_sups = {} | |||
for _, s in ipairs(sups) do | |||
if s.term == "+" then | |||
table.insert(new_sups, {term = lemma .. "ist"}) | |||
else | |||
table.insert(new_sups, s) | |||
end | |||
end | end | ||
sups = new_sups | |||
end | end | ||
sups | |||
insert_inflection(data, comps, "comparative", "comp") | |||
insert_inflection(data, sups, "superlative", "sup") | |||
end | end | ||
end | end | ||
| Line 290: | Line 296: | ||
["sup"] = {list = true, disallow_holes = true}, | ["sup"] = {list = true, disallow_holes = true}, | ||
["comp"] = {list = true, disallow_holes = true}, | ["comp"] = {list = true, disallow_holes = true}, | ||
["inv"] = {type = "boolean"}, | |||
}, | }, | ||
func = do_adj, | func = do_adj, | ||