diff --git a/__init__.py b/__init__.py index e1526c0..8102e3d 100644 --- a/__init__.py +++ b/__init__.py @@ -94,7 +94,7 @@ def handle_contact_support(self, message: Message): diagnostic_info["user_description"] = user_description attachment_files = self._parse_attachments( self._get_attachments(diagnostic_info)) - if self.send_email(self.translate("email_title"), + if self.send_email(self.resources.render_dialog("email_title"), self._format_email_body(diagnostic_info), message, email_addr, attachments=attachment_files): @@ -103,7 +103,7 @@ def handle_contact_support(self, message: Message): private=True) return LOG.error("Email failed to send, retry without attachments") - if self.send_email(self.translate("email_title"), + if self.send_email(self.resources.render_dialog("email_title"), self._format_email_body(diagnostic_info), message, email_addr): self.speak_dialog("complete", @@ -148,11 +148,11 @@ def _format_email_body(self, diagnostics: dict) -> str: :param diagnostics: diagnostic data to format into the email. :returns: email body to send """ - return '\n\n'.join((self.translate("email_intro", - {"email": self.support_email}), + return '\n\n'.join((self.resources.render_dialog("email_intro", + {"email": self.support_email}), diagnostics.get('user_description') or "No Description Provided", - self.translate("email_signature"))) + self.resources.render_dialog("email_signature"))) def _check_service_status(self, message: Message = None) -> dict: """