Modul:accel/sw
A modult a Modul:accel/sw/doc lapon tudod dokumentálni
return {generate = function(params, entry)
if string.sub(params.form, 1, 5) == "root:" then -- for verb roots
entry.head = "{{sw-verb}}"
entry.def = "{{sw-derform|" .. string.sub(params.form, 6) .. "|" .. params.origin .. "}}"
entry.conjugation = "{{sw-conj}}"
elseif string.sub(params.form, 1, 5) == "verb:" then -- for verb inflections
entry.def = "{{inflection of|" .. params.origin .. "|-" .. params.origin
entry.def = entry.def .. string.sub(params.form, 6)
entry.def = entry.def .. "|lang=sw}}"
elseif params.form == "p" then
entry.head = "{{head|" .. params.lang .. "|noun plural form}}"
elseif params.form == "m" or params.form == "wa" or params.form == "mi" or params.form == "ma" or params.form == "ki" or params.form == "vi" or params.form == "n" or params.form == "pa" or params.form == "ku" or params.form == "mu" then
entry.def = "{{sw-adj form of|" .. params.form .. "|" .. params.origin .. "}}"
elseif params.form == "infinitive" then
entry.head = "{{sw-inf}}"
entry.def = "{{inflection of|sw|" .. params.origin .. "|-" .. params.origin .. "|" .. params.form .. "}}"
end
end}