Module:qhv-noun: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 127: Line 127:
for _, case in ipairs(cases) do
for _, case in ipairs(cases) do
local case_short = sub(case, 1, 3)
local case_short = sub(case, 1, 3)
table.insert(ret, "|- \n! class=\"case-header\" | " .. case .. "\n")
table.insert(ret, "|- \n! style=\"font-style: italic; background-color: #40E0D0;\" | " .. case .. "\n")
table.insert(ret, "| class=\"form-cell\" | " .. show_form(pass.forms[case_short .. "_sg"]) .. "\n")
table.insert(ret, "| style=\"background-color: #F8F8FF;\" | " .. show_form(pass.forms[case_short .. "_sg"]) .. "\n")
if pass.forms[case_short .. "_pl"] or pass.forms[case_short .. "_pa"] or pass.forms[case_short .. "_co"] then
if pass.forms[case_short .. "_pl"] or pass.forms[case_short .. "_pa"] or pass.forms[case_short .. "_co"] then
table.insert(ret, "| class=\"form-cell\" | " .. show_form(pass.forms[case_short .. "_pl"]) .. "\n")
table.insert(ret, "| style=\"background-color: #F8F8FF;\" | " .. show_form(pass.forms[case_short .. "_pl"]) .. "\n")
table.insert(ret, "| class=\"form-cell\" | " .. show_form(pass.forms[case_short .. "_pa"]) .. "\n")
table.insert(ret, "| style=\"background-color: #F8F8FF;\" | " .. show_form(pass.forms[case_short .. "_pa"]) .. "\n")
table.insert(ret, "| class=\"form-cell\" | " .. show_form(pass.forms[case_short .. "_co"]) .. "\n")
table.insert(ret, "| style=\"background-color: #F8F8FF;\" | " .. show_form(pass.forms[case_short .. "_co"]) .. "\n")
end
end
end
end
Line 142: Line 142:
local wikicode = [=[
local wikicode = [=[
{| class="prettytable mw-collapsible inflection-table-qhv"
{| class="prettytable mw-collapsible"
|-
|-
! class="corner-header" | Case
! style="font-style: italic; background-color: #549EA0;" | Case
! class="number-header" | Singular]=] .. (no_plural and "\n" or [=[
! style="font-style: italic; background-color: #549EA0;" | Singular]=] .. (no_plural and "\n" or [=[


! class="number-header" | Plural
! style="font-style: italic; background-color: #549EA0;" | Plural
! class="number-header" | Paucal
! style="font-style: italic; background-color: #549EA0;" | Paucal
! class="number-header" | Collective
! style="font-style: italic; background-color: #549EA0;" | Collective
]=]) .. make_cases(pass) .. [=[
]=]) .. make_cases(pass) .. [=[
|}]=]
|}]=]

Navigation menu