Bug ID: 73615
           Summary: mw.entity.label and mw.wikibase.sitelink are expected
                    to return nil
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: WikidataClient
       Web browser: ---
   Mobile Platform: ---

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 (redlinks
since i don't have the category / namespace not recognized on my wiki) when
labels and site links are not found.


    -- получение ссылки по идентификатору
    local link = mw.wikibase.sitelink( entityId )
    if link then
        if label then
            return '[[' .. link .. '|' .. label .. ']]'
            return '[[' .. link .. ']]'

    if label then
        return label
    -- сообщение об отсутвии локализованного названия
    -- not good, but better than nothing
    return '[[d:' .. entityId .. '|' .. entityId .. ']]<span
style="border-bottom: 1px dotted; cursor: help; white-space: nowrap" title="В
Викиданных нет русской подписи к элементу. Вы можете помочь, указав русский
вариант подписи.">?</span>' .. categoryLinksToEntitiesWithMissingLabel;

You are receiving this mail because:
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to