Module:qhv-verb: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 20: Line 20:
["[ptkqbdg]"] = "stop",
["[ptkqbdg]"] = "stop",
["[mn]"] = "nasal",
["[mn]"] = "nasal",
["lj"] = "palatal", ["ñ"] = "palatal",
["ñ"] = "palatal",
["[hszvj]"] = "fricative", ["gh"] = "fricative",
["[hszvj]"] = "fricative",
}
}


Line 30: Line 30:
local decl = class
local decl = class
return decl, {sub(root, 1, (sub(root, -2) == ("lj" or "gh") and -3 or -2))}
return decl, {sub(root, 1, (sub(root, -2) == ("lj" or "gh") and -3 or -2))}
elseif match(word, "urnegon$") or root == "urn" then
return "-urnegon", {root}
elseif find(tv, "[eiou]") or m_data.astems[word] then
elseif find(tv, "[eiou]") or m_data.astems[word] then
return "vowel", {root}
return "vowel", {root}
elseif match(word, "[āe]mm?agon$") then
elseif match(word, "[^l]ilagon$") or root == "il" then
return "-ilagon", {root}
elseif match(word, "[āeē]mm?agon$") and word ~= "jemagon" and word ~= "uēmagon" then
return "-emagon", {root}
return "-emagon", {root}
elseif match(root, consonants .. "+" .. consonants) and (not match(root, ("lj" or "[rgtk]h") .. "$")) then
elseif match(root, "lj$") then return "palatal", {root}
return "cluster", {root}
elseif match(root, "gh$") then return "fricative", {root}
elseif match(root, consonants .. "+" .. consonants .. "$") then return "cluster", {root}
else
else
for ending, decl in pairs(endings) do
for ending, decl in pairs(endings) do
Line 82: Line 87:
data.thematic_vowel = tv
data.thematic_vowel = tv
data.intr = parent_args["intr"] or parent_args[1] or nil
data.intr = parent_args["intr"] or parent_args[1] or nil
if data.intr and not data.no_cat then table.insert(data.categories, "High Valyrian intransitive verbs") end
-- Generate the forms
-- Generate the forms
Line 166: Line 172:
local divframe_active = [=[
local divframe_active = [=[
<div class="mw-collapsible" style="border-collapse: collapse; margin: 0px 0px -1px 0px; padding: 2px; text-align: center; border: 1px solid #aaaaaa; font-size: 95%; overflow: auto; width: auto;">
<div class="mw-collapsible mw-collapsed" style="border-collapse: collapse; margin: 0px 0px -1px 0px; padding: 2px; text-align: center; border: 1px solid #aaaaaa; font-size: 95%; overflow: auto; width: auto;">
<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);"><span class="nowrap">Declension of ''<span lang="qhv">{{{pagename}}}</span>''  — active voice</span></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);"><span class="nowrap">Declension of ''<span lang="qhv">{{{pagename}}}</span>''  — active voice</span></div>
<div class="mw-collapsible-content" style="font-size: 100%;">
<div class="mw-collapsible-content" style="font-size: 100%;">
Line 224: Line 230:
local divframe_passive = [=[
local divframe_passive = [=[
<div class="mw-collapsible" style="border-collapse: collapse; margin: 0px 0px -1px 0px; padding: 2px; text-align: center; border: 1px solid #aaaaaa; font-size: 95%; overflow: auto; width: auto;">
<div class="mw-collapsible mw-collapsed" style="border-collapse: collapse; margin: 0px 0px -1px 0px; padding: 2px; text-align: center; border: 1px solid #aaaaaa; font-size: 95%; overflow: auto; width: auto;">
<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);"><span class="nowrap">Declension of ''<span lang="qhv">]=] .. link(show_form(data.forms["pas_inf_prs"])) .. [=[</span>'' — passive voice</span></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);"><span class="nowrap">Declension of ''<span lang="qhv">]=] .. link(show_form(data.forms["pas_inf_prs"])) .. [=[</span>'' — passive voice</span></div>
<div class="mw-collapsible-content" style="font-size: 100%;">
<div class="mw-collapsible-content" style="font-size: 100%;">
Line 281: Line 287:
]=]
]=]
local wikicode = divframe_active .. active .. (data.trans and divframe_passive .. passive or "")
local wikicode = divframe_active .. active .. (not data.intr and divframe_passive .. passive or "")
return (gsub(wikicode, "{{{([a-z0-9_]+)}}}", repl)) .. (data.no_cat and "" or require("Module:utilities").format_categories(data.categories, lang))
return (gsub(wikicode, "{{{([a-z0-9_]+)}}}", repl)) .. (data.no_cat and "" or require("Module:utilities").format_categories(data.categories, lang))