Diferencia entre revisiones de «Módulo:Wikibase»
Página creada con «-- Module:Wikibase local p = {} -- Return the item ID of the item linked to the current page. function p.id(frame) if not mw.wikibase then return "wiki...» |
Sin resumen de edición |
||
| Línea 2: | Línea 2: | ||
local p = {} | local p = {} | ||
-- | -- Devuelve la ID del ítem, el nombre o el enlace de la página en la wiki local. | ||
function p.id(frame) | function p.id(frame) | ||
if not mw.wikibase then | if not mw.wikibase then | ||
return "wikibase | return "módulo wikibase no encontrado" | ||
end | end | ||
| Línea 11: | Línea 11: | ||
if entity == nil then | if entity == nil then | ||
return "(no | return "(página no conectada a ítem de Wikidata)" | ||
end | end | ||
| Línea 17: | Línea 17: | ||
end | end | ||
-- | -- Devuelva la etiqueta de un ítem dado. | ||
function p.label(frame) | function p.label(frame) | ||
if frame.args[1] == nil then | if frame.args[1] == nil then | ||
| Línea 31: | Línea 31: | ||
end | end | ||
-- | -- Devuelve la página local de un ítem dado. | ||
function p.page(frame) | function p.page(frame) | ||
if frame.args[1] == nil then | if frame.args[1] == nil then | ||