Modul:Wikidata/Formatters/wikibase-entityid
Vzhled
local p = {}
local function getLinkWhenNonexistingLabel( entityId )
local title = mw.title.getCurrentTitle().text
return '[[Soubor:Wikidata-edit.svg|27x17px|link=d:' .. entityId .. '|Položka na Wikidatech neobsahuje český štítek; můžete ho doplnit]]<code>[[d:' .. entityId .. '|' .. entityId .. ']]</code>[[Kategorie:Údržba:Doplnit štítek na Wikidatech|' .. title .. ']]'
end
function p.formatEntityId( entityId, options )
local label = mw.wikibase.label( entityId )
local link = mw.wikibase.sitelink( entityId )
if link then
if label then
return '[[' .. link .. '|' .. label .. ']]'
else
return '[[' .. link .. ']]'
end
elseif label then
return label
else
return getLinkWhenNonexistingLabel( entityId )
end
end
return p