Mòdul:WikidataBox : Diferéncia entre lei versions

Contengut suprimit Contengut apondut
Boulaur (discussion | contribucions)
mCap resum de modificació
Boulaur (discussion | contribucions)
mCap resum de modificació
Linha 109 :
end
function formatEntityId( entityId, options, tipe )
local label = mw.wikibase.label( entityId )
local link = mw.wikibase.sitelink( entityId )
 
if link and options['link']tipe == '' then
if label then
return ' [[' .. link .. '|' .. label .. ']]'
Linha 120 :
end
end
if link and options['link']tipe == 'ligam' then
if label then
return ' [[' .. link .. '|' .. label .. ']]'
Linha 127 :
end
end
if link and options['link']tipe == 'model' then
if label then
return marco:preprocess('{{coord:' .. label .. '}}')
Linha 134 :
end
end
if link and options['link'] tipe == 'imatge' then
if label then
return ' [[Imatge:' .. link .. '|' .. label .. ']]'
Linha 141 :
end
end
if link and options['link']tipe == 'categoria' then
if label then
return ' [[Categoria:' .. label .. ']]'
Linha 147 :
end
 
if link and options['link']tipe == 'non' then
if label then
return label
Linha 170 :
return formatError( 'entity-not-found' )
end
local propiedad = 'P646P856'
local cadena = entity.claims[string.lower(propiedad)]
if (cadena == nil) or (not cadena) then
return '' --TODO error?
end
a = formatStatements( cadena, frame.args, 'imatge' )
return a
-- tab[1]= formatStatements( 'p1', 'link' )