Jump to content

Module:nov-conj

From Wiktionary, the free dictionary

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

local p = {}

function p.init(frame)
    local intr = frame:getParent().args["intr"]
    local pagename = tostring( mw.title:getCurrentTitle().subpageText )
    if intr == "yes" then
        return p.conj2(pagename,intr)
    else
        return p.conj(pagename,intr)
    end
end

function p.conj(root,intr)
    local val = [=[<div class="NavFrame">
<div class="NavHead" align=center>&nbsp; &nbsp; Conjugation of ]=] .. root .. [=[</div>
<div class="NavContent">
{| class="wikitable"
|-
! ''Tense'' || ''Active'' || ''Passive''
|-
! ''Present'' 
| me ]=] .. root .. [=[ || me bli ]=] .. root .. [=[ 
|-
! ''Past'' 
| me ]=] .. root .. [=[d (did ]=] .. root .. [=[) || me blid ]=] .. root .. [=[ 
|-
! ''Perfect'' 
| me ha ]=] .. root .. [=[ || me ha bli ]=] .. root .. [=[ 
|-
! ''Pluperfect'' 
| me had ]=] .. root .. [=[ || me had bli ]=] .. root .. [=[ 
|-
! ''Future'' 
| me sal ]=] .. root .. [=[ || me sal bli ]=] .. root .. [=[ 
|-
! ''Future perfect'' 
| me sal ha ]=] .. root .. [=[ || me sal ha bli ]=] .. root .. [=[ 
|-
! ''Present conditional'' 
| me vud ]=] .. root .. [=[ || me vud bli ]=] .. root .. [=[ 
|-
! ''Perfect conditional'' 
| me vud ha ]=] .. root .. [=[ || me vud ha bli ]=] .. root .. [=[ 
|}
''Note'': the pronoun "me" can be replaced by any other Novial pronoun, ''ceteris paribus''.</div></div>]=]
    
    return val
end

function p.conj2(root,intr)
    local val = [=[<div class="NavFrame">
<div class="NavHead" align=center>&nbsp; &nbsp; Conjugation of ]=] .. root .. [=[</div>
<div class="NavContent">
{| class="wikitable"
|-
! ''Tense'' || ''Active''
|-
! ''Present'' 
| me ]=] .. root .. [=[ 
|-
! ''Past'' 
| me ]=] .. root .. [=[d (did ]=] .. root .. [=[) 
|-
! ''Perfect'' 
| me ha ]=] .. root .. [=[ 
|-
! ''Pluperfect'' 
| me had ]=] .. root .. [=[ 
|-
! ''Future'' 
| me sal ]=] .. root .. [=[ 
|-
! ''Future perfect'' 
| me sal ha ]=] .. root .. [=[ 
|-
! ''Present conditional'' 
| me vud ]=] .. root .. [=[ 
|-
! ''Perfect conditional'' 
| me vud ha ]=] .. root .. [=[ 
|}
''Note'': the pronoun "me" can be replaced by any other Novial pronoun, ''ceteris paribus''.</div></div>]=]
    
    return val
end

return p