Module:lumb-conj: Difference between revisions
No edit summary |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 63: | Line 63: | ||
local irregulars = { | local irregulars = { | ||
[""] = { | ["berijana"] = { | ||
fut_1s = "skrōgijōna", | |||
fut_2s = "skrōgijōnt", | |||
fut_3s = "skrōgijōnahþ", | |||
fut_1p = "skrōgijōnha", | |||
fut_2p = "skrōgijōnta", | |||
fut_3p = "skrōgijōnahþa", | |||
past_1s = "pākīr", | |||
past_2s = "pākīnt", | |||
past_3s = "pākīþ", | |||
past_1p = "pākīra", | |||
past_2p = "pākīnta", | |||
past_3p = "pākīþa", | |||
past_part = "pākijar", | |||
} | } | ||
} | } | ||
| Line 138: | Line 151: | ||
past = "ū", | past = "ū", | ||
future = "ō", | future = "ō", | ||
}, | |||
e = { | |||
past = "ā", | |||
future = "i", | |||
}, | }, | ||
} | |||
local strong_categories = { | |||
a = "Lumbaieric class 1 strong verbs", | |||
e = "Lumbaieric class 2 strong verbs", | |||
} | } | ||
local forms = {} | local forms = {} | ||
local used_irregular = false | |||
for slot, ending in pairs(endings) do | for slot, ending in pairs(endings) do | ||
| Line 150: | Line 175: | ||
elseif irregulars[title] and irregulars[title][slot] then | elseif irregulars[title] and irregulars[title][slot] then | ||
forms[slot] = irregulars[title][slot] | forms[slot] = irregulars[title][slot] | ||
used_irregular = true | |||
else | else | ||
| Line 186: | Line 212: | ||
end | end | ||
end | end | ||
local conjugation_type | |||
if strong_categories[strong] then | |||
conjugation_type = " (strong class " .. strong_categories[strong]:match("class (%d+)") .. ")" | |||
else | |||
conjugation_type = " (weak)" | |||
end | |||
---------------------------------------------------------------- | ---------------------------------------------------------------- | ||
| Line 194: | Line 228: | ||
table.insert(t, | table.insert(t, | ||
'{| class="wikitable mw-collapsible mw-collapsed"\n' | |||
.. '|+ Conjugation of [[Contionary:' .. title .. '|' .. title .. ']]' | |||
.. conjugation_type .. '\n' | |||
) | |||
table.insert(t, | table.insert(t, | ||
| Line 367: | Line 402: | ||
table.insert(t, '|}') | table.insert(t, '|}') | ||
return table.concat(t) | if strong_categories[strong] then | ||
table.insert(t, | |||
"\n[[Category:" .. strong_categories[strong] .. "]]") | |||
else | |||
table.insert(t, | |||
"\n[[Category:Lumbaieric weak verbs]]") | |||
end | |||
if used_irregular then | |||
table.insert(t, | |||
"\n[[Category:Lumbaieric irregular verbs]]") | |||
end | |||
return table.concat(t) | |||
end | end | ||
return p | return p | ||