local export = {}
local full_link = require("Module:links").full_link
local lang = require("Module:languages").getByCode("otk")
local sc = require("Module:scripts").getByCode("Orkh")
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
|-
! dative
| %s
| %s
|-
! accusative
| %s
| %s
|-
! locative
| %s
| %s
|-
! ablative
| %s
| %s
|-
! instrumental
| %s
| %s
|-
! equative
| %s
|
|-
! directive
| %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((f and (lemma .. "π° π°Ό")) or (lemma .. "π°π°Ί")), -- nominative 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
link(f and (lemma .. "π° π°Όπ°") or (lemma .. "π°π°Ίπ°")), -- accusative plural
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(f and (c and (a and (lemma .. "π°π°€") or (lemma .. "π°π°€")) or (lemma .. "π°€")) or (c and (a and (lemma .. "π°π°£") or (lemma .. "π°π°£")) or (lemma .. "π°£"))), -- instrumental singular
link(f and (lemma .. "π° π°Όπ°€") or (lemma .. "π°π°Ίπ°£")), -- instrumental plural
link(lemma .. "π°²π°"), -- equative singular
link(f and (lemma .. "π°π°Όπ°") or (lemma .. "π°π°Ίπ°")), -- directive singular 1
link(f and (lemma .. "π° π°π°") or (lemma .. "π°π°π°")) -- similative singular
)
end
return export