Merges translations from the given Catalogue into the current one
        only when the translation does not exist.

        This is used to provide default translations when they do not exist
        for the current locale.

        @type id: The
        @param id: message id

def add_fallback_catalogue(self, catalogue):
        """
        Merges translations from the given Catalogue into the current one
        only when the translation does not exist.

        This is used to provide default translations when they do not exist
        for the current locale.

        @type id: The
        @param id: message id

        """
        assert isinstance(catalogue, MessageCatalogue)

        # detect circular references
        c = self
        while True:
            if c.locale == catalogue.locale:
                raise ValueError(
                    'Circular reference detected when adding a '
                    'fallback catalogue for locale "%s".' %
                    catalogue.locale)
            c = c.parent
            if c is None:
                break

        catalogue.parent = self
        self.fallback_catalogue = catalogue

        for resource in catalogue.resources:
            self.add_resource(resource)