Module:bdk-noun

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

local export = {}

function export.manual(frame) local params = { ["abs_s"]    = {list = true}, ["erg_s"]    = {list = true}, ["gen_I_s"]  = {list = true}, ["gen_II_s"] = {list = true}, ["dat_s"]    = {list = true}, ["ins_s"]    = {list = true}, ["loc_I_s"]  = {list = true}, ["abl_I_s"]  = {list = true}, ["loc_II_s"] = {list = true}, ["abl_II_s"] = {list = true}, ["loc_III_s"] = {list = true}, ["abl_III_s"] = {list = true}, ["abl_IV_s"] = {list = true},

["abs_p"]    = {list = true}, ["erg_p"]    = {list = true}, ["gen_I_p"]  = {list = true}, ["gen_II_p"] = {list = true}, ["dat_p"]    = {list = true}, ["ins_p"]    = {list = true}, ["loc_I_p"]  = {list = true}, ["abl_I_p"]  = {list = true}, ["loc_II_p"] = {list = true}, ["abl_II_p"] = {list = true}, ["loc_III_p"] = {list = true}, ["abl_III_p"] = {list = true}, ["abl_IV_p"] = {list = true}, }	local args = require("Module:parameters").process(frame:getParent.args, params) local data = { forms = {}, info = "", categories = {}, }	for param in pairs(params) do		if args[param][1] then data.forms[(param:gsub("_", "|"))] = args[param] end end return make_table(data) end

-- Make the table function make_table(data) local function repl(param) local accel = true local no_store = false if param == "info" then return mw.getContentLanguage:ucfirst(data.info or "") elseif string.sub(param, 1, 1) == "!" then no_store = true param = string.sub(param, 2) elseif string.sub(param, 1, 1) == "#" then accel = false param = string.sub(param, 2) end local forms = data.forms[param] if not forms or not forms[1] 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, accel = accel and {form = param, no_store = no_store} or nil})) end return table.concat(ret, " ") end local wikicode = [=[ return mw.ustring.gsub(wikicode, "", repl) .. require("Module:utilities").format_categories(data.categories, lang) end

return export