Module:tlh-headword

Hello, you have come here looking for the meaning of the word Module:tlh-headword. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:tlh-headword, but we will also tell you about its etymology, its characteristics and you will know how to say Module:tlh-headword in singular and plural. Everything you need to know about the word Module:tlh-headword you have here. The definition of the word Module:tlh-headword will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:tlh-headword, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.


local export = {}
local pos_functions = {}
local piqdstyle = "font-family: pIqaD, Constructium, 'Klingon pIqaD HaSta', Code2000, Horta, 'Unifont CSUR', 'Kurinto Text Aux', 'Kurinto Book Aux', 'Kurinto Sans Aux'"

-- If Not Empty
local function ine(arg)
	if arg == "" then
		return nil
	else
		return arg
	end
end

local function handle_infl(args, data, argpref, label)
	if args and args then
		local forms = {}
		local form = argpref
		local i = 1
		while args do
			table.insert (forms, args)
			i = i + 1
			form = argpref..i
		end
		forms.label = mw.ustring.gsub(label, 'form', 'forms')
		table.insert(data.inflections, forms )
	elseif args then
		table.insert(data.inflections, { label = label, args})
	end
end

local lang = require("Module:languages").getByCode("tlh")
local script = require('Module:scripts').getByCode("Latn")
local PAGENAME = mw.ustring.gsub(mw.title.getCurrentTitle().text, '+/', '')
local piqdconv = require("Module:tlh-pIqaD")

function export.show(frame)

	local args = frame:getParent().args
	local poscat = frame.args or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.")
	poscat = string.gsub(poscat, 'form', 'forms')
	local data = {lang = lang, sc = script, pos_category = poscat, categories = {}, heads = {args or PAGENAME}, inflections = {}, sort_key = args}
	
	if poscat == 'nouns' and #frame.args > 0 then
		local plur = frame.args
		if plur == "pu'" or plur == "Du'" or plur == 'mey' then
			args = data.heads .. plur
			table.insert(data.categories, 'Klingon -' .. plur .. ' nouns')
		else
			args = plur
			table.insert(data.categories, 'Klingon nouns with irregular plurals')
		end
	end
	
	if args then
		table.insert(data.categories, "Klingon " .. args)
	end
	if args then
		table.insert(data.categories, "Klingon " .. args)
	end
	
	handle_infl(args, data, "stem", "stem")
	
	if pos_functions then
		pos_functions(args, data)
	end
	
	local phon = args or PAGENAME -- detects only first one
	local piqd = piqdconv.convert(phon)
	data.heads =  data.heads..' • <span style="'..piqdstyle..'">'..piqd..'</span>'
	
	return require("Module:headword").full_headword(data)
end

pos_functions = function(args, data)
	handle_infl(args, data, "pl", "plural")
end

pos_functions = function(args, data)
	handle_infl(args, data, "pl", "plural")
end

pos_functions = function(args, data)
	handle_infl(args, data, "past", "past tense")
end

pos_functions = pos_functions

return export