local lang = require("Module:languages").getByCode("bdk")
local export = {}
function export.manual(frame)
local params = {
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {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 then
data.forms = args
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
if not forms or not forms then
return "—"
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, "<br/>")
end
local wikicode = [=[
{| class="inflection-table wikitable vsSwitcher" data-toggle-category="inflection"
|- style="text-align: left;"
! class="vsToggleElement" colspan="3" | {{{info}}}
|- class="vsShow"
! style="width: 9em;" | Absolutive sg.
| style="width: 15em;" colspan="2" | {{{!abs|s}}}
|- class="vsShow"
! Ergative sg.
| colspan="2" | {{{!erg|s}}}
|- class="vsShow"
! Absolutive pl.
| colspan="2" | {{{!abs|p}}}
|- class="vsHide"
! style="width: 9em;" |
! style="width: 12em;" | Singular
! style="width: 12em;" | Plural
|- class="vsHide"
! Absolutive
| data-accel-col="1" | {{{abs|s}}}
| data-accel-col="2" | {{{abs|p}}}
|- class="vsHide"
! Ergative
| data-accel-col="1" | {{{erg|s}}}
| data-accel-col="2" | {{{erg|p}}}
|- class="vsHide"
! Genitive I
| data-accel-col="1" | {{{gen|I|s}}}
| data-accel-col="2" | {{{gen|I|p}}}
|- class="vsHide"
! Genitive II
| data-accel-col="1" | {{{gen|II|s}}}
| data-accel-col="2" | {{{gen|II|p}}}
|- class="vsHide"
! Dative
| data-accel-col="1" | {{{dat|s}}}
| data-accel-col="2" | {{{dat|p}}}
|- class="vsHide"
! Instrumental
| data-accel-col="1" | {{{ins|s}}}
| data-accel-col="2" | {{{ins|p}}}
|- class="vsHide"
! Locative I
| data-accel-col="1" | {{{loc|I|s}}}
| data-accel-col="2" | {{{loc|I|p}}}
|- class="vsHide"
! Ablative I
| data-accel-col="1" | {{{abl|I|s}}}
| data-accel-col="2" | {{{abl|I|p}}}
|- class="vsHide"
! Locative II
| data-accel-col="1" | {{{loc|II|s}}}
| data-accel-col="2" | {{{loc|II|p}}}
|- class="vsHide"
! Ablative II
| data-accel-col="1" | {{{abl|II|s}}}
| data-accel-col="2" | {{{abl|II|p}}}
|- class="vsHide"
! Locative III
| data-accel-col="1" | {{{loc|III|s}}}
| data-accel-col="2" | {{{loc|III|p}}}
|- class="vsHide"
! Ablative III
| data-accel-col="1" | {{{abl|III|s}}}
| data-accel-col="2" | {{{abl|III|p}}}
|- class="vsHide"
! Ablative IV
| data-accel-col="1" | {{{abl|IV|s}}}
| data-accel-col="2" | {{{abl|IV|p}}}
|}]=]
return mw.ustring.gsub(wikicode, "{{{(+)}}}", repl) .. require("Module:utilities").format_categories(data.categories, lang)
end
return export