Module:User:George Animal/ipa/ku

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


local m_utilities = require("Module:utilities")
local m_links = require("Module:links")

local export = {}

local lang = require("Module:languages").getByCode("ku")


local function postprocess(args, data)
	-- Nothing here yet
end


-- Inflection functions

export = function(frame)
	local params = {
		 = {required = true, default = "{{{1}}}"},
		}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	
	local data = {forms = {}, info = "thematic", categories = {lang:getCanonicalName() .. " thematic verbs"}}
	
	-- Present indicative
	data.forms = {args .. "înim"}
	data.forms = {args .. "înî"}
	data.forms = {args .. "îne"}
	data.forms = {args .. "înin"}
	data.forms = {args .. "înin"}
	data.forms = {args .. "înin"}
	
	-- Imperative
	data.forms = {args .. "d"}
	data.forms = {args .. "înin"}
	postprocess(args, data)
	
	return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end


local names = {
	 = "Active voice",
	
	 = "Present indicative",
	 = "Imperative",
	
	 = "1st singular",
	 = "2nd singular",
	 = "3rd singular",
	 = "1st plural",
	 = "2nd plural",
	 = "3rd plural",
}

-- Make the table
function make_table(data)
	local function repl(param)
		if param == "info" then
			return mw.getContentLanguage():ucfirst(data.info or "")
		end
		
		local form = data.forms
		
		if not form or #form == 0 then
			return "—"
		end
		
		local ret = {}
		
		for key, subform in ipairs(form) do
			table.insert(ret, m_links.full_link(nil, "*" .. subform, lang, nil, nil, nil, {}, false))
		end
		
		return table.concat(ret, ", ")
	end
	
	local pns = {"1sg", "2sg", "3sg", "1pl", "2pl", "3pl"}
	local voices = {"actv", "pasv"}
	local moods = {"pres_indc", "pres_subj", "impr"}
	
	local wikicode = {}
	
	table.insert(wikicode, "{| class=\"inflection-table vsSwitcher\" data-toggle-category=\"inflection\" style=\"background: #FAFAFA; border: 1px solid #d0d0d0; text-align: left;\" cellspacing=\"1\" cellpadding=\"2\"")
	table.insert(wikicode, "|- style=\"background: #CCCCFF;\"\n! class=\"vsToggleElement\" colspan=\"" .. (#moods + 1) .. "\" | {{{info}}}")
	
	for _, voice in ipairs(voices) do
		table.insert(wikicode, "|- class=\"vsHide\" style=\"background: #CCCCFF;\"\n! " .. names)
		
		for _, mood in ipairs(moods) do
			table.insert(wikicode, "! style=\"min-width: 11em; background: #CCCCFF;\" | " .. names)
		end
		
		for _, pn in ipairs(pns) do
			table.insert(wikicode, "|- class=\"vsHide\" style=\"background-color: #F2F2FF;\"\n! style=\"min-width: 8em; background-color: #E6E6FF;\" | " .. names)
			
			for _, mood in ipairs(moods) do
				table.insert(wikicode, "| {{{" .. voice .. "_" .. mood .. "_" .. pn .. "}}}")
			end
		end
	end
	
	table.insert(wikicode, "|}")
	
	wikicode = table.concat(wikicode, "\n")
	
	return (mw.ustring.gsub(wikicode, "{{{(+)}}}", repl))
end

return export