def get_catalogue(self, locale):
if locale is None:<EOL><INDENT>locale = self.locale<EOL><DEDENT>if locale not in self.catalogues or datetime.now() - self.last_reload > timedelta(seconds=<NUM_LIT:1>):<EOL><INDENT>self._load_catalogue(locale)<EOL>self.last_reload = datetime.now()<EOL><DEDENT>return self.catalogues[locale]<EOL>
Reloads messages catalogue if requested after more than one second
since last reload