Módulo:Infobox/Bebida

Origem: Wikipédia, a enciclopédia livre.
Documentação do módulo[ver] [editar] [histórico] [purgar]

Descrição[editar código-fonte]

Este módulo implementa a predefinição {{Info/Bebida}}

Uso[editar código-fonte]

Outra documentação:

local general = require 'Módulo:Infobox/Funções'
local material = require 'Módulo:Material'
local wikidata = require 'Módulo:Infobox/Wikidata'

return {
    maincolor = '#FFD39B',
    secondcolor = '#FFD39B',
    --thirdcolor = '#FFD39B',
    parts = {
        {
            type = 'title',
            value = function(localdata)
                return localdata['título']
                    or wikidata.getLabel(localdata.item) and mw.language.getContentLanguage():ucfirst( wikidata.getLabel(localdata.item) )
                    or mw.title.getCurrentTitle().text
            end,
            icon = 'cerveja',
            subtitle = 'título_original',
        },
        general.mainimage("!Artigos sem imagens"),
        {type = 'table', rows = {
            {type = 'row', label = 'Tipo', plurallabel= 'Tipos', value = {'tipo', 'Definição'}, property = {'P31', 'P239'}},
            {type = 'row', label = 'Fabricante', plurallabel= 'Fabricantes', value = {'fabricante', 'Fabricante'}, property = 'P176'},
            {type = 'row', label = 'Distribuidor', value = {'distribuidor', 'Distribuidor'}, property = 'P750'},
            {type = 'row', label = 'Comercialização', value = {'comercialização', 'Comercialização'}},
            {type = 'row', label = 'País de origem', plurallabel= 'Países de origem', value = 'país', property = {'P17', 'P495'}},
            {type = 'row', label = 'Introduzida', value = 'introduzida', wikidata = { property = "P571", conjtype= "or"}},
            {type = 'row', label = 'Descontinuada', value = {'descontinuada', 'Descontinuada'}},
            {type = 'row', label = 'Slogan', value = {'slogan', 'Slogan'}},
            {type = 'row', label = 'Adaptado de', value = 'adaptado', property = 'P144'},
            {type = 'row', label = 'Técnica', plurallabel= 'Técnicas', value = {'técnica', 'tecnica'}, property = {'P186', 'P2079'}},
            {type = 'row', label = 'Fermentação', value = 'levedura'},
            {type = 'row', label = 'Material', value = function( localdata )
                    if localdata['tipo'] or localdata['técnica'] or localdata['tecnica'] then  -- o material é algumas vezes contido no parâmetro "type", não use wikidata neste caso
                        return nil
                    end
                    return material.formatFromItem(localdata.item)
                    end
            },
            {type = 'row', label = 'Origem', plurallabel = 'Origens', value = {'origem', 'Origem'}, property = 'P1071'},
            {type = 'row', label = 'Criador', plurallabel = 'Criadores', value = 'Criador'},
            {type = 'row', label = 'Volume de álcool', value = 'volume de álcool'},
            {type = 'row', label = 'Teor alcoólico', value = 'teor alcoólico', property = 'P2665'},
            {type = 'row', label = 'Álcool(ABV)', value = 'abv'},
{type = 'row', label = '[[Caloria|Teor calórico]]', value = {'teor calórico', 'Teor calórico'}},
            {type = 'row', label = '[[Edulcorante|Edulcorante(s)]]', value = {'edulcorante(s)', 'Educolrante(s)'}},
            {type = 'row', label = '[[Acidulante|Acidulante(s)]]', value = {'acidulante(s)', 'Acidulante(s)'}},
            {type = 'row', label = '[[Conservante|>Conservante(s)]]', value = {'conservante(s)', 'Conservante(s)'}},
            {type = 'row', label = 'Amargura da cerveja', value = 'amargura', property = 'P6088'},
            {type = 'row', label = 'Cor', value = {'cor', 'Cor'}, property = 'P6089'},
            {type = 'row', label = 'Tem característica', value = 'característica', property = 'P1552'},
            {type = 'row', label = '[[Sabor (alimentos)|Sabor]]', value = {'sabor', 'Sabor'}},
            {type = 'row', label = 'Amargor([[International_Bitterness_Units_scale|IBU]])', value = 'ibu'},
            {type = 'row', label = 'OG', value = 'og'},
            {type = 'row', label = 'FG', value = 'fg'},
            {type = 'row', label = 'Variante(s)', value = {'variante(s)', 'Variante(s)'}},
            {type = 'row', label = 'Temperatura', value = 'temperatura'},
            {type = 'row', label = 'Relacionada(s)', value = {'relacionada(s)', 'Relacionada(s)', 'nomes'}},
            {type = 'row', label = 'Epónimo', value = 'epónimo', property = 'P138'},
            {type = 'row', label = 'Parte de', value = 'parte de', property = 'P361'},
            {type = 'row', label = 'Inscrição', plurallabel = 'Inscrições', value = 'inscrição', wikidata = {property = 'P1684', conjtype = '<br />', numval = '3', rank = 'best'}},
            {type = 'row', label = 'Commentário', value =  {'commentário', 'descrição', 'descricao'}},
            general.website(),
        }},
    }
}