1,849
edits
Lëtzelúcia (talk | contribs) No edit summary |
Lëtzelúcia (talk | contribs) No edit summary |
||
| Line 177: | Line 177: | ||
return data.forms[key] or "—" | return data.forms[key] or "—" | ||
end | end | ||
local case_order = {"dative", "genitive", "accusative", "nominative"} | |||
local out = {} | local out = {} | ||
table.insert(out, '{| class="wikitable" | -- Table start with styled header row: dark gray background, white text | ||
table.insert(out, '{| class="wikitable" style="border-collapse:collapse; width: 40%;"') | |||
table.insert(out, '! style="background:#444; color:white; padding:4px;" | Case') | |||
table.insert(out, '! style="background:#444; color:white; padding:4px;" | Singular') | |||
table.insert(out, '! style="background:#444; color:white; padding:4px;" | Plural') | |||
for case | for _, case in ipairs(case_order) do | ||
table.insert(out, string.format('|-\n| %s || %s || %s', | local case_name = cases[case].link:gsub("''", "") -- Remove italics to style ourselves | ||
-- Case name column with light gray background, forms with white background | |||
table.insert(out, string.format('|-\n| style="background:#ddd; padding:4px;" | %s || style="background:#fff; padding:4px;" | %s || style="background:#fff; padding:4px;" | %s', | |||
case_name, showForm(case, "sg"), showForm(case, "pl"))) | |||
end | end | ||
table.insert(out, '|}') | table.insert(out, '|}') | ||
return table.concat(out, '\n') | return table.concat(out, '\n') | ||
end | end | ||
return export | return export | ||