Module:rad-stem/templates: Difference between revisions

Added irregular to table titles
No edit summary
(Added irregular to table titles)
Line 168: Line 168:
local stem = args[1]
local stem = args[1]
local disable_ipa = args['noipa'] or false
local disable_ipa = args['noipa'] or false
local irregular = args["irr"] or args["irregular"] or false
local irregular_title = ""
if irregular then irregular_title = " (''irregular'')" end
if args[1] and args[2] ~= "adj" and args[2] ~= "adv" then error("Second parameter must be adj or adv") end
if args[1] and args[2] ~= "adj" and args[2] ~= "adv" then error("Second parameter must be adj or adv") end
Line 201: Line 204:
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 .. "''&nbsp;",1,2)
th("Comparative forms of ''" .. lemma .. "''" .. irregular_title .. "&nbsp;",1,2)
_tr()
_tr()
th("degree")
th("degree")
Line 231: Line 234:
tr_()
tr_()
add("</table>")
add("</table>")
if irregular then
if pos == "adj" then
add("[[Category:Radestrian adjectives with irregular comparative forms]]")
elseif pos == "adv" then
add("[[Category:Radestrian adverbs with irregular comparative forms]]")
end
end
return table.concat(format_table, string.char(10))
return table.concat(format_table, string.char(10))
Line 256: Line 267:
local definite = args['definite'] ~= nil or args['def'] ~= nil or false
local definite = args['definite'] ~= nil or args['def'] ~= nil or false
local irregular = args["irr"] or args["irregular"] or false
local irregular = args["irr"] or args["irregular"] or false
local irregular_title = ""
if irregular then irregular_title = ", ''irregular''" end
local adj = args['adj']
local adj = args['adj']
Line 552: Line 565:
th("Substantive declension of <i>" .. nom_cite .. "</i> &nbsp;", 1, 5)
th("Substantive declension of <i>" .. nom_cite .. "</i> &nbsp;", 1, 5)
else
else
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. ") &nbsp;", 1, 4)
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 4)
end
end
Line 619: Line 632:
elseif table_type == "sg" then
elseif table_type == "sg" then
if definite then
if definite then
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. ") &nbsp;", 1, 3)
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 3)
tr()
tr()
th("", 1, 2)
th("", 1, 2)
Line 647: Line 660:
tr_()
tr_()
else
else
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. ") &nbsp;", 1, 2)
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 2)
tr()
tr()
th("")
th("")
Line 672: Line 685:
end
end
elseif table_type == "pl" then
elseif table_type == "pl" then
th("Declension of <i>" .. nompl_cite .. "</i> (" .. type_name .. ") &nbsp;", 1, 3)
th("Declension of <i>" .. nompl_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 3)
tr()
tr()
th("", 1, 2)
th("", 1, 2)
Line 700: Line 713:
tr_()
tr_()
elseif table_type == "du" then
elseif table_type == "du" then
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. ") &nbsp;", 1, 5)
th("Declension of <i>" .. nom_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 5)
tr()
tr()
th("", 2, 2)
th("", 2, 2)
Line 749: Line 762:
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 .. ") &nbsp;", 1, 3)
th("Declension of <i>" .. nomdu_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 3)
tr()
tr()
th("", 1, 2)
th("", 1, 2)
Line 777: Line 790:
tr_()
tr_()
elseif table_type == "dupl" then
elseif table_type == "dupl" then
th("Declension of <i>" .. nomdu_cite .. "</i> (" .. type_name .. ") &nbsp;", 1, 2)
th("Declension of <i>" .. nomdu_cite .. "</i> (" .. type_name .. irregular_title .. ") &nbsp;", 1, 2)
tr()
tr()
th("")
th("")
Line 825: Line 838:
local disable_ipa = args['noipa'] or false
local disable_ipa = args['noipa'] or false
local irregular = args["irr"] or args["irregular"] or false
local irregular = args["irr"] or args["irregular"] or false
local checked = args["check"]
local irregular_title = ""
if irregular then irregular_title = ", ''irregular''" end
if args[3] == nil then -- sense preset conjugation
if args[3] == nil then -- sense preset conjugation
local root = args[1]
local root = args[1]
Line 957: Line 972:
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" width=70% style=\"text-align: center\">")
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" width=70% style=\"text-align: center\">")
tr()
tr()
th("Conjugation of ''" .. cite .. "'' (impersonal) &nbsp;", 1, 5)
th("Conjugation of ''" .. cite .. "'' (impersonal" .. irregular_title .. ") &nbsp;", 1, 5)
_tr()
_tr()
th("nonfinite forms", 1, 5)
th("nonfinite forms", 1, 5)
Line 1,215: Line 1,230:
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" width=100% style=\"text-align: center\">")
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" width=100% style=\"text-align: center\">")
tr()
tr()
th("Conjugation of ''" .. cite .. "'' (active voice) &nbsp;", 1, 14)
th("Conjugation of ''" .. cite .. "'' (active voice" .. irregular_title .. ") &nbsp;", 1, 14)
_tr()
_tr()
th("nonfinite forms", 1, 14)
th("nonfinite forms", 1, 14)
Line 1,821: Line 1,836:
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" width=100% style=\"text-align: center\">")
add("<table class=\"blacklinks mw-collapsible mw-collapsed wikitable inflection table\" width=100% style=\"text-align: center\">")
tr()
tr()
th("Conjugation of ''" .. cite .. "uot'' (passive voice) &nbsp;", 1, 14)
th("Conjugation of ''" .. cite .. "uot'' (passive voice" .. irregular_title .. ") &nbsp;", 1, 14)
_tr()
_tr()
th("nonfinite forms", 1, 14)
th("nonfinite forms", 1, 14)