-- @author: UltimateSupreme
-- @source:
local p, flag = {}, false
local yn = require( 'Module:Yesno' )
local err = require( 'Module:Error' )
-- Check if the arg exists
-- If yes, append it to the text
local function append(label, arg, text, lang)
    local c = flag and ", " or " ("
    local t = text
    if yn(arg) then
        flag = true
        if lang then
            arg = tostring(
                :attr("lang", lang)
        if label then
            t = t..c.."''"..label..":'' "..arg
        else t = t..c..arg
    return t
function p.rubify(base, ann)
    return "<ruby lang=ja>"..base.."<rp>, </rp><rt>"..ann.."</rt></ruby>"
function p.translate(frame)
    local args = frame:getParent().args
    if not yn(args[1]) then return err("Provide an official name") end
    local text = args[1]
    if args.furigana then args[2] = p.rubify(args[2], args.furigana) end
    text = append(nil, args[2], text)
    if yn(args[3]) then
        text = append(nil, "''"..args[3].."''", text)
    text = append("English", args.eng, text)
    text = append("Latin", args.latin, text, "la")
    text = append("FUNimation", args.funi, text)
    text = append("Viz", args.viz, text)
    text = append("Kodansha Comics USA", args.kc, text)
    text = append("English TV", args.engtv, text)
    text = append("UK DVD", args.ukdvd, text)
    text = append("Fansub", args.fansub, text)
    text = append("Literally meaning", args["lit meaning"], text)
    text = append("Meaning (Viz)", args["viz meaning"], text)
    text = append("Meaning (Kodansha)", args["kc meaning"], text)
    text = append("Meaning (English TV)", args["engtv meaning"], text)
    text = append(nil, args[4], text) --extra
    return text..(flag and ")" or "")
return p
--[[Category:Lua Modules]]

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.