Module:rad-stem/templates: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 203: Line 203:
local irregular_title = ""
local irregular_title = ""
if irregular then irregular_title = " (''irregular''" .. irregular_icon .. ")" end
if irregular then irregular_title = ", ''irregular''" .. irregular_icon end
local type_title = (args[1] == nil and "periphrastic") or "inflected"
local function get_forms(ending, pre)
local function get_forms(ending, pre)
Line 220: Line 221:
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" style=\"text-align: center\">")
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" style=\"text-align: center\">")
tr()
tr()
th("Comparative forms of ''" .. lemma .. "''" .. irregular_title .. "&nbsp;",1,2)
th("Comparative forms of ''" .. lemma .. "'' (" .. type_title .. irregular_title .. ")&nbsp;",1,2)
_tr()
_tr()
th("degree")
th("degree")
Line 514: Line 515:
nom_cite = get_forms("nom", stems.nom, adj_broken_e, "", true)
nom_cite = get_forms("nom", stems.nom, adj_broken_e, "", true)
end
end
nom_cite = mw.ustring.gsub(nom_cite, "%*", "")
local voc = get_forms("voc", stems.voc, adj_broken_e)
local voc = get_forms("voc", stems.voc, adj_broken_e)
local gen = ""
local gen = ""
Line 538: Line 540:
local nompl_cite = get_forms("nompl", stems.nompl, adj_broken_e, "", true)
local nompl_cite = get_forms("nompl", stems.nompl, adj_broken_e, "", true)
local vocpl = get_forms("vocpl", stems.nompl, adj_broken_e)
local vocpl = get_forms("vocpl", stems.nompl, adj_broken_e)
local genpl = get_forms("genpl", stems.genpl .. "ris", adj, "eris")
local genpl = get_forms("genpl", mw.ustring.gsub(stems.genpl .. "ris", "sris$", "sis"), adj, "eris")
local genpl_short = get_forms("genpl_short", stems.genpl_short, adj, "es")
local genpl_short = get_forms("genpl_short", stems.genpl_short, adj, "es")
local datpl = get_forms("datpl", stems.genpl .. "rín", adj, "erín")
local datpl = get_forms("datpl", mw.ustring.gsub(stems.genpl .. "rín", "srín$", "sín"), adj, "erín")
local accpl = get_forms("accpl", stems.genpl .. "rid", adj, "erid")
local accpl = get_forms("accpl", mw.ustring.gsub(stems.genpl .. "rid", "srid$", "sid"), adj, "erid")
local inspl = get_forms("inspl", stems.genpl .. "ríe", adj, "eríe")
local inspl = get_forms("inspl", mw.ustring.gsub(stems.genpl .. "ríe", "sríe$", "síe"), adj, "eríe")
local nomdu = get_forms("nomdu", stems.dat .. "te", adj_broken_e)
local nomdu = get_forms("nomdu", stems.dat .. "te", adj_broken_e)
Line 560: Line 562:
local anim_acc = ""
local anim_acc = ""
local anim_ins = ""
local anim_ins = ""
local def_stem = ""
if table_type == "adj" then
if table_type == "adj" then
inan = get_forms("inan", stems.anim, adj_broken_e)
def_stem = mw.ustring.gsub(stems.anim, "oș$", "ûș")
anim = get_forms("anim", stems.anim .. "e", adj_broken_e)
inan = get_forms("inan", mw.ustring.gsub(stems.anim, "oș$", "uș"), adj_broken_e)
anim = get_forms("anim", def_stem .. "e", adj_broken_e)
anim_gen = get_forms("anim_gen", stems.anim .. "esk", adj, "esk")
anim_gen = get_forms("anim_gen", stems.anim .. "esk", adj, "esk")
anim_dat = get_forms("anim_dat", stems.anim .. "en", adj, "en")
anim_dat = get_forms("anim_dat", stems.anim .. "en", adj, "en")
Line 573: Line 577:
th("Emphatic combined forms with the definite article", 1, 6)
th("Emphatic combined forms with the definite article", 1, 6)
_tr()
_tr()
th("inanimate", 2, 1)
th("singular", 1, 2)
th("animate", 1, 2)
th("plural", 2, 1)
th("+ " .. rad_link("a"), 2)
th("+ " .. rad_link("a"), 2)
th("+ " .. rad_link("a'"), 2)
th("+ " .. rad_link("a'"), 2)
Line 582: Line 586:
th("+ " .. rad_link("u"), 2)
th("+ " .. rad_link("u"), 2)
_tr()
_tr()
th("definite")
th("inanimate")
th("indefinite")
th("animate")
_tr()
_tr()
td(inan, 1, 2)
td(inan)
td(anim)
td(anim, 1, 2)
td(get_forms("anim", stems.anim .. "a", adj_broken_e))
td(get_forms("anim", def_stem .. "a", adj_broken_e))
td(get_forms("anim", stems.anim .. "a'", adj_broken_e))
td(get_forms("anim", def_stem .. "a'", adj_broken_e))
td(get_forms("anim", stems.anim .. "ag", adj_broken_e))
td(get_forms("anim", def_stem .. "ag", adj_broken_e))
td(get_forms("anim", stems.anim .. "ai", adj_broken_e))
td(get_forms("anim", def_stem .. "ai", adj_broken_e))
td(get_forms("anim", stems.anim .. "i", adj_broken_e))
td(get_forms("anim", def_stem .. "i", adj_broken_e))
td(get_forms("anim", stems.anim .. "u", adj_broken_e))
td(get_forms("anim", def_stem .. "u", adj_broken_e))
tr_()
tr_()
add("</table>")
add("</table>")
end
end
if table_type == "adjn" then table_type = "adj" end


add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" style=\"text-align: center\">")
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" style=\"text-align: center\">")
Line 668: Line 674:
tr_()
tr_()
elseif table_type == "sg" then
elseif table_type == "sg" then
local sg_title = "Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. ", ''[[:Category:Radestrian singularia tantum|singulare tantum]]''" .. irregular_title .. ") &nbsp;"
if definite then
if definite then
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 3)
th(sg_title, 1, 3)
tr()
tr()
th("", 1, 2)
th("", 1, 2)
Line 697: Line 704:
tr_()
tr_()
else
else
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 2)
th(sg_title, 1, 2)
tr()
tr()
th("")
th("")
Line 722: Line 729:
end
end
elseif table_type == "pl" then
elseif table_type == "pl" then
th("Declension of <i>" .. nompl_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 3)
th("Declension of <i>" .. nompl_cite .. "</i> (" .. type_name .. ", ''[[:Category:Radestrian pluralia tantum|plurale tantum]]''" .. irregular_title .. ") &nbsp;", 1, 3)
tr()
tr()
th("", 1, 2)
th("", 1, 2)
Line 750: Line 757:
tr_()
tr_()
elseif table_type == "du" then
elseif table_type == "du" then
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 5)
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. ", ''[[:Category:Radestrian pluralia binaria|cum plurali binario]]''" .. irregular_title .. ") &nbsp;", 1, 5)
tr()
tr()
th("", 2, 2)
th("", 2, 2)
Line 780: Line 787:
_tr()
_tr()
th("constructive")
th("constructive")
if not (definite or adj) then td(gendu_short) end
td(genpl_short)
td(genpl_short)
_tr()
_tr()
Line 799: Line 805:
tr_()
tr_()
elseif table_type == "dupl" and (definite or adj) then
elseif table_type == "dupl" and (definite or adj) then
th("Declension of <i>" .. nomdu_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 3)
th("Declension of <i>" .. nomdu_cite .. "</i> (" .. type_name .. ", ''[[:Category:Radestrian pluralia binaria tantum|plurale binarium tantum]]''" .. irregular_title .. ") &nbsp;", 1, 3)
tr()
tr()
th("", 1, 2)
th("", 1, 2)
Line 827: Line 833:
tr_()
tr_()
elseif table_type == "dupl" then
elseif table_type == "dupl" then
th("Declension of <i>" .. nomdu_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 2)
th("Declension of <i>" .. nomdu_cite .. "</i> (" .. type_name .. ", ''[[:Category:Radestrian pluralia binaria tantum|plurale binarium tantum]]''" .. irregular_title .. ") &nbsp;", 1, 2)
tr()
tr()
th("")
th("")
Line 1,298: Line 1,304:
th("connegative", 1, 3)
th("connegative", 1, 3)
if cite == "vat" or cite == "hjeat" then
if cite == "vat" or cite == "hjeat" then
th("copular verbs do not have connegatives", 1, 11)
th("''" .. cite .. "'' does not have a connegative", 1, 11)
else
else
td(get_forms(pp.inf,"a","([^a])uta$","%1ûta"), 1, 11)
td(get_forms(pp.inf,"a","([^a])uta$","%1ûta"), 1, 11)
Line 2,592: Line 2,598:
local function governs(case)
local function governs(case)
return m_government.generate({case})
return m_government.show{"&" .. case}
end
end