Mòdul:Wikidata/formatatge

Un article de Wikipèdia, l'enciclopèdia liura.

La documentacion d'utilizacion d'aquel modul se pòt crear a Mòdul:Wikidata/formatatge/ús

local p = {}

function p.formatImatge(value, options)
    local str = '[[Imatge:' .. value 
    if options.legenda then
        str = str .. '|' .. options.legenda
    end
    if options['talha'] then
        str = str .. '|'.. options.talha
    else
        str = str .. '|250px'
    end
    return str .. ']]'
end
function p.formatModel(value, options)
    local str = '{{' .. value 
    return str .. '}}'
end
function p.formatBandiera(value, options)
    --local label = mw.wikibase.label( entityId )
    --local str2 = frame:expandTemplate{title = 'bandera2', args = {mw.wikibase.label( 'q' .. value['numeric-id'] )}} 
    local str2 = '{{bandièra2|' .. mw.wikibase.label( 'q' .. value['numeric-id'] ) ..'}}'

    return str2 
end
return p