Module:lus-infl
Jump to navigation
Jump to search
Documentation for this module may be created at Module:lus-infl/documentation
local export = {}
local getArgs = require('Module:Arguments').getArgs
function export.conjugate(args)
local wikiTable = {}
local function add(thing)
table.insert(wikiTable, thing)
end
local function th(content, row, col)
local rowspan = row or 1
local colspan = col or 1
table.insert(wikiTable, "<th rowspan=" .. rowspan .. " colspan=" .. colspan .. ">" .. content .. "</th>")
end
local function td(content, row, col)
local rowspan = row or 1
local colspan = col or 1
table.insert(wikiTable, "<td rowspan=" .. rowspan .. " colspan=" .. colspan .. ">" .. content .. "</td>")
end
local function stress(stem, ending)
end
add("<table class=\"mw-collapsible mw-collapsed wikitable inflection table\" width=80% style=\"text-align: center\">")
th("Conjugation of <i>" .. args[1] .. "</i> ",1,6)
add("<tr>")
th(infinitive,1,2)
th(singular,1,3)
th(plural,2)
add("</tr>")
add("<tr>")
td(args[1],1,2)
th("1")
th("2")
th("3")
add("</tr>")
add("<tr>")
th("participle",3)
th("present")
td(args[3] .. "i",1,4)
add("</tr>")
add("<tr>")
th("past")
td(args[4] or args[1] .. "ul",1,4)
add("</tr>")
--[[
|-
! passive
| colspan="4" | {{{4|{{{1}}}}}}uc
|-
! colspan="2" | conditional
| {{{4|{{{1}}}}}}au
{{#ifeq:{{{4|{{{1}}}}}}|{{{2}}}|<td rowspan=2>{{{4|{{{1}}}}}}a</td>|<td>{{{4|{{{1}}}}}}a</td>}}
| {{{4|{{{1}}}}}}ai
| {{{4|{{{1}}}}}}au
|-
! rowspan="4" | indicative
! present
| {{{2}}}u
{{#ifeq:{{{4|{{{1}}}}}}|{{{2}}}||<td>{{{2}}}a</td>}}
| {{{2}}}i
| {{{2}}}u
|-
! future
| {{{r|{{{4|{{{1}}}}}}}}}riu
| {{{r|{{{4|{{{1}}}}}}}}}ria
| {{{r|{{{4|{{{1}}}}}}}}}ri
| {{{4|{{{1}}}}}}uri
|-
! imperfect
| {{{i|{{{4|{{{1}}}}}}}}}iū
| {{{i|{{{4|{{{1}}}}}}}}}iun
| {{{i|{{{4|{{{1}}}}}}}}}iui
| {{{i|{{{4|{{{1}}}}}}}}}iū
|-
! aorist
| rowspan="2" | {{{i|{{{4|{{{1}}}}}}}}}iu
| rowspan="2" | {{{i|{{{4|{{{1}}}}}}}}}ia
| rowspan="2" | {{{i|{{{4|{{{1}}}}}}}}}ì
| rowspan="2" | {{{i|{{{4|{{{1}}}}}}}}}iu
|-
! colspan="2" | subjunctive
|-
! colspan="6" | negative forms
|-
! colspan="2" | infintive
! colspan="3" | singular
! rowspan="2" | plural
|-
| colspan="2" | {{{t|{{{1}}}}}}ta
! 1
! 2
! 3
|-
! rowspan="3" | participle
! present
| colspan="4" | {{{t|{{{1}}}}}}tai
|-
! past
| colspan="4" | {{{t|{{{1}}}}}}taul
|-
! passive
| colspan="4" | {{{t|{{{1}}}}}}tauc
|-
! colspan="2" | conditional
| rowspan="2" | {{{t|{{{1}}}}}}tau
| rowspan="2" | {{{t|{{{1}}}}}}tā
| rowspan="2" | {{{t|{{{1}}}}}}tai
| rowspan="2" | {{{t|{{{1}}}}}}tau
|-
! rowspan="4" | indicative
! present
|-
! future
| {{{t|{{{1}}}}}}tariu
| {{{t|{{{1}}}}}}taria
| {{{t|{{{1}}}}}}tari
| {{{t|{{{1}}}}}}tauri
|-
! imperfect
| {{{t|{{{1}}}}}}tùiū
| {{{t|{{{1}}}}}}tùiun
| {{{t|{{{1}}}}}}tùiui
| {{{t|{{{1}}}}}}tùiū
|-
! aorist
| {{{t|{{{1}}}}}}tùiu
| {{{t|{{{1}}}}}}tùia
| {{{t|{{{1}}}}}}tùì
| {{{t|{{{1}}}}}}tùiu
|-
! colspan="2" | subjunctive
| {{{t|{{{1}}}}}}taiu
| {{{t|{{{1}}}}}}taia
| {{{t|{{{1}}}}}}taì
| {{{t|{{{1}}}}}}taiu
|}
]]--
add("</table>")
return table.concat(wikiTable)
end
return export
--[[
Debug console test string:
=p.getStem(mw.getCurrentFrame():newChild{title="whatever",args={"noun", "nom", "dv", "a^u", "n", "þ"}})
]]--