Module:anui-headword

From Linguifex
Revision as of 11:19, 7 July 2021 by Sware (talk | contribs)
Jump to navigation Jump to search


local export = {}

local lang = require("Module:languages").getByCode("art-nui")
local data = {lang = lang, pos_category = "adjectives", categories = {}, inflections = {},}

local function glossary_link(entry, text)
	text = text or entry
	return "[[w:Appendix:Glossary#" .. entry .. "|" .. text .. "]]"
end

local function redup(word)
	
	
	return redup
end

function export.show()
	local args = frame:getParent().args
	local word = mw.title.getCurrentTitle().text or args["w"]
	
	if args[1] == '-' then
		table.insert(data.inflections, {label = "not " .. glossary_link("comparable")})
		table.insert(data.categories, lang:getCanonicalName() .. " uncomparable adjectives")
	else
		table.insert(data.inflections, {label = glossary_link("comparative"), redup(word)})
	end
	
	return require('Module:headword').full_headword(data)
end

return export