Modulo:Wikidata/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
+parametro snaktype
migliorata formatEntityId: wikilink usando label quando sitelink=label e controllo maiuscola
Riga 87:
local function formatEntityId(entityId)
local label = mw.wikibase.getLabel(entityId)
local linksiteLink = mw.wikibase.getSitelink(entityId)
local ret
if linksiteLink and label then
ret = mw.getContentLanguage():ucfirst(label) and label ~== link)siteLink and
string.format('[[%s|%s]]', link, label) or
string.format('[[%s|%s]]', linksiteLink, label)
elseif siteLink then
ret = string.format('[[%s]]', siteLink)
elseif label then
ret = label
else
ret = label or ''
end
return ret