Module:qhv-headword: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 43: Line 43:
local lang = require("Module:languages").getByCode("qhv")
local lang = require("Module:languages").getByCode("qhv")
local m_data = require("Module:qhv-noun/data")
local m_data = require("Module:qhv-noun/data")
local function glossary_link(entry, text)
text = text or entry
return "[[wikt:Appendix:Glossary#" .. entry .. "|" .. text .. "]]"
end


local function detect_gender(word)
local function detect_gender(word)
Line 151: Line 156:
[2] = {list = "comp"},
[2] = {list = "comp"},
[3] = {list = "sup"},
[3] = {list = "sup"},
["unc"] = {type = "boolean"},
["head"] = {},
["head"] = {},
}
}
Line 158: Line 164:
table.insert(data.categories, "High Valyrian " .. data.pos_category)
table.insert(data.categories, "High Valyrian " .. data.pos_category)
if args["unc"] then
args[1] = require("Module:qhv-adj/head").fetch("eq")
table.insert(data.inflections, {label = "not " .. glossary_link("comparable")})
args[2] = require("Module:qhv-adj/head").fetch("comp")
table.insert(data.categories, "High Valyrian uncomparable adjectives")
args[3] = require("Module:qhv-adj/head").fetch("sup")
else
args[1] = require("Module:qhv-adj/head").fetch("eq")
args[1].label = "[[wikt:Appendix:Glossary#equative|equative]]"
args[2] = require("Module:qhv-adj/head").fetch("comp")
args[2].label = "[[wikt:Appendix:Glossary#comparative|comparative]]"
args[3] = require("Module:qhv-adj/head").fetch("sup")
args[3].label = "[[wikt:Appendix:Glossary#suoerlative|superlative]]"
args[1].label = "[[wikt:Appendix:Glossary#equative|equative]]"
table.insert(data.inflections, args[1])
args[2].label = "[[wikt:Appendix:Glossary#comparative|comparative]]"
table.insert(data.inflections, args[2])
args[3].label = "[[wikt:Appendix:Glossary#suoerlative|superlative]]"
table.insert(data.inflections, args[3])
table.insert(data.inflections, args[1])
table.insert(data.inflections, args[2])
table.insert(data.inflections, args[3])
end
end
end


Navigation menu