local lang = require("Modül:diller").getirKodaGore("io")
local p = {}
function p.init(frame)
local intr = frame:getParent().args
local pagename = tostring( mw.title:getCurrentTitle() )
local root = string.sub(pagename, 0, -3)
local function link(affix)
return require("Modül:bağlantılar").full_link({lang = lang, term = root .. affix})
end
local t = {"a", "i", "o"}
local val = frame:expandTemplate{
title = 'inflection-table-top',
args = {
title = 'Çekim: <span lang="io" style="font-style:italic;">' .. root .. 'ar',
palette = 'blue',
tall = 'yes',
}
} .. [=[
!colspan=2 class="outer"|]
!colspan=2|şimdiki zaman
!colspan=2|geçmiş zaman
!colspan=2|gelecek zaman]=]
local function threecells(preword, affix, words)
val = val .. "\n|-\n!colspan=2|" .. preword
for i = 1, 3, 1 do
val = val .. "\n|colspan=2|"
if type(affix) == "table" then
if affix == "" then
val = val .. "—"
else
val = val .. link(affix)
end
else
val = val .. link(t .. affix)
end
end
end
local function sixcells(preword, interfix)
val = val .. "\n|-\n!rowspan=2|" .. preword
val = val .. "\n!class=secondary|tekil"
for i = 1, 3, 1 do
val = val .. "\n|colspan=2|" .. link(t .. interfix .. "o")
end
val = val .. "\n|-\n!class=secondary|çoğul"
for i = 1, 3, 1 do
val = val .. "\n|colspan=2|" .. link(t .. interfix .. "i")
end
end
threecells("mastar", "r")
threecells("zaman", "s")
threecells("şart", {"us", "", ""})
threecells("emir", {"ez", "", ""})
threecells("etken ortaç", "nta")
threecells("etken ulaç", "nte")
sixcells("etken<br> eylemlik", "nt")
if intr ~= "yes" then
threecells("edilgen ortaç", "ta")
threecells("edilgen ulaç", "te")
sixcells("edilgen<br>eylemlik", "t")
end
val = val .. '\n' .. frame:expandTemplate{ title = 'inflection-table-bottom' }
return val
end
return p