def add_resource(self, format, resource, locale, domain=None):
if domain is None:<EOL><INDENT>domain = '<STR_LIT>'<EOL><DEDENT>self._assert_valid_locale(locale)<EOL>self.resources[locale].append([format, resource, domain])<EOL>if locale in self.fallback_locales:<EOL><INDENT>self.catalogues = {}<EOL><DEDENT>else:<EOL><INDENT>self.catalogues.pop(locale, None)<EOL><DEDENT>
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: