def get_messages(self, locale=None):
if locale is None:<EOL><INDENT>locale = self.locale<EOL><DEDENT>if self.translator:<EOL><INDENT>def translate(error):<EOL><INDENT>return self.translator.translate(error, locale)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>def translate(error):<EOL><INDENT>return error<EOL><DEDENT><DEDENT>errors = deepcopy(self.errors)<EOL>errors = self._translate_errors(errors, translate)<EOL>return errors<EOL>
Get a dictionary of translated messages