local export = {}
local gsub = mw.ustring.gsub
local match = mw.ustring.match
local sub = mw.ustring.sub
local len = mw.ustring.len
local lang = require("Module:languages").getByCode("ja")
local m_ja = require("Module:ja")
local PAGENAME = mw.title.getCurrentTitle().text
function export.make(frame)
local params = {
= {default = PAGENAME, list = true},
= {alias_of = "yomi"},
= {},
= {list = true},
= {list = true},
= {list = true},
= {list = true},
= {alias_of = "accent", list = true},
= {alias_of = "accent_loc", list = true}, -- using "accent=_loc" (etc.) doesn't work
= {alias_of = "accent_ref", list = true},
= {alias_of = "accent_note", list = true},
= {},
= {},
= {},
= {},
= {alias_of = "audio"},
= {}
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local maxindex = table.getn(args)
local result = ""
local text
result = result .. '<div class="toccolours" style="width:500px; font-size:100%; overflow: hidden; margin-bottom: 1em">\n* ' .. args .. "\n"
local a, al, ar, an = args.accent, args.accent_loc, args.accent_ref, args.accent_note
for i, position in ipairs(a) do
text = args
if yomi then result = result .. "\n**" else result = result .. "\n*"
end
if not al then
al = "]"
end
result = result .. al .. " " .. a
end
result = result .. '\n</div>'
return result
end
return export