From b161e5aa796fa92bf0b48f247713143dea7f3105 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 25 Jun 2026 16:21:57 +0530 Subject: [PATCH] chore: rewrite user-facing messages in Crm module Conservative cleanup of frappe.throw/msgprint messages per the message style guide; meaning, severity, and .format() arguments are unchanged: - index bare {} placeholders as {0}/{1}/... so translators can reorder - move f-strings / .format() / concatenation out of _() (they break gettext extraction and never translate) - wrap translatable dynamic values (DocType/Select labels) in _() - fix grammar and colloquialisms - drop no-op _() wrapping runtime-built strings Part of #53976. --- .../appointment_booking_settings.py | 2 +- erpnext/crm/doctype/crm_settings/crm_settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py index 9ef01283c31..36eb21f0441 100644 --- a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py +++ b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py @@ -59,7 +59,7 @@ class AppointmentBookingSettings(Document): err_msg = _("From Time cannot be later than To Time for {0}").format( record.day_of_week ) - frappe.throw(_(err_msg)) + frappe.throw(err_msg) def duration_is_divisible(self, from_time, to_time): timedelta = to_time - from_time diff --git a/erpnext/crm/doctype/crm_settings/crm_settings.py b/erpnext/crm/doctype/crm_settings/crm_settings.py index 04e5a402add..6d7360bb6df 100644 --- a/erpnext/crm/doctype/crm_settings/crm_settings.py +++ b/erpnext/crm/doctype/crm_settings/crm_settings.py @@ -49,7 +49,7 @@ class CRMSettings(Document): if self.enable_frappe_crm_data_synchronization and not self.allowed_users: frappe.throw( _( - "Please add atleast one user on Allowed Users to allow Data Synchronization from Frappe CRM site." + "Please add at least one user on Allowed Users to allow Data Synchronization from Frappe CRM site." ) )