Module:qay-verb: Difference between revisions

No edit summary
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 20: Line 20:
if word:match("a$") then
if word:match("a$") then
return "a", {word}
return "a", {word}
elseif word:match("[eiou]$") or word:match("[eiou]y") then
elseif word:match("[eiou]$") or word:match("[aeiou]y$") then
return "v", {word}
return "v", {word}
elseif word:match("[ptkbdgmncvshrlj][ptkbdgmncvshrlj]") then
elseif word:match("[ptkbdgmncvshrlj][sv]$") or word:match("ng$") then
return "c", {word}
elseif word:match("[ptkbdgmncvshrlj][ptkbdgmncvshrlj]$") then
return "2c", {word}
return "2c", {word}
else
else
Line 129: Line 131:
local genders = {"m", "f", "n", "in"}
local genders = {"m", "f", "n", "in"}
local columns = {"top", "cli"}
local columns = {"top", "cli"}
local others = {"imperative", "hortative", "iterative", "participle"}
local ret = {}
local ret = {}
for _, num in ipairs(numbers) do
for _, num in ipairs(numbers) do
table.insert(ret, '\n|-\n ! style="background-color:#4848B7; color:white; width: 15%" rowspan=6 | ' .. (num == "s" and "Singular" or "Plural"))
table.insert(ret, '\n|-\n ! style="background-color:#4848B7; color:white; width: 10%" rowspan=6 | ' .. (num == "s" and "Singular" or "Plural"))
for _, person in ipairs(persons) do
for _, person in ipairs(persons) do
if person == "3" then
if person == "3" then
Line 148: Line 151:
end
end
end
end
table.insert(ret, '\n|- style="border-top: double"\n')
for _, other in ipairs(others) do
table.insert(ret, '! style="background-color:#000080; color:white" colspan=3 | ' .. other .. '\n')
table.insert(ret, '| colspan=2 | ' .. link(show_form(data.forms[other])) .. '\n|-\n')
end
return table.concat(ret)
return table.concat(ret)
end
end


local navframe = [=[
local navframe = [=[
<div class="mw-collapsible" style="border-collapse: collapse; margin: 0px 0px -1px 0px; padding: 2px; border: 1px solid #aaaaaa; text-align: center; font-size: 95%; overflow: auto; width: 55%;">
<div class="mw-collapsible" style="border-collapse: collapse; margin: 0px 0px -1px 0px; padding: 2px; border: 1px solid #aaaaaa; text-align: center; font-size: 95%; overflow: auto; width: 40%;">
<div style="min-height: 1.6em; font-weight:bold; font-size: 100%; text-align: left; background-color:#efefef; padding-left: 10px; background-image: -webkit-gradient(linear, left top, left bottom, from(#EFEFEF), to(#DFDFDF), color-stop(0.6, #E3E3E3)); background-image: -moz-linear-gradient(top, #EFEFEF, #E3E3E3 60%, #DFDFDF);  background-image: -o-linear-gradient(top, #EFEFEF, #E3E3E3 60%, #DFDFDF);">''no-'' — verb (vocalic)</div>
<div style="min-height: 1.6em; font-weight:bold; font-size: 100%; text-align: left; background-color:#efefef; padding-left: 10px; background-image: -webkit-gradient(linear, left top, left bottom, from(#EFEFEF), to(#DFDFDF), color-stop(0.6, #E3E3E3)); background-image: -moz-linear-gradient(top, #EFEFEF, #E3E3E3 60%, #DFDFDF);  background-image: -o-linear-gradient(top, #EFEFEF, #E3E3E3 60%, #DFDFDF);">''{{{pagename}}}'' — verb ({{{decl_type}}})</div>
<div class="mw-collapsible-content" style="font-size: 100%;">
<div class="mw-collapsible-content" style="font-size: 100%;">
]=]
]=]
Line 160: Line 169:
{| border="1px solid #d0d0d0" style="border-collapse:collapse; background:#F9F9FF; text-align:center; width:100%" cellspacing="1" cellpadding="2"
{| border="1px solid #d0d0d0" style="border-collapse:collapse; background:#F9F9FF; text-align:center; width:100%" cellspacing="1" cellpadding="2"
|- style="background-color:#000080; color:white"
|- style="background-color:#000080; color:white"
!  &nbsp; !! colspan="2" style="width:20%" | Person !! Topicalized !! Clitic agent
!  &nbsp; !! colspan="2" style="width:15%" | Person !! Topicalized !! Clitic agent
]=] .. make_forms(data) .. [=[
]=] .. make_forms(data) .. [=[
|}</div></div>]=]
|}</div></div>]=]