Module:vo-conj

Hello, you have come here looking for the meaning of the word Module:vo-conj. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:vo-conj, but we will also tell you about its etymology, its characteristics and you will know how to say Module:vo-conj in singular and plural. Everything you need to know about the word Module:vo-conj you have here. The definition of the word Module:vo-conj will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:vo-conj, 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("vo")

local p = {}

function p.init(frame)
    local intr = frame:getParent().args
    local pagename = tostring( mw.title:getCurrentTitle() )
    local root = mw.ustring.sub(pagename, 0, -3)
    return p.conj(root, intr)
end

function p.conj(root, intr)
    local function link(prefix, suffix)
        return require("Module:links").full_link({lang = lang, accel = {form = prefix .. suffix}, term = prefix .. root .. suffix})
    end

    local function row(r)
        return ""
    end
    
    local m_gn = require("Module:gender and number")
    local sg = m_gn.format_genders({"s"})
    local pl = m_gn.format_genders({"p"})

    local t = {{"", "pa"}, {"e", "pe"}, {"ä", "pä"}, {"i", "pi"}, {"o", "po"}, {"u", "pu"}, {"ö", "pö"}, {"ü", "pü"}}
    local p = {
    	{"1st " .. sg, "ob"}, {"2nd " .. sg, "ol"}, {"2nd " .. sg .. " polite", "or"},
    	{"3rd " .. sg, "on"}, {"3rd " .. sg .. " male", "om"}, {"3rd " .. sg .. " female", "of"},
    	{"reflexive " .. sg, "ok"}, {"reciprocative " .. sg, "od"},
    	{"1st " .. pl, "obs"}, {"2nd " .. pl, "ols"}, {"2nd " .. pl .. " polite", "ors"},
    	{"3rd " .. pl, "ons"}, {"3rd " .. pl .. " male", "oms"}, {"3rd " .. pl .. " female", "ofs"},
    	{"reflexive " .. pl, "oks"}, {"reciprocative " .. pl, "ods"}, {"indefinite", "oy"}, {"impersonal", "os"}}
    local f = {
    	{"active indicative", "passive indicative", ""},
    	{"active subjunctive", "passive subjunctive", "-la"},
    	{"active optative", "passive optative", "ös"},
    	{"active interrogative", "passive interrogative", "-li"},
    	{"active jussive", "passive jussive", "öz"},
    	{"active conditional", "passive conditional", nil},
    	{"active imperative", "passive imperative", nil},
    	{"active infinitive", "passive infinitive", nil},
    }

    local val = {mw.getCurrentFrame():expandTemplate{
    	title = 'inflection-table-top',
    	args = {
    		title = '] of <i><span lang="vo">' .. root .. 'ön</span></i>',
	    	palette = 'magenta',
	    	tall = 'yes',
	    	class = 'wide',
    	}
    }}

    local function verbs(voice)
        table.insert(val, "\n|-\n!colspan=2 style=\"background-color: var(--wikt-palette-brightyellow)\" " ..
        	"class=\"outer\"|" .. f)
        table.insert(val, "\n|colspan=3|" .. link(t, "ön"))
        table.insert(val, "\n|colspan=999 class=\"blank-end-row\"|")
        table.insert(val, "\n|-\n|colspan=999 class=\"separator\"|")

        for i = 1, 5, 1 do
            table.insert(val, "\n|-\n!class=\"outer\" style=\"background-color: var(--wikt-palette-brightyellow)\" " ..
            	"colspan=2|" .. f)
            table.insert(val, "\n!colspan=2|present")
            table.insert(val, "\n!colspan=2|present perfect")
            table.insert(val, "\n!colspan=2|imperfect")
            table.insert(val, "\n!colspan=2|pluperfect")
            table.insert(val, "\n!colspan=2|future")
            table.insert(val, "\n!colspan=2|future perfect")
            table.insert(val, "\n!colspan=2|future in the past")
            table.insert(val, "\n!colspan=2|future in the past perfect")

            for j = 1, 18, 1 do
                table.insert(val, "\n|-\n!colspan=2|" .. p)
                for k = 1, 8, 1 do
                    table.insert(val, "\n|colspan=2|" .. link(t, p .. f))
                end
            end
            
        	table.insert(val, "\n|-\n|colspan=999 class=\"separator\"|")
        end

        table.insert(val, "\n|-\n!class=\"outer\" style=\"background-color: var(--wikt-palette-brightyellow)\" colspan=2|")
        table.insert(val, "\n!class=\"outer\" style=\"background-color: var(--wikt-palette-brightyellow)\" " ..
        	"colspan=3|" .. f)
        table.insert(val, "\n!class=\"outer\" style=\"background-color: var(--wikt-palette-brightyellow)\" " ..
        	"colspan=3|" .. f)
        table.insert(val, "\n|colspan=999 rowspan=19 class=\"blank-end-row\"|")
        for j = 1, 18, 1 do
            table.insert(val, "\n|-\n! colspan=2|" .. p)
            table.insert(val, "\n|colspan=3|" .. link(t, p .. "öv"))
            table.insert(val, "\n|colspan=3|" .. link(t, p .. "öd"))
        end
    end

    verbs(1)

    if intr ~= "yes" then
    	table.insert(val, "\n|-\n|colspan=999 class=\"separator\"|")
        verbs(2)
    end

	table.insert(val, "\n" .. mw.getCurrentFrame():expandTemplate{ title = 'inflection-table-bottom '})

    return table.concat(val)
end


return p