Module:rad-stem/templates: Difference between revisions

m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 30: Line 30:
function th(data, rowspan, colspan)
function th(data, rowspan, colspan)
data = data or ""
local to_add = "<th"
local to_add = "<th"
if rowspan and rowspan~=1 then to_add = to_add .. " rowspan=" .. rowspan end
if rowspan and rowspan~=1 then to_add = to_add .. " rowspan=" .. rowspan end
Line 38: Line 39:


function td(data, rowspan, colspan)
function td(data, rowspan, colspan)
data = data or ""
local to_add = "<td"
local to_add = "<td"
if rowspan and rowspan~=1 then to_add = to_add .. " rowspan=" .. rowspan end
if rowspan and rowspan~=1 then to_add = to_add .. " rowspan=" .. rowspan end
Line 486: Line 488:
local function get_forms(stem, ending)
local function get_forms(stem, ending)
local temp = {}
ending = ending or ""
ending = ending or ""
if type(stem) == "table" then
if type(stem) == "table" then
for i,_ in ipairs(stem) do
for i, form in ipairs(stem) do
stem[i]['word'] = stem[i]['word'] .. ending
temp[i] = {['word'] = form['word'] .. ending, ['note'] = form['note']}
end
end
return rad_link_IPA(stem)
elseif type(stem) == "string" then
elseif type(stem) == "string" then
return rad_link_IPA(stem .. ending)
temp = stem .. ending
end
end
return rad_link_IPA(temp)
end
end
add("<small>")
add("<small>")
if table_type == "intr" or table_type == "tr" then
if table_type == "intr" or table_type == "tr" then
local cite = ""
if (type(pp.inf) == "table") then cite = pp['inf'][1]['word'] else cite = pp.inf end
add("<table class=\"mw-collapsible mw-collapsed wikitable inflection table\" width=100% style=\"text-align: center\">")
add("<table class=\"mw-collapsible mw-collapsed wikitable inflection table\" width=100% style=\"text-align: center\">")
tr()
tr()
th("Conjugation of ''" .. pp['inf'][1]['word'] .. "'' (active voice) &nbsp;", 1, 14)
th("Conjugation of ''" .. cite .. "'' (active voice) &nbsp;", 1, 14)
_tr()
_tr()
th("nonfinite forms", 1, 14)
th("nonfinite forms", 1, 14)
_tr()
_tr()
th("infinitive", 1, 3)
th("infinitive", 1, 3)
td(get_forms(pp.inf))
td(get_forms(pp.inf), 1, 11)
_tr()
_tr()
th("connegative", 1, 3)
th("connegative", 1, 3)
if pp['inf'][1]['word'] == "vat" or pp['inf'][1]['word'] == "hjeat" then
if cite == "vat" or cite == "hjeat" then
th("", 1, 11)
th("", 1, 11)
else
else
Line 536: Line 541:
th("verbal noun", 1, 3)
th("verbal noun", 1, 3)
td(get_forms(pp.vnoun), 1, 11)
td(get_forms(pp.vnoun), 1, 11)
_tr()
th("finite forms", 4, 3)
th("singular", 1, 5)
th("plural", 1, 5)
th("humble")
_tr()
th("first", 2, 1)
th("second", 1, 2)
th("third", 2, 1)
th("depersonal", 2, 1)
th("first", 1, 2)
th("second", 2, 1)
th("third", 2, 1)
th("depersonal", 2, 1)
th("second", 2, 1)
_tr()
th("informal")
th("formal")
th("inclusive")
th("exclusive")
_tr()
th("''" .. rad_link("ú") .. "''")
th("''" .. rad_link("re") .. "''")
th("''" .. rad_link("lește") .. "''")
th("''" .. rad_link("vâs") .. ", " .. rad_link("vara") .. "''")
th("''" .. rad_link("gjei") .. ", " .. rad_link("gjen") .. ", " .. rad_link("gjeș") .. "''")
th("''" .. rad_link("dzun") .. ", " .. rad_link("sted") .. "''")
th("''" .. rad_link("dzate") .. "''")
th("''" .. rad_link("sjáște") .. "''")
th("''" .. rad_link("vír") .. ", " .. rad_link("vara") .. "''")
th("''" .. rad_link("gjes") .. ", " .. rad_link("gjete") .. ", " .. rad_link("gje") .. ", " .. rad_link("gjen") .. "''")
th("''" .. rad_link("sja") .. ", " .. rad_link("lai") .. "''")
_tr()
th("simple", 7, 1)
th("imperative", 1, 2)
th()
if pp.imp == pp.a then
td(get_forms(pp.a), 2, 1)
else
td(get_forms(pp.imp))
end
td(get_forms(pp['2s'],"úș"))
th("", 1, 2)
td(get_forms(pp.pl,"uoș"))
th()
td(get_forms(pp.o,"vú"))
th("", 1, 2)
td(get_forms(pp.pl,"úr"))
--[[
--[[
|-
! colspan="3" | verbal noun
=p.conjugate(mw.getCurrentFrame():newChild{title="whatever",args={"deat","de",["pl"]="di","diș","deti","dev",["t"]="intr",["altnonfin"]="hellu",["altnonfin_note"]="uwu",["altnonfin2"]="hella",["altnonfin2_note"]="owo"}})
| colspan="11" | {{wl-rad-IPA|{{{6|{{{5}}}aș}}}}}
|-
! rowspan="4" colspan="3" | finite forms
! colspan="5" | singular
! colspan="5" | plural
! humble
|-
! rowspan="2" | first
! colspan="2" | second
! rowspan="2" | third
! rowspan="2" | depersonal
! colspan="2" | first
! rowspan="2" | second
! rowspan="2" | third
! rowspan="2" | depersonal
! rowspan="2" | second
|-
! informal
! formal
! inclusive
! exclusive
|-
! ''ú''
! ''re''
! ''lește''
! ''vâs'', ''vara''
! ''gjei, gjen, gjeș …''
! ''dzun'', ''sted''
! ''dzate''
! ''sjáște''
! ''vír'', ''vara''
! ''gjes, gjete, gje, gjen …''
! ''sja'', ''lair''
|-
! rowspan="7" | simple
! colspan="2" | imperative
!
| {{#ifeq: {{{imp|{{{a|{{{depers|{{{2}}}}}}a}}}}}}|{{{a|{{{2}}}a}}}|rowspan="2" {{!}}|}} {{wl-rad-IPA|{{{imp|{{{a|{{{depers|{{{2}}}}}}a}}}}}}}}
| {{wl-rad-IPA|{{{2}}}úș}}
! colspan="2" |
| {{wl-rad-IPA|{{{pl|{{{2}}}}}}uoș}}
!
| {{wl-rad-IPA|{{{o|{{{2}}}o}}}vú}}
! colspan="2" |
| {{wl-rad-IPA|{{{pl|{{{2}}}}}}úr}}
|-
|-
! rowspan="2" | indicative
! rowspan="2" | indicative
Line 1,034: Line 1,043:
=p.show(mw.getCurrentFrame():newChild{title="whatever",args={"hv", "o~u^u", "þ"}})
=p.show(mw.getCurrentFrame():newChild{title="whatever",args={"hv", "o~u^u", "þ"}})
=p.conjugate(mw.getCurrentFrame():newChild{title="whatever",args={"deat","de",["1s"]="dei",["3s"]="deaș",["pl"]="di","diș","deti","dev"}})
=p.conjugate(mw.getCurrentFrame():newChild{title="whatever",args={"deat","de",["1s"]="dei",["3s"]="deaș",["pl"]="di","diș","deti","dev"}})
=p.conjugate(mw.getCurrentFrame():newChild{title="whatever",args={"deat","de",["1s"]="dei",["3s"]="deaș",["pl"]="di","diș","deti","dev",["t"]="intr",["altinf"]="hellu",["altinf_note"]="uwu"}})
]]--
]]--