Module:io-conj

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

local p = {}

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

function p.conj(root, intr)
    local function link(affix)
        return require("Module:links").full_link({lang = lang, term = root .. affix})
    end
    local t = {"a", "i", "o"}
    local val = [=[<div class="NavFrame" style="max-width: 40em;">
<div class="NavHead">&nbsp; &nbsp; Conjugation of <span lang="io" style="font-style:italic;">]=] .. root .. [=[ar</span></div>
<div class="NavContent" style="overflow:auto">
{| style="background-color:#F9F9F9;border-collapse:separate;border-spacing:2px;width:100%" class="inflection-table"
|-
|style="background-color:#c8dfef;" colspan=2|]
!style="background-color:#c8dfef;" colspan=2|present
!style="background-color:#c8dfef;" colspan=2|past
!style="background-color:#c8dfef;" colspan=2|future]=]
    local function threecells(preword, affix, words)
        val = val .. "\n|-\n!style=\"background-color:#c8dfef;\" colspan=2|" .. preword

        for i = 1, 3, 1 do
            val = val .. "\n|style=\"background-color:#F9F9F9;\" colspan=2|"

            if type(affix) == "table" then
                if affix ~= "" then
                    val = val .. link(affix)
                end
            else
                val = val .. link(t .. affix)
            end
        end
    end

    local function sixcells(preword, interfix)
        val = val .. "\n|-\n!style=\"background-color:#c8dfef;\" rowspan=2|" .. preword

        val = val .. "\n!style=\"background-color:#c8dfef;\"|singular"
        for i = 1, 3, 1 do
            val = val .. "\n|style=\"background-color:#F9F9F9;\" colspan=2|" .. link(t .. interfix .. "o")
        end

        val = val .. "\n|-\n!style=\"background-color:#c8dfef;\"|plural"
        for i = 1, 3, 1 do
            val = val .. "\n|style=\"background-color:#F9F9F9;\" colspan=2|" .. link(t .. interfix .. "i")
        end
    end

    threecells("infinitive", "r")
    threecells("tense", "s")
    threecells("conditional", {"us", "", ""})
    threecells("imperative", {"ez", "", ""})
    threecells("adjective active participle", "nta")
    threecells("adverbial active participle", "nte")
    sixcells("nominal active participle", "nt")
    if intr ~= "yes" then threecells("adjective passive participle", "ta") end
    if intr ~= "yes" then threecells("adverbial passive participle", "te") end
    if intr ~= "yes" then sixcells("nominal passive participle", "t") end

val = val .. [=[

|}
</div></div>]=]

    return val
end

return p