Skip to content

Commit

Permalink
Remove deprecated calls to self.translate (#78)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel McKnight <daniel@neon.ai>
  • Loading branch information
NeonDaniel and Daniel McKnight committed May 20, 2024
1 parent 80d4104 commit 41fd931
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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",
Expand Down Expand Up @@ -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:
"""
Expand Down

0 comments on commit 41fd931

Please sign in to comment.