local export = {}
local m_link = require('Module:links')
local m_quotations = require('Module:Quotations')
local m_languages = require("Module:languages")
function export.show(frame)
local list_with_holes = { list = true, allow_holes = true }
local params = {
= { required = true },
= { required = true, list = true, allow_holes = true },
= list_with_holes,
= list_with_holes,
= list_with_holes,
= list_with_holes,
= { alias_of = "t" },
= list_with_holes,
= list_with_holes,
= list_with_holes,
= list_with_holes,
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local lang = args and m_languages.getByCode(args)
local quotes = {}
local reference = {}
local maxindex = math.max(args.maxindex, args.tr.maxindex, args.ts.maxindex)
for i = 1, maxindex do
term = m_link.full_link{
lang = lang,
sc = sc,
alt = args,
tr = args.tr,
ts = args.ts,
gloss = args.t,
pos = args.pos,
}
work = m_quotations.Create{
args, nil, args.work, args.chap,
form = "work",
}
if (args.work or args.chap) then
table.insert(quotes, work .. ": " .. term)
else
table.insert(quotes, term);
end
end
local output = { table.concat(quotes, '</li><li>') }
return '<span class="vsSwitcher vsToggleCategory-quotations" data-vs-showtext="quotations ▼" data-vs-hidetext="quotations ▲">'
..'<span class="vsToggleElement vsButtonText-quotations" style="display:inline-block;"> </span>'
..'<ul class="vsHide"><li>' .. table.concat(output) .. '</li></ul>'
..'</span>'
end
return export