Module:nn-verb-table

local p = {} local classes = require('Module:nn-verb-classes') local class = {v1 = classes.v1, v2 = classes.v2, v3 = classes.v3, v4 = classes.v4}

function p.section(forms, number, type) numbers = {'first', 'second', 'third'} text = [=[ ! rowspan="7" style="background:#DFDFDF" |]=] .. numbers[number] .. ' inflection (' .. type .. [=[) ! colspan="6" style="background:#DFDFDF" | Inflection in time ! style="background:#DFDFDF" | present tense ! style="background:#DFDFDF" | past tense ! style="background:#DFDFDF" | supine ! style="background:#DFDFDF" | passive infinitive ! style="background:#DFDFDF" | present participle ! style="background:#DFDFDF" | imperative '\n| ' .. forms['past participle'] .. '\n| ' .. forms['passive infinitive'] .. '\n| ' .. forms['present participle'] .. '\n| ' .. forms['imperative'] .. [=[ ! colspan="3" style="background:#DFDFDF" | Inflection of the past participle || style="background:#DFDFDF" rowspan="3" colspan = "3"| ! style="background:#DFDFDF" | masculine and feminine ! style="background:#DFDFDF" | neuter ! style="background:#DFDFDF" | definite singular and plural '\n| ' .. forms['adj def sg and pl'] return text end
 * ]=] .. forms['present tense'] .. '\n| ' .. forms['past tense'] ..
 * ]=] .. forms['present tense'] .. '\n| ' .. forms['past tense'] ..
 * ]=] .. forms['adj f and m'] .. '\n| ' .. forms['adj n'] ..
 * ]=] .. forms['adj f and m'] .. '\n| ' .. forms['adj n'] ..

function p.main(frame) PAGENAME = mw.title.getCurrentTitle.text class1 = frame.args[1] class2 = frame.args[2] class3 = frame.args[3] forms1 = class[class1](PAGENAME) length = PAGENAME:len template = [=[ Complete inflection of '']=] .. PAGENAME .. [=['' {| style="background:#F9F9F9;text-align:center;width:70em" class="inflection-table2"]=] template = template .. p.section(forms1, 1, class1) if class2 and class2 ~= '' then forms2 = class[class2](PAGENAME) template = template .. p.section(forms2, 2, class2) else template = template:gsub('first inflection', 'inflection') end if class3 and class3 ~= '' then forms3 = class[class3](PAGENAME) template = template .. p.section(forms3, 3, class3) end

template = template .. [=[ ! colspan = "2" style="background:#DFDFDF"| Derivations || style="background:#DFDFDF" rowspan="3" colspan = "5"| ! style="background:#DFDFDF" | Verbal noun ! style="background:#DFDFDF" | Agent noun return template end
 * ]=] .. forms1['verbal noun'] .. [=[
 * ]=] .. forms1['agent noun'] .. '\n|}\n '

return p