From a1e98a85863861ffb63b85fa6915e8be2d8a1b65 Mon Sep 17 00:00:00 2001 From: Ejaaz Khan Date: Mon, 20 Jan 2025 16:50:03 +0530 Subject: [PATCH] refactor: use translate function to show error --- frappe/automation/doctype/auto_repeat/auto_repeat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/automation/doctype/auto_repeat/auto_repeat.py b/frappe/automation/doctype/auto_repeat/auto_repeat.py index 2ab1ab12c4..0e6adf704a 100644 --- a/frappe/automation/doctype/auto_repeat/auto_repeat.py +++ b/frappe/automation/doctype/auto_repeat/auto_repeat.py @@ -105,7 +105,7 @@ class AutoRepeat(Document): else: self.next_schedule_date = self.get_next_schedule_date(schedule_date=self.start_date) if self.end_date and getdate(self.end_date) < getdate(self.next_schedule_date): - frappe.throw("The Next Scheduled Date cannot be later than the End Date.") + frappe.throw(_("The Next Scheduled Date cannot be later than the End Date.")) def unlink_if_applicable(self): if self.status == "Completed" or self.disabled: @@ -224,7 +224,7 @@ class AutoRepeat(Document): self.send_notification(new_doc) except Exception: error_log = self.log_error( - "Auto repeat failed. Please enable auto repeat after fixing the issues." + _("Auto repeat failed. Please enable auto repeat after fixing the issues.") ) self.disable_auto_repeat()