code: def add_resource(self, format, resource, locale, domain=None):
          
          if domain is None:
              domain = 'messages'
  
          self._assert_valid_locale(locale)
          self.resources[locale].append([format, resource, domain])
          if locale in self.fallback_locales:
              self.catalogues = {}
          else:
              self.catalogues.pop(locale, None)
docs: Adds a resource
          @type format: str
          @param format: Name of the loader (@see add_loader)
  
          @type resource: str
          @param resource: The resource name
  
          @type locale: str
          @type domain: str
  
          @raises: ValueError If the locale contains invalid characters
          @return: