For example have a look to the netext dict in welcome.py. Looking up the 'commons' entry is successful for a site object but it fails for a bare 'commons' code:
>>> import pwb, pywikibot as py
>>> from pywikibot.i18n import translate
>>> from scripts.welcome import netext
>>> s = py.Site('commons', 'commons')
>>> translate(s, netext)
'{{subst:welcome}} %s'
>>> translate('commons', netext) is None
True