Module:User:荒巻モロゾフ/ja-pron

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 = { [1] = {default = PAGENAME, list = true}, ["y"] = {alias_of = "yomi"}, ["yomi"] = {}, ["accent"] = {list = true}, ["accent=_loc"] = {list = true}, ["accent=_ref"] = {list = true}, ["accent=_note"] = {list = true}, ["acc"] = {alias_of = "accent", list = true}, ["acc=_loc"] = {alias_of = "accent_loc", list = true},	-- using "accent=_loc" (etc.) doesn't work ["acc=_ref"] = {alias_of = "accent_ref", list = true}, ["acc=_note"] = {alias_of = "accent_note", list = true}, ["dev"] = {}, ["dev2"] = {}, ["devm"] = {}, ["noipa"] = {}, ["a"] = {alias_of = "audio"}, ["audio"] = {} }	local args = require("Module:parameters").process(frame:getParent.args, params) local maxindex = table.getn(args[1]) local result = "" local text result = result .. ' \n* ' .. args[1][1] .. "\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[1][math.min(maxindex,i)] if yomi then result = result .. "\n**" else result = result .. "\n*" end if not al[i] then al[i] = "Tokyo" end result = result .. al[i] .. " " .. a[i] end result = result .. '\n ' return result end return export