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 .. '|' .. | return '[[' .. link .. '|' .. labelM .. ']]' | ||
else | else | ||
return '[[' .. link .. ']]' | return '[[' .. link .. ']]' | ||
| Línea 156: | Línea 162: | ||
return args.value | return args.value | ||
end | end | ||
return formatStatements( frame.args ) | |||
end | end | ||
return p | return p | ||