A documentação para este módulo pode ser criada em Módulo:ComicsInfobox/Character/doc

local Infobox = {}

----------------------------
-- Libraries of functions --
----------------------------
-- stands for High Frequency
local HF = require('Módulo:ComicsHF')
-- Parses invocation parameters, trims whitespace, and removes blanks
local getArgs = require('Dev:Arguments').getArgs
-- Common and centralized functions
local ComicsInfobox = require('Módulo:ComicsInfobox')
local CitizenshipCheck = require( 'Módulo:ComicsInfobox/Citizenship').CitizenshipCheck

-----------------------
-- Libraries of data --
-----------------------
-- Various data tables which can be refactored for paradigm
-- Eventually, these will be sorted into: 
-- * dataCitizenship_DC
-- * dataCitizenship_Marvel
-- * etc
Infobox._Occupation = require('Módulo:ComicsInfobox/Occupation')._Occupation
Infobox._Citizenship = require( 'Módulo:ComicsInfobox/Citizenship')._Citizenship
Infobox._Race = require( 'Módulo:ComicsInfobox/Race')._Race


-- Since this should only be evaluated once per pageview, it's now global
_G.vars = { Pagename = mw.title.getCurrentTitle().text }

---------------------
-- Local functions --
---------------------
local function transition(funcName)
  -- This Módulo's initial functions were made for InfoboxBuilder.
  -- As a result, most of them can't be invoked for Portable Infoboxes.
  -- To allow the existing code without rewriting it, this wrapper allows invocation.
	return function (frame)
		local args = getArgs(frame, { trim = true, removeBlanks = true })
		return Infobox[funcName](args, vars)
	end
end


 
local WeightSubcategory = function( peso )
  local subcategory = ""
if
   peso < 100 then
    subcategory = 0
  elseif peso >= 100 and peso < 150 then
    subcategory = 100
  elseif peso >= 150 and peso < 200 then
    subcategory = 150
  elseif peso >= 200 and peso < 300 then
    subcategory = 200
  elseif peso >= 300 and peso < 400 then
    subcategory = 300
  elseif peso >= 400 and peso < 500 then
    subcategory = 400
  elseif peso >= 500 then
    subcategory = 500
  end
 
  return subcategory
end
 
----------------------
-- Public functions --
----------------------
-- These are the invocation-friendly calls.
-- These are backward from the normal '_' order, for legacy purposes.
Infobox.getTitle = transition('_getTitle')
Infobox.MainImage = transition('_MainImage')
Infobox.MainImageLabel = transition('_MainImageLabel')
Infobox.Gallery = transition('_Gallery')
Infobox.RealName = transition('_RealName')
Infobox.CurrentAlias = transition('_CurrentAlias')
Infobox.Alignment = transition('_Alignment')
Infobox.Identity = transition('_Identity')
Infobox.Citizenship = transition('_Citizenship')
Infobox.MaritalStatus = transition('_MaritalStatus')
Infobox.Occupation = transition('_Occupation')
Infobox.Characteristics = transition('_Characteristics')
Infobox.Gender = transition('_Gender')
Infobox.Height = transition('_Height')
Infobox.Weight = transition('_Weight')
Infobox.Eyes = transition('_Eyes')
Infobox.Hair = transition('_Hair')
Infobox.Skin = transition('_Skin')
Infobox.AtributosIncomuns = transition('_AtributosIncomuns')
Infobox.Race = transition('_Race')
Infobox.Origin = transition('_Origin')
Infobox.Universe = transition('_Universe')
Infobox.Sector = transition('_Sector')
Infobox.Ctry = transition('_Ctry')
Infobox.Creators = transition('_Creators')
Infobox.OriginalPublisher = transition('_OriginalPublisher')

function Infobox._getTitle( field, vars )
    local title = field.Value or vars.Pagename
    
    if not HF.isempty(field.IdentidadeAtual) then
        title = field.IdentidadeAtual
    elseif not HF.isempty(field.IdentidadeAtualRef) then
        title = field.IdentidadeAtualRef
    elseif not HF.isempty(field.NomeReal) then
        title = field.NomeReal
    elseif not HF.isempty(field.Titulo) then
        title, Universe  = string.match( field.Titulo, "(.*)%s*%((.*)%)")
    end
        
    local o = {}
    
    local titleObj = mw.title.new( title ) or nil
    if type(titleObj) ~= "nil" then
        if titleObj.exists then
            table.insert(o, HF.Link( title ) )
        else
            table.insert(o, title)
        end
    else
        table.insert(o, title)
    end
    
    return table.concat( o )
end
 
function Infobox._MainImage( field, vars )
  if HF.isempty( field.ImageText ) then field.ImageText = vars.Pagename end
  return '[[File:' .. field.Value .. '|center|' .. field.ImageText .. ']]'
end
 
function Infobox._MainImageLabel( field, vars )
  if HF.isempty( field.Galeria ) then field.Galeria = vars.Pagename .. "/Galeria" end
  return HF.Link( field.Galeria, field.Label )
end

function Infobox._Gallery( field, vars )
  if HF.isempty( field.Galeria ) then field.Galeria = vars.Pagename .. "/Galeria" end
  return field.Galeria
end

function Infobox._RealName( field, vars )
    local output = ""
    
    if HF.isempty( field.ValueReal ) then
        output = field.Value
    else
        if string.find( field.ValueReal, "%[%[.+%]%]" ) == nil then
            link = HF.Link( field.ValueReal, "" )
        else
            link = field.ValueReal
        end
        output = output .. link
        if not HF.isempty( field.Value2 )
         and not HF.isempty( field.ValueRef ) then
             output = output ..
                " " .. field.Value2 ..
                " " .. field.ValueRef
        end
    end
    return output
end
 
function Infobox._CurrentAlias( field, vars )
    local output = field.Value
    if not HF.isempty( field.ValueRef ) then
        output = output .. "&nbsp;" .. field.ValueRef
    end
    return output
end
 
function Infobox._Alignment( field )
    local o = {}
    local v = field.Value
    local alignment = {
        ['má'] = HF.CategoryLink( 'Personagens do Mal', vars.Pagename, 'Mau' ),
        ['ruim'] = HF.CategoryLink( 'Personagens do Mal', vars.Pagename, 'Mau' ),
        ['mal'] = HF.CategoryLink( 'Personagens do Mal', vars.Pagename, 'Mau' ),
        ['mau'] = HF.CategoryLink( 'Personagens do Mal', vars.Pagename, 'Mau' ),
        ['neutro'] = HF.CategoryLink( 'Personagens Neutros', vars.Pagename, 'Neutro' ),
        ['neutra'] = HF.CategoryLink( 'Personagens Neutros', vars.Pagename, 'Neutro' ),
        ['bom'] = HF.CategoryLink( 'Personagens do Bem', vars.Pagename, 'Bom' ),
        ['boa'] = HF.CategoryLink( 'Personagens do Bem', vars.Pagename, 'Bom' ),
        ['bem'] = HF.CategoryLink( 'Personagens do Bem', vars.Pagename, 'Bom' ),
        ['civil'] = HF.CategoryLink( 'Personagens Civis', vars.Pagename, 'Civil' ),
    }
    if alignment[string.lower( v )] then
        return alignment[string.lower( v )]
    elseif mw.site.stats.pagesInCategory( 
      'Personagens ' .. HF.firstToUpper(v), 'pages' ) > 0 then
        return HF.CategoryLink( 
                'Personagens ' .. HF.firstToUpper(v),
                vars.Pagename,
                v )
    else
        -- No Output
    end
end
 
function Infobox._Identity( field, vars )
  local output = {}
  if not HF.isempty( field.Value ) then
    local category = 'Identidade ' .. field.Value 
    table.insert( output, HF.CategoryLink( category, vars.Pagename, category ) )
  end
  table.insert( output, field.Value2 )
  return table.concat( output, ' ' )
end
 
function Infobox._MaritalStatus( field, vars )
  local statuses = HF.explode( ";", field.Value )
  local o = {}
 
  for i, status in ipairs( statuses ) do
    if string.lower(status) == "casado" or string.lower(status) == "casada" or string.lower(status) == "casado novamente" or string.lower(status) == "casada novamente" then
      table.insert( o, HF.CategoryLink( "Personagens Casados", vars.Pagename, status ) )
    else
        if string.lower(status) == "solteiro" or string.lower(status) == "solteira" then
      table.insert( o, HF.CategoryLink( "Personagens Solteiros", vars.Pagename, status ) )
    else
        if string.lower(status) == "viúvo" or string.lower(status) == "viúva" then
      table.insert( o, HF.CategoryLink( "Personagens Viúvos", vars.Pagename, status ) )
      else
      table.insert( o, HF.CategoryLink( "Personagens " .. status .. "s", vars.Pagename, status ) )
    end
end
    end
end
    table.insert( o, field.Value2 )
 
  return table.concat(o, ' ')
end
 
--function Infobox._Occupation( field, vars )
--  local output = field.Value
-- 
--  for key, value in pairs(occupations) do
--    if string.find( string.lower(field.Value), key ) ~= nil then
--      for i, category in ipairs( value ) do
--        output = output .. HF.CategoryLink( category, vars.Pagename, "" )
--      end
--    end
--  end
-- 
--  return HF._TrimOverflow( output )
--end
 
function Infobox._Characteristics( field, vars )
  local output = field.Value
  if not HF.isempty( field.CharRef ) then
    output = output .. field.CharRefTag
  end
  return HF._TrimOverflow( output )
end
 
function Infobox._Gender( field )
    local o = {}
    local v = field.Value
    local gender = {
        ['masculino'] = HF.CategoryLink( 'Personagens Masculinos', vars.Pagename, 'Masculino' ),
        ['feminino'] = HF.CategoryLink( 'Personagens Femininos', vars.Pagename, 'Feminino' ),
        ['feminina'] = HF.CategoryLink( 'Personagens Femininos', vars.Pagename, 'Feminino' ),
    }
    if gender[string.lower( v )] then
        return gender[string.lower( v )]
    elseif mw.site.stats.pagesInCategory( 
      'Personagens ' .. HF.firstToUpper(v), 'pages' ) > 0 then
        return HF.CategoryLink( 
                'Personagens ' .. HF.firstToUpper(v),
                vars.Pagename,
                v )
    else
        -- No Output
    end
  
  if HF.isempty( field.Value2 ) then
        field.Value2 = ''
    end
    
  return table.concat(output, ', ') .. field.Value2 or ''
end
 
function Infobox._Height( field, vars )
  local output    = ""
  local valid     = false -- para verificar se a altura (em pés) está em um formato válido
  local validInch = false -- para verificar se a altura (em polegadas) está em um formato válido
  local delimiter = ""
 
    if string.find( field.Value, "'" ) ~= nil then
      valid     = true
      delimiter = "'"
    elseif string.find( field.Value, "ft" ) ~= nil then
      valid     = true
      delimiter = "ft"
    end
 
    if valid == true then
      local heightExploded = HF.explode( delimiter, field.Value )
 
      local feet           = string.match( tostring( heightExploded[1] ), "%d+" )
      local inches         = string.match( tostring( heightExploded[2] ), "%d+" )
 
      if feet == nil then
        feet = "0"
      end
      if inches == nil then
        inches = "0"
      end
 
 
      local heightValid    = feet .. "\' " .. inches .. "\""
      local feetPadded     = HF.AddZeros( feet, 5 )
      local inchesPadded   = HF.AddZeros( inches, 2 )
      local heightPadded   = feetPadded .. "\' " .. inchesPadded .. "\""
 
      local footCategory    = "Altura " .. feet .. "'"
      local inchesCategory  = "Altura " .. heightValid
 
      local from           = mw.uri.encode( "%20" .. feetPadded .. "'" .. inchesPadded .. "\"", "PATH" )
      local category       = tostring( mw.uri.canonicalUrl( ":Categoria:Altura", "from=" .. from ) )
 
      -- Link to Height Category with from= parameter
      output = HF.ExternalLink( category, heightValid, true )
 
      -- All into Height Category, sorted by Height and then Pagename
      output = output .. HF.CategoryLink( "Altura", heightPadded .. vars.Pagename, "" )
 
      -- All of the same 'Feet' into appropriate Foot category, sorted by inches then pagename.
      output = output .. HF.CategoryLink( footCategory, inchesPadded .. vars.Pagename, "" )
 
      -- All of the same inches in the same feet category, sorted by pagename.
      output = output .. HF.CategoryLink( inchesCategory, vars.Pagename, "" )
 
      -- Concat Height2
            if not HF.isempty( field.Value2 ) then
                output = output .. " " .. field.Value2
            end
 
    else
            if HF.isempty( field.Value2 ) then
                field.Value2 = ''
            end
      output = field.Value .. " " .. field.Value2
    end
 
  return output
end
 
function Infobox._Weight( field, vars )
  local output = ""
  local Units  = {
      ["lbs"] = {
          ["lbs"] = 1.0,
          ["kg"]  = 0.453592,
          ["ton"] = 0.0005
          },
      ["kg"] = {
          ["lbs"] = 2.20462,
          ["kg"]  = 1.0,
          ["ton"] = 0.00110231
          },
      ["ton"] = {
          ["lbs"] = 2000,
          ["kg"]  = 907.185,
          ["ton"] = 1.0
          }
    }
  local unit   = ""
 
  if string.find( field.Value, "lbs" ) then
    unit = "lbs"
  elseif string.find( field.Value, "kg" ) then
    unit = "kg"
  elseif string.find( field.Value, "ton" ) then
    unit = "ton"
  else
    unit = ""
  end
 
  if unit ~= "" then
    local weight    = tonumber( string.match( field.Value, "%d+" ) )
    local weightLbs = HF.round( weight * Units[unit].lbs , 0 )
    local weightKg  = HF.round( weight * Units[unit].kg , 0 )
 
    local weightValid = weightLbs .. " lbs (" .. weightKg .. " kg)"
 
    local subcategory      = WeightSubcategory( weightLbs )
 
    local parameter = "from="
 
    if subcategory == 0 then
      parameter   = "until="
      subcategory = 100
    end
 
    local category    = tostring( mw.uri.canonicalUrl( ":Categoria:Peso", parameter .. HF.AddZeros( subcategory, 5 ) ) )
 
    output = HF.ExternalLink( category, weightValid, true )
 
    output = output .. HF.CategoryLink( "Peso", "Peso " .. weightLbs, "" )
 
        if not HF.isempty( field.Value2 ) then
            output = output .. " " .. field.Value2
        end
  else
        if HF.isempty( field.Value2 ) then
            field.Value2 = ''
        end
    output = field.Value .. " " .. field.Value2
  end
 
  return output
end
 
function Infobox._Eyes( field )
    if field.Value2 then field.Value = field.Value .. ',' .. field.Value2 end
    local o = {}
    local input = HF.explode( ',', field.Value )
    local olhos = {
        ['azul'] = HF.CategoryLink( 'Olhos Azuis', vars.Pagename, 'Azuis' ),
        ['castanho'] = HF.CategoryLink( 'Olhos Azuis', vars.Pagename, 'Azuis' ),
        
        ['azuis'] = HF.CategoryLink( 'Olhos Azuis', vars.Pagename, 'Azuis' ),
        ['castanhos'] = HF.CategoryLink( 'Olhos Castanhos', vars.Pagename, 'Castanhos' ),
        ['preto'] = HF.CategoryLink( 'Olhos Pretos', vars.Pagename, 'Pretos' ),
        ['nenhum'] = HF.CategoryLink( 'Sem Olhos', vars.Pagename, 'Sem Olhos' ),
        ['n/d'] = HF.CategoryLink( 'Sem Olhos', vars.Pagename, 'Sem Olhos' ),
        ['sem olhos'] = HF.CategoryLink( 'Sem Olhos', vars.Pagename, 'Sem Olhos' )
    }
    for i, v in ipairs(input) do
        if olhos[string.lower( v )] then
            table.insert( o, olhos[string.lower( v )] )
        elseif mw.site.stats.pagesInCategory( 'Olhos ' .. HF.firstToUpper(v), 'pages' ) > 0 then
                table.insert( o, 
                    HF.CategoryLink( 'Olhos ' .. HF.firstToUpper(v), vars.Pagename, v )
                )
        else
            table.insert( o, HF.firstToUpper(v) )
        end
    end
    return table.concat( o, ' · ' )
end
 
function Infobox._Hair( field )
    if field.Value2 then
        field.Value = field.Value .. ',' .. field.Value2 end
    local o = {}
    local input = HF.explode( ',', field.Value )
    local cabelo = {
        ['grisalho'] = HF.CategoryLink( 'Cabelo Grisalho', vars.Pagename, 'Grisalho' ),
        ['loiro'] = HF.CategoryLink( 'Cabelo Loiro', vars.Pagename, 'Loiro' ),
        ['loira'] = HF.CategoryLink( 'Cabelo Loiro', vars.Pagename, 'Loiro' ),
        ['cabelo morango'] = HF.CategoryLink( 'Cabelo Loiro Morango', vars.Pagename, 'Loiro Morango' ),
        ['cabelo ruivo'] = HF.CategoryLink( 'Cabelo Ruivo', vars.Pagename, 'Ruivo' ),
        ['cabelo castanho'] = HF.CategoryLink( 'Cabelo Castanho', vars.Pagename, 'Castanho' ),
        ['careca'] = HF.CategoryLink( 'Careca', vars.Pagename, 'Careca' ),
        ['nenhum'] = HF.CategoryLink( 'Sem Cabelo', vars.Pagename, 'Sem Cabelo' ),
        ['n/a'] = HF.CategoryLink( 'Sem Cabelo', vars.Pagename, 'Sem Cabelo' ),
        ['sem cabelo'] = HF.CategoryLink( 'Sem Cabelo', vars.Pagename, 'Sem Cabelo' ),
    }
    for i, v in ipairs(input) do
        if cabelo[string.lower( v )] then
            table.insert( o, cabelo[string.lower( v )] )
        elseif mw.site.stats.pagesInCategory( 'Cabelo ' .. HF.firstToUpper(v), 'pages' ) > 0 then
                table.insert( o, 
                    HF.CategoryLink( 'Cabelo ' .. HF.firstToUpper(v), vars.Pagename, v )
                )
        else
            table.insert( o, HF.firstToUpper(v) )
        end
    end
    return table.concat( o, ' · ' )
end
 
function Infobox._Skin( field, vars )
    if field.Value2 then 
        field.Value = field.Value .. ',' .. field.Value2 end
    local o = {}
    local input = HF.explode( ',', field.Value )
    local skin = {
        ['nenhum'] = HF.CategoryLink( 'Sem Pele', vars.Pagename, 'Sem Pele' ),
        ['sem pele'] = HF.CategoryLink( 'Sem Pele', vars.Pagename, 'Sem Pele' ),
        ['n/a'] = HF.CategoryLink( 'Sem Pele', vars.Pagename, 'Sem Pele' ),
    }
    for i, v in ipairs(input) do
        if skin[string.lower( v )] then
            table.insert( o, skin[string.lower( v )] )
        elseif mw.site.stats.pagesInCategory( 'Pele ' .. HF.firstToUpper(v), 'pages' ) > 0 then
                table.insert( o, 
                    HF.CategoryLink( 'Pele ' .. HF.firstToUpper(v), vars.Pagename, v )
                )
        else
            table.insert( o, HF.firstToUpper(v) )
        end
    end
    return table.concat( o, ' · ' )
end

function Infobox._AtributosIncomuns( field, vars )
    local output = field.Value
    if not HF.isempty( field.ValueRef ) then
        output = output .. "&nbsp;" .. field.ValueRef
    end
    return output
end
 
function Infobox._Origin( field, vars )
    local output = field.Value
    local origins = {
        ["alienígena"] = {"Alienígena"},
        ["deidade"] = {"Deidades"},
        ["clone"] = {"Clones"},
        ["ciborgue"] = {"Ciborgues"},
        ["cibernético"] = {"Ciborgues"},
        ["divindade"] = {"Divindade"},
        ["mutante"] = {"Mutantes"},
        ["mutate"] = {"Mutates"},
        ["zumbi"] = {"Zumbis"},
        ["mágico"] = {"Mágicos"},
        ["lobisomem"] = {"Lobisomens"},
        ["metahumano"] = {"Metahumanos"},
        ["seres cósmicos"] = {"Seres Cósmicos"},
        ["cópia"] = {"Cópias"},
        ["gestalt"] = {"Personagens da Gestalt"},
        ["raio gama"] = {"Exposição ao Raio Gama"},
        ["viajantes do tempo"] = {"Viajantes do Tempo"},
        ["raio cósmico"] = {"Exposição de Raios Cósmicos"},
        ["entidades psiónicas"] = {"Entidades Psiónicas"},
        ["vampiro"] = {"Vampiros", "Mortos-Vivos]"},
        ["híbrido humano/alienígena"] = {"Híbridos Humano/Alienígena"},
        ["híbrido"] = {"Híbridos"},
        ["feiticeiro"] = {"Mágicos"},
        ["magos"] = {"Mágicos"},
        ["usuário de magia"] = {"Mágicos"},
        ["bruxo"] = {"Mágicos"},
        ["neo "] = {"NeoMutantes"},
        ["morto-vivo"] = {"Mortos-Vivos"},
        ["valquíria"] = {"Valquírias"},
        ["warpie"] = {"WarpiesMutates"},
        ["terrigenêse"] = {"Terrigenêse]"},
        ["inhumano"] = {"Inhumanos]"},
        ["sentinela"] = {"Sentinelas"},
        ["kree sentr"] = {"Sentinelas Kree"},
        ["wendigo"] = {"Wendigos"},
        ["vi-lock "] = {"Vi-LocksTechno-Orgânico Vírus"},
        ["robôs"] = {"Robôs"},
        ["robótico"] = {"Robôs"},
        ["iônico"] = {"Personagens Iônicos"},
        ["psiônico"] = {"Personagens Iônicos"},
        ["seres cósmico"] = {"Seres Cósmicos"},
        ["entidade cósmica"] = {"Seres Cósmicos"},
        ["super-soldado"] = {"Super-Soldados"},
        ["super soldado"] = {"Super-Soldado"},
    }
    
    for key, value in pairs(origins) do
        if string.find( string.lower(field.Value), key ) ~= nil then
            for i, category in ipairs( value ) do
                output = output ..
                HF.CategoryLink( category, vars.Pagename, "" )
            end
        end
    end
    return output
end

function Infobox._Universe( field )
    local o = {}
    local universes = HF.explode( ';', field.Value )

    for i, universe in ipairs( universes ) do
        local output = ""
        local UniverseNo    = string.match( universe, "%d+" )
        local UniverseTRN   = string.match( string.lower( universe ), 'trn' )
        local UniverseValid = universe
        
        if UniverseNo ~= nil then
            output = output .. HF.Link( UniverseValid )
            output = output .. HF.CategoryLink( 
                'Personagens ' .. 'de ' .. UniverseValid,
                vars.Pagename,
                '' )
        else
            output = output .. HF.Link( universe )
            output = output .. HF.CategoryLink(
                'Personagens ' .. 'de ' .. universe,
                vars.Pagename,
                '' )
        end
        table.insert( o, output )
    end
    
    output = table.concat( o, ' · ' )
    if not HF.isempty( field.Value2 ) then
        output = output .. ' ' .. field.Value2
    end
    if not HF.isempty( field.ValueRef ) then
        output = output .. ' ' .. field.ValueRef
    end
    
    return output
end

function Infobox._Sector( field, vars )
  local output = HF.Link( 'Setor ' .. field.Value, 'Setor ' .. field.Value )
  -- if string.find( vars.Theme, "greenlantern" ) ~= nil then
  --    output = output .. HF.Category( "Green Lantern Corps member", vars.Pagename )
  -- end
  return output
end
 
function Infobox._Ctry( field, vars )
  local substitutes = {
      ["EUA"] = "Estados Unidos da América",
      ["US"] = "Estados Unidos da América",
      ["Estados Unidos"] = "Estados Unidos da América",
      ["E.U.A."] = "Estados Unidos da Américaa",
      ["América"] = "Estados Unidos da América"
      }
  local output = ""
 
  if string.find( field.Value, "%[%[.+%]%]" ) == nil then
    if type( substitutes[field.Value] ) == "string" then
      output = HF.Link( substitutes[field.Value] )
    else
      output = HF.Link( field.Value )
    end
  else
    output = field.Value
  end
 
  return output
end
 
function Infobox._Creators( field, vars )
    local o = {}
    local categories = {}
    
    local creators = HF.explode( ';', field.Value )
    for i, creator in ipairs( creators ) do
        if type( creator ) ~= nil then
            creator = HF.ContributorNameCorrection( HF.trim(creator) )
            table.insert(categories, HF.CategoryLink( creator .. "/Criador", vars.Pagename, "" ) )
            table.insert(o, HF.Link( creator, creator ) )
        else 
            table.insert(o,
                CategoryLink ("Criadores do Personagem Necessários",
                    vars.Pagename, "" )
            )
        end
    end

    out = { table.concat(o, ', '), field.Value2 }
    return table.concat(out, ' ') .. table.concat(categories)
end
 
function Infobox._OriginalPublisher( field, vars )
local output = field.Value
 
  if string.lower( field.Value ) ~= "dc" then
    output = output .. HF.CategoryLink( "Personagens " .. "da " .. field.Value, vars.Pagename, "" )
  end
 
return output
end
 
return Infobox
O conteúdo da comunidade está disponível sob CC-BY-SA salvo indicação em contrário.