Module:sei-noun

local lang = require("Module:languages").getByCode("sei")

local export = {}

-- Make the table local function make_table(data) local function repl(param) if param == "info" then return mw.getContentLanguage:ucfirst(data.info or "") end local forms = data.forms[param] if not forms then return "&mdash;" end

local ret = {} for key, subform in ipairs(forms) do			table.insert(ret, require("Module:links").full_link({lang = lang, term = subform})) end return table.concat(ret, " ") end

local wikicode = [=[

return mw.ustring.gsub(wikicode, "", repl) .. require("Module:utilities").format_categories(data.categories, lang) end

-- Inflection functions (common nouns)

function export.relative(frame) local args = frame:getParent.args local data = { forms = {}, info = "Declension of ", categories = {}, }	-- add the base singular/plural forms local base

if args[1] then base = args[1] elseif args["3s"] then base = args["3s"] else base = mw.title.getCurrentTitle.text end

data.info = data.info .. require("Module:links").full_link({lang = lang, alt = base}, "term")

--absolutive forms if args["a"] then data.forms["absv|s"] = {args["a"]} end if args["ap"] then data.forms["absv|p"] = {args["ap"]} end --First person forms if args["1s"] then data.forms["first|s"] = {args["1s"]} end if args["1p"] then data.forms["first|p"] = {args["1p"]} end --Second person forms if args["2s"] then data.forms["second|s"] = {args["2s"]} end if args["2p"] then data.forms["second|p"] = {args["2p"]} end --Third person forms if args["3p"] then data.forms["third|p"] = {args["3p"]} end data.forms["third|s"] = {base} return make_table(data) end

return export