Module:qhv-headword: Difference between revisions

No edit summary
No edit summary
Line 149: Line 149:
pos_functions.adjectives = function(class, args, data)
pos_functions.adjectives = function(class, args, data)
local params = {
local params = {
[1] = {list = "comp"},
[1] = {list = "eq"},
[2] = {list = "sup"},
[2] = {list = "comp"},
[3] = {list = "sup"},
["head"] = {},
["head"] = {},
}
}
local args = require("Module:parameters").process(args, params)
local args = require("Module:parameters").process(args, params)
data.heads = {args["head"]}
data.heads = {args["head"]}
if args[1][1] == "-" then
table.insert(data.categories, "High Valyrian " .. data.pos_category)
table.insert(data.inflections, {label = "not comparable"})
table.insert(data.categories, "German uncomparable adjectives")
return
end
if #args[1] > 0 then
for i, form in ipairs(args[1]) do
args[1][i] = {term = (form == "er" and PAGENAME .. "er" or form),
accel = {form = "comparative"}}
end
else
args[1] = {request = true}
table.insert(data.categories, "de-adj lacking comparative")
end
args[1].label = "[[Appendix:Glossary#comparative|comparative]]"
table.insert(data.inflections, args[1])
if #args[2] > 0 then
args[1] = require("Module:qhv-adj/data").fetch("eq")
for i, form in ipairs(args[2]) do
args[2] = require("Module:qhv-adj/data").fetch("comp")
args[2][i] = {
args[3] = require("Module:qhv-adj/data").fetch("sup")
term = "am [[" .(form == "sten" and PAGENAME .. "sten" or form) .. "]]",
accel = {form = "superlative"}}
args[1].label = "[wikt:Appendix:Glossary#equative|equative]"
end
args[2].label = "[wikt:Appendix:Glossary#comparative|comparative]"
else
args[3].label = "[wikt:Appendix:Glossary#suoerlative|superlative]"
args[2] = {request = true}
table.insert(data.categories, "de-adj lacking superlative")
end
args[2].label = "[[Appendix:Glossary#superlative|superlative]]"
table.insert(data.inflections, args[2])
end
end