มอดูล:eo-conj
หน้าตา
- The following documentation is located at มอดูล:eo-conj/documentation. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
local p = {}
function p.init(frame)
local intr = frame:getParent().args["intr"]
local pagename = tostring( mw.title:getCurrentTitle() )
local root = string.sub(pagename, 0, -2)
return p.conj(root, intr)
end
function p.conj(root, intr)
local function link(affix)
return "<span class=\"form-of " .. affix .. "-form-of lang-eo\" lang=\"eo\">[[" .. root .. affix .. "#ภาษาเอสเปรันโต|" .. root .. affix .. "]]</span>"
end
local function row(r)
return ""
end
local t = {"a", "i", "o"}
local val = [=[{| width="100%"
|-
| ||<div class="NavFrame">
<div class="NavHead" style="background:#e2f6e2;">การผันรูปของ <span lang="eo">]=] .. root .. [=[i</span></div>
<div class="NavContent">
{| border="1" cellpadding="5" style="border-bottom:2; border-collapse:collapse" width=100% class="inflection-table" align="center"
|-
|rowspan=2 colspan=2|[[Image:Esperanto star.svg|30px|link=|alt=]]
!bgcolor="#B0E0B0" colspan=2|ปัจจุบันกาล
!bgcolor="#B0E0B0" colspan=2|อดีตกาล
!bgcolor="#B0E0B0" colspan=2|อนาคตกาล
|-
|bgcolor="#B0E0B0"|เอกพจน์
|bgcolor="#B0E0B0"|พหูพจน์
|bgcolor="#B0E0B0"|เอกพจน์
|bgcolor="#B0E0B0"|พหูพจน์
|bgcolor="#B0E0B0"|เอกพจน์
|bgcolor="#B0E0B0"|พหูพจน์]=]
local function threecells(preword, affix)
val = val .. "\n|-\n!bgcolor=\"#B0E0B0\" colspan=2| " .. preword
for i = 1, 3, 1 do
val = val .. "\n|bgcolor=\"#F0F0F0\" colspan=2|" .. link(t[i] .. affix)
end
end
threecells("กาล", "s")
for i = 1, 8, 1 do
if ( i - 1 ) % 4 < 2 or intr ~= "yes" then
local act = ( i - 1 ) % 4 > 1 and "" or "n"
local nom = i > 4 and "o" or "a"
local acc = ""
if i % 2 == 0 then
acc = "n"
val = val .. "\n|-\n|bgcolor=\"#B0E0B0\"| <span title=\"accusative\">กรรมการก</span>"
else
val = val .. "\n|-\n!bgcolor=\"#B0E0B0\" rowspan=2| "
val = val .. "พาร์ทิซิเพิล"
if i > 4 then val = val .. "เชิงนาม" end
if act == "" then val = val .. "กรรมวาจก" else val = val .. "กรรตุวาจก" end
val = val .. "\n!bgcolor=\"#B0E0B0\"|"
end
for ii = 1, 6, 1 do
val = val .. "\n|bgcolor=\"#F0F0F0\"|" .. link( t[ math.ceil( ii / 2 ) ] .. act .. "t" .. nom .. (ii % 2 == 0 and "j" or "") .. acc )
end
end
end
threecells("พาร์ทิซิเพิลเชิงกริยาวิเศษณ์กรรตุวาจก", "nte")
if intr ~= "yes" then threecells("พาร์ทิซิเพิลเชิงกริยาวิเศษณ์กรรมวาจก", "te") end
val = val .. [=[
|}
{| width=100% border=1 style="border-collapse:collapse" class="inflection-table"
|-
!bgcolor="#B0E0B0" colspan=2 width=16.66%| infinitive
|colspan="6" bgcolor="#F0F0F0" width=16.66%| <span lang="eo">''']=] .. root .. [=[i'''</span>
!bgcolor="#B0E0B0" colspan=2 width=16.66%| imperative
|colspan="6" bgcolor="#F0F0F0" width=16.66%| ]=] .. link("u") .. [=[
!bgcolor="#B0E0B0" colspan=2 width=16.66%| conditional
|colspan="6" bgcolor="#F0F0F0" width=16.66%| ]=] .. link("us") .. [=[
|}
</div></div>
|}]=]
return val
end
return p