Module:anui-headword: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
m (Sware moved page Module:anui-adj to Module:anui-headword without leaving a redirect)

Revision as of 11:22, 7 July 2021



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