mw.entity.label and mw.wikibase.sitelink are expected to return nil when something is not found, rather than return an empty string.
In the old code, via getLabel in mw.wikibase.entity.lua, returning nil is indeed the behavior and i see something like http://snag.gy/aHVqG.jpg (redlinks since i don't have the category / namespace not recognized on my wiki) when labels and site links are not found.
from ru.wikipedia.org/wiki/Шаблон:Wikidata
- получение ссылки по идентификатору local link = mw.wikibase.sitelink( entityId ) if link then if label then return '[[' .. link .. '|' .. label .. ']]' else return '[[' .. link .. ']]' end end
if label then return label end - сообщение об отсутвии локализованного названия
- not good, but better than nothing return '[[d:' .. entityId .. '|' .. entityId .. ']]<span style="border-bottom: 1px dotted; cursor: help; white-space: nowrap" title="В Викиданных нет русской подписи к элементу. Вы можете помочь, указав русский вариант подписи.">?</span>' .. categoryLinksToEntitiesWithMissingLabel;
end
Version: unspecified
Severity: normal