Module:sje-verbs

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

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

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

local export = {}


-- Inflection functions

function export.odd(frame)
	local fparams = {
	}
	
	local fargs = require("Module:parameters").process(frame.args, fparams)
	
	local params = {
		 = {required = true, default = "{{{1}}}"},
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	local stem = require("Module:sje-common").Stem(args)
	
	local data = {
		forms = {},
		info = "odd, no gradation",
		categories = {},
	}
	
	if stem.ucons == "" and mw.title.getCurrentTitle().nsText ~= "Template" then
		error("The stem must end in a consonant.")
	end
	
	table.insert(data.categories, lang:getCanonicalName() .. " odd verbs")
	
	data.forms       = {stem:make_form{ending = "it"}}
	data.forms = {stem:make_form{ending = "äddje"}}
	data.forms = {stem:make_form{ending = "am"}}
	
	data.forms = {stem:make_form{ending = "av"}}
	data.forms = {stem:make_form{ending = "a"}}
	data.forms = {stem:make_form{}, stem:make_form{ending = "a"}}
	data.forms = {stem:make_form{ending = "in"}}
	data.forms = {stem:make_form{ending = "iehpen"}, stem:make_form{ending = "ähppen"}}
	data.forms = {stem:make_form{ending = "iebá"}}
	data.forms = {stem:make_form{ending = "ip"}}
	data.forms = {stem:make_form{ending = "ihpit"}}
	data.forms = {stem:make_form{ending = "i"}}
	data.forms = {stem:make_form{ending = "a"}}
	
	data.forms = {stem:make_form{ending = "iv"}}
	data.forms = {stem:make_form{ending = "i"}}
	data.forms = {stem:make_form{ending = "ij"}}
	data.forms = {stem:make_form{ending = "ijmen"}}
	data.forms = {stem:make_form{ending = "ijden"}}
	data.forms = {stem:make_form{ending = "ijga"}}
	data.forms = {stem:make_form{ending = "ijme"}}
	data.forms = {stem:make_form{ending = "ijde"}}
	data.forms = {stem:make_form{ending = "in"}}
	
	data.forms = {stem:make_form{ending = "e"}}
	data.forms = {stem:make_form{ending = "ehtin"}}
	data.forms = {stem:make_form{ending = "ihtit"}}
	data.forms = {stem:make_form{ending = "a"}}
	
	data.forms = {stem:make_form{ending = "ittjav"}}
	data.forms = {stem:make_form{ending = "ittja"}}
	data.forms = {stem:make_form{ending = "itj"}}
	data.forms = {stem:make_form{ending = "ittjin"}}
	data.forms = {stem:make_form{ending = "ittjabehtin"}, stem:make_form{ending = "ittjabähtten"}}
	data.forms = {stem:make_form{ending = "ittjaba"}}
	data.forms = {stem:make_form{ending = "ittjap"}}
	data.forms = {stem:make_form{ending = "ittjabihtit"}}
	data.forms = {stem:make_form{ending = "ittji"}}
	data.forms = {stem:make_form{ending = "ittja"}}
	
	postprocess(args, data)
	
	return make_table(data)
end


function postprocess(args, data)
	data.lemma = data.forms
	
	-- Check if the lemma form matches the page name
	if (lang:makeEntryName(data.lemma)) ~= mw.title.getCurrentTitle().text then
		table.insert(data.categories, lang:getCanonicalName() .. " entries with inflection not matching pagename")
	end
end


-- Make the table
function make_table(data)
	local function repl(param)
		local accel = true
		local no_store = false
		
		if param == "info" then
			return mw.getContentLanguage():ucfirst(data.info or "")
		elseif string.sub(param, 1, 1) == "!" then
			no_store = true
			param = string.sub(param, 2)
		elseif string.sub(param, 1, 1) == "#" then
			accel = false
			param = string.sub(param, 2)
		end
		
		local forms = data.forms
		
		if not forms then
			return "—"
		end
		
		local ret = {}
		
		for key, subform in ipairs(forms) do
			table.insert(ret, require("Module:links").full_link({lang = lang, term = subform, accel = accel and {form = param, lemma = data.lemma, no_store = no_store} or nil}))
		end
		
		return table.concat(ret, "<br/>")
	end
	
	local wikicode = [=[
{| class="inflection-table vsSwitcher" data-toggle-category="inflection" style="border: solid 1px #CCCCFF;" cellspacing="1" cellpadding="2"
|- style="background: #E2F6E2; text-align: left;"
! class="vsToggleElement" colspan="4" | {{{info}}}
|- class="vsShow" style="background: #F2F2FF;"
! style="width: 11em; background: #E2F6E2;" | infinitive
| style="width: 15em;" colspan="2" | {{{!inf}}}
|- class="vsShow" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 1st&nbsp;sing.&nbsp;present
| colspan="2" | {{{!1|s|pres|indc}}}
|- class="vsShow" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 1st&nbsp;sing.&nbsp;past
| colspan="2" | {{{!1|s|past|indc}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | infinitive
| colspan="3" | {{{inf}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | present&nbsp;participle
| colspan="3" | {{{pres|ptcp}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | past&nbsp;participle
| colspan="3" | {{{past|ptcp}}}
|- class="vsHide"
! style="background: #C0E4C0; width: 11em;" |
! style="background: #C0E4C0; width: 15em;" | present indicative
! style="background: #C0E4C0; width: 15em;" | past indicative
! style="background: #C0E4C0; width: 15em;" | imperative
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 1st&nbsp;singular
| data-accel-col="1" | {{{1|s|pres|indc}}}
| data-accel-col="2" | {{{1|s|past|indc}}}
| data-accel-col="3" | {{{1|s|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 2nd&nbsp;singular
| data-accel-col="1" | {{{2|s|pres|indc}}}
| data-accel-col="2" | {{{2|s|past|indc}}}
| data-accel-col="3" | {{{2|s|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 3rd&nbsp;singular
| data-accel-col="1" | {{{3|s|pres|indc}}}
| data-accel-col="2" | {{{3|s|past|indc}}}
| data-accel-col="3" | {{{3|s|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 1st&nbsp;dual
| data-accel-col="1" | {{{1|d|pres|indc}}}
| data-accel-col="2" | {{{1|d|past|indc}}}
| data-accel-col="3" | {{{1|d|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 2nd&nbsp;dual
| data-accel-col="1" | {{{2|d|pres|indc}}}
| data-accel-col="2" | {{{2|d|past|indc}}}
| data-accel-col="3" | {{{2|d|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 3rd&nbsp;dual
| data-accel-col="1" | {{{3|d|pres|indc}}}
| data-accel-col="2" | {{{3|d|past|indc}}}
| data-accel-col="3" | {{{3|d|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 1st&nbsp;plural
| data-accel-col="1" | {{{1|p|pres|indc}}}
| data-accel-col="2" | {{{1|p|past|indc}}}
| data-accel-col="3" | {{{1|p|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 2nd&nbsp;plural
| data-accel-col="1" | {{{2|p|pres|indc}}}
| data-accel-col="2" | {{{2|p|past|indc}}}
| data-accel-col="3" | {{{2|p|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 3rd&nbsp;plural
| data-accel-col="1" | {{{3|p|pres|indc}}}
| data-accel-col="2" | {{{3|p|past|indc}}}
| data-accel-col="3" | {{{3|p|impr}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | connegative
| data-accel-col="1" colspan="2" | {{{indc|conn}}}
| data-accel-col="3" | {{{impr|conn}}}
|- class="vsHide"
! style="background: #C0E4C0;" |
! style="background: #F2F2FF;" rowspan="11" |
! style="background: #C0E4C0;" | potential
! style="background: #F2F2FF;" rowspan="11" |
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 1st&nbsp;singular
| data-accel-col="5" | {{{1|s|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 2nd&nbsp;singular
| data-accel-col="5" | {{{2|s|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 3rd&nbsp;singular
| data-accel-col="5" | {{{3|s|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 1st&nbsp;dual
| data-accel-col="5" | {{{1|d|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 2nd&nbsp;dual
| data-accel-col="5" | {{{2|d|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 3rd&nbsp;dual
| data-accel-col="5" | {{{3|d|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 1st&nbsp;plural
| data-accel-col="5" | {{{1|p|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 2nd&nbsp;plural
| data-accel-col="5" | {{{2|p|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | 3rd&nbsp;plural
| data-accel-col="5" | {{{3|p|potn}}}
|- class="vsHide" style="background: #F2F2FF;"
! style="background: #E2F6E2;" | connegative
| data-accel-col="5" | {{{potn|conn}}}
|}]=]

	return mw.ustring.gsub(wikicode, "{{{?(+)}}}", repl) .. require("Module:utilities").format_categories(data.categories, lang)
end

return export