Checks if a message has a translation (it does not take into account
        the fallback mechanism).

        @rtype: bool
        @return: true if the message has a translation, false otherwise

def defines(self, id, domain='messages'):
        """
        Checks if a message has a translation (it does not take into account
        the fallback mechanism).

        @rtype: bool
        @return: true if the message has a translation, false otherwise
        """
        assert isinstance(id, (str, unicode))
        assert isinstance(domain, (str, unicode))

        return id in self.messages.get(domain, {})