Diferencia entre revisiones de «Módulo:Wikidata»

Sin resumen de edición
Sin resumen de edición
Línea 134: Línea 134:
function formatEntityId( entityId, options )
function formatEntityId( entityId, options )
     local label = mw.wikibase.label( entityId )
     local label = mw.wikibase.label( entityId )
    local labelM = {}
 
    if options['may'] ~= 'no' then
          labelM = mw.language.new('es'):ucfirst(label)
    else
          labelM = label
    end
     local link = mw.wikibase.sitelink( entityId )
     local link = mw.wikibase.sitelink( entityId )
     if link and  options['link'] ~=  'no' then
     if link and  options['link'] ~=  'no' then
         if label then
         if label then
             return '[[' .. link .. '|' .. labelM .. ']]'
             return '[[' .. link .. '|' .. label .. ']]'
         else
         else
             return '[[' .. link .. ']]'
             return '[[' .. link .. ']]'