Module:qlu-nouns: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 176: Line 176:
local key = cases[case].short_form .. "-" .. number
local key = cases[case].short_form .. "-" .. number
return data.forms[key] or "—"
return data.forms[key] or "—"
end
local function small(text)
return frame:preprocess("{{small|" .. text .. "}}")
end
end


Line 186: Line 190:
table.insert(out, '|-')
table.insert(out, '|-')
table.insert(out, '! rowspan=4 | Singular')
table.insert(out, '! rowspan=4 | Singular')
table.insert(out, '! {{small|nom.}} || ' .. showForm("nominative", "sg"))
table.insert(out, '! ' .. small("nom.") .. ' || ' .. showForm("nominative", "sg"))
table.insert(out, '|-')
table.insert(out, '|-')
table.insert(out, '! {{small|acc.}} || ' .. showForm("accusative", "sg"))
table.insert(out, '! ' .. small("acc.") .. ' || ' .. showForm("accusative", "sg"))
table.insert(out, '|-')
table.insert(out, '|-')
table.insert(out, '! {{small|dat.}} || ' .. showForm("dative", "sg"))
table.insert(out, '! ' .. small("dat.") .. ' || ' .. showForm("dative", "sg"))
table.insert(out, '|-')
table.insert(out, '|-')
table.insert(out, '! {{small|gen.}} || ' .. showForm("genitive", "sg"))
table.insert(out, '! ' .. small("gen.") .. ' || ' .. showForm("genitive", "sg"))


-- Plural rows
-- Plural rows
table.insert(out, '|-')
table.insert(out, '|-')
table.insert(out, '! rowspan=4 | Plural')
table.insert(out, '! rowspan=4 | Plural')
table.insert(out, '! {{small|nom.}} || ' .. showForm("nominative", "pl"))
table.insert(out, '! ' .. small("nom.") .. ' || ' .. showForm("nominative", "pl"))
table.insert(out, '|-')
table.insert(out, '|-')
table.insert(out, '! {{small|acc.}} || ' .. showForm("accusative", "pl"))
table.insert(out, '! ' .. small("acc.") .. ' || ' .. showForm("accusative", "pl"))
table.insert(out, '|-')
table.insert(out, '|-')
table.insert(out, '! {{small|dat.}} || ' .. showForm("dative", "pl"))
table.insert(out, '! ' .. small("dat.") .. ' || ' .. showForm("dative", "pl"))
table.insert(out, '|-')
table.insert(out, '|-')
table.insert(out, '! {{small|gen.}} || ' .. showForm("genitive", "pl"))
table.insert(out, '! ' .. small("gen.") .. ' || ' .. showForm("genitive", "pl"))


table.insert(out, '|}')
table.insert(out, '|}')
1,849

edits

Navigation menu