This module uses three parameters, frontness, roundedness and coda value.
Consider these examples if you are confused:
{{oui-decl|f|a|C}}
.{{oui-decl|f|a|V}}
.{{oui-decl|f|u|C}}
.{{oui-decl|f|u|V}}
.{{oui-decl|b|a|C}}
.{{oui-decl|b|a|V}}
.{{oui-decl|b|u|C}}
.{{oui-decl|b|u|V}}
.local export = {}
local full_link = require("Module:links").full_link
local lang = require("Module:languages").getByCode("oui")
local sc = require("Module:scripts").getByCode("Ougr")
local function link(term, tr)
return full_link({
term = term,
lang = lang,
sc = sc,
tr = tr
})
end
local wikicode = mw.getCurrentFrame():expandTemplate {
title = 'inflection-table-top',
args = {
title = 'Declension of %s',
palette = 'grey',
tall = 'yes',
class = "tr-alongside"
}
}
wikicode = wikicode .. [=[
!
! singular
! definite plural
|-
! nominative
| %s
| %s
|-
! genitive
| %s
| %s
|-
! dative
| %s
| %s
|-
! accusative
| %s, %s
| %s, %s
|-
! locative
| %s
| %s
|-
! ablative
| %s
| %s
|-
! instrumental
| %s
| %s
|-
! equative
| %s
|
|-
! directive
| %s, %s
|
|-
! similative
| %s
|
]=]
wikicode = wikicode .. mw.getCurrentFrame():expandTemplate {
title = 'inflection-table-bottom',
}
function export.show(frame)
local params = {
= { required = true },
= { required = true },
= { required = true },
= {},
= {},
}
local args = require("Module:parameters").process(frame:getParent().args, params, nil)
local lemma = args.pagename or mw.loadData("Module:headword/data").pagename
local f = args:lower() == "f" -- "f" (front) or "b" (back)
local a = args:lower() == "a" -- "a" or "u"
local c = args:lower() == "c" -- "c" (consonant) or "v" (vowel)
local tr = args
return string.format(wikicode,
link(lemma, "-"), -- title
link(lemma), -- nominative singular
link(lemma .. "𐾁𐽰𐽾"), -- nominative plural
link((a and (lemma .. "𐽺𐽶𐽺𐽷")) or (lemma .. "𐽺𐽳𐽺𐽷")), -- genitive singular
link(lemma .. "𐾁𐽰𐽾𐽺𐽶𐽺𐽷"), -- genitive plural
link(f and (lemma .. "𐽷𐽰") or (lemma .. "𐽲𐽰")), -- dative singular
link(f and (lemma .. "𐾁𐽰𐽾𐽷𐽰") or (lemma .. "𐾁𐽰𐽾𐽲𐽰")), -- dative plural
link(f and (c and (a and (lemma .. "𐽶𐽷") or (lemma .. "𐽳𐽷")) or (lemma .. "𐽷")) or (c and (a and (lemma .. "𐽶𐽲") or (lemma .. "𐽳𐽲")) or (lemma .. "𐽲"))), -- accusative singular 1
link(lemma .. "𐽺𐽶"), -- accusative singular 2
link(f and (lemma .. "𐾁𐽰𐽾𐽶𐽷") or (lemma .. "𐾁𐽰𐽾𐽶𐽲")), -- accusative plural 1
link(lemma .. "𐾁𐽰𐽾𐽺𐽶"), -- accusative plural 2
link(f and (lemma .. "𐽸𐽰") or (lemma .. "𐾀𐽰")), -- locative singular
link(f and (lemma .. "𐾁𐽰𐽾𐽸𐽰") or (lemma .. "𐾁𐽰𐽾𐾀𐽰")), -- locative plural
link(f and (lemma .. "𐽸𐽶𐽺") or (lemma .. "𐾀𐽶𐽺")), -- ablative singular
link(f and (lemma .. "𐾁𐽰𐽾𐽸𐽶𐽺") or (lemma .. "𐾁𐽰𐽾𐾀𐽶𐽺")), -- ablative plural
link((c and (a and (lemma .. "𐽶𐽺") or (lemma .. "𐽳𐽺"))) or (lemma .. "𐽺")), -- instrumental singular
link(lemma .. "𐾁𐽰𐽾𐽶𐽺"), -- instrumental plural
link(lemma .. "𐽽𐽰"), -- equative singular
link(f and (lemma .. "𐽷𐽰𐽾𐽳") or (lemma .. "𐽲𐽰𐽾𐽳")), -- directive singular 1
link(lemma .. "𐽾𐽰"), -- directive singular 2
link(lemma .. "𐾁𐽰𐽶𐽳") -- similative singular
)
end
return export