Module:qhv-verb: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 138: Line 138:
  {"prf", "perfect"}, {"plu", "pluperfect"}, {"hab", "past habitual"}}
  {"prf", "perfect"}, {"plu", "pluperfect"}, {"hab", "past habitual"}}
for _, mood in ipairs(moods) do
for _, mood in ipairs(moods) do
table.insert(ret, "|-\n! rowspan='8' style='background: #7AB350; width: 7em' | " .. mood[2] .. "\n")
table.insert(ret, "|-\n! rowspan='8' style='background: #7AB350; width: 7em' | " .. mood[2] .. "\n")
for _, tense in ipairs(tenses) do
for _, tense in ipairs(tenses) do
table.insert(ret, "|-\n! style='background: #ADE981; width: 7em' | " .. tense[2] .. "\n")
table.insert(ret, "|-\n! style='background: #ADE981; width: 7em' | " .. tense[2] .. "\n")
for _, number in ipairs({"sg", "pl"}) do
for _, number in ipairs({"sg", "pl"}) do
for i=1, 3 do
for i=1, 3 do
table.insert(ret, "| " .. link(show_form(data.forms[(match(mode, "%s(.*)$") == "active" and "act" or "pas") .. "_" .. mood[1] .. "_" .. tense[1] .. "_" .. tostring(i) .. number])) .. "\n")
table.insert(ret, "| " .. link(show_form(data.forms[(match(mode, "%s(.*)$") == "active" and "act" or "pas") .. "_" .. mood[1] .. "_" .. tense[1] .. "_" .. tostring(i) .. number])) .. "\n")
if (tense[1] == "hab") and (i == 3) and (number == "pl") then table.insert(ret, "|-\n! style='background:#808080; height:.2em' colspan='9' |\n") end
if (tense[1] == "hab") and (i == 3) and (number == "pl") then table.insert(ret, "|-\n! style='background:#808080; height:.2em' colspan='9' |\n") end
end
end
end
end
end
end
end
end
else  
else  
tenses = {{"prs", "present"}, {"aor", "aorist"}, {"fut", "future"}, {"prf", "perfect"}, {"hab", "past habitual"}}
for _, tense in ipairs(tenses) do
table.insert(ret, "|-\n! style='background: #ADE981; width: 7em' | " .. tense[2] .. "\n")
for _, form in ipairs({"inf", "part"}) do
table.insert(ret, "| " .. link(show_form(data.forms[(match(mode, "%s(.*)$") == "active" and "act" or "pas") .. "_" .. form .. "_" .. tense[1]])) .. "\n")
end
end
end
end
return table.concat(ret)
return table.concat(ret)