diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index cb5e770b141..a1592d89f1e 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -158,7 +158,7 @@ class Customer(TransactionBase):
new_customer_name = f"{self.customer_name} - {cstr(count)}"
msgprint(
- _("Changed customer name to '{}' as '{}' already exists.").format(
+ _("Changed customer name to '{0}' as '{1}' already exists.").format(
new_customer_name, self.customer_name
),
title=_("Note"),
@@ -356,7 +356,7 @@ class Customer(TransactionBase):
if frappe.db.exists("Customer Group", self.name):
frappe.throw(
_(
- "A Customer Group exists with same name please change the Customer name or rename the Customer Group"
+ "A Customer Group exists with the same name. Please change the Customer name or rename the Customer Group"
),
frappe.NameError,
)
@@ -406,7 +406,7 @@ class Customer(TransactionBase):
if flt(limit.credit_limit) < outstanding_amt:
frappe.throw(
_(
- """New credit limit is less than current outstanding amount for the customer. Credit limit has to be atleast {0}"""
+ """New credit limit is less than current outstanding amount for the customer. Credit limit has to be at least {0}"""
).format(outstanding_amt)
)
@@ -440,7 +440,7 @@ class Customer(TransactionBase):
self.loyalty_program = loyalty_program[0]
else:
frappe.msgprint(
- _("Multiple Loyalty Programs found for Customer {}. Please select manually.").format(
+ _("Multiple Loyalty Programs found for Customer {0}. Please select manually.").format(
frappe.bold(self.customer_name)
)
)
diff --git a/erpnext/selling/doctype/customer/mapper.py b/erpnext/selling/doctype/customer/mapper.py
index 7f30aef8cc0..be69e7e5d6c 100644
--- a/erpnext/selling/doctype/customer/mapper.py
+++ b/erpnext/selling/doctype/customer/mapper.py
@@ -172,7 +172,7 @@ def make_address(args, is_primary_address=1, is_shipping_address=1):
if reqd_fields:
msg = _("Following fields are mandatory to create address:")
frappe.throw(
- "{}
".format(msg, "\n".join(reqd_fields)),
+ msg + "
".format("\n".join(reqd_fields)),
title=_("Missing Values Required"),
)
diff --git a/erpnext/selling/doctype/party_specific_item/party_specific_item.py b/erpnext/selling/doctype/party_specific_item/party_specific_item.py
index 77eb9095305..a0f2eaf0dff 100644
--- a/erpnext/selling/doctype/party_specific_item/party_specific_item.py
+++ b/erpnext/selling/doctype/party_specific_item/party_specific_item.py
@@ -32,4 +32,6 @@ class PartySpecificItem(Document):
},
)
if exists:
- frappe.throw(_("This item filter has already been applied for the {0}").format(self.party_type))
+ frappe.throw(
+ _("This item filter has already been applied for the {0}").format(_(self.party_type))
+ )
diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.py b/erpnext/selling/doctype/product_bundle/product_bundle.py
index 68d26494e37..10fffea5018 100644
--- a/erpnext/selling/doctype/product_bundle/product_bundle.py
+++ b/erpnext/selling/doctype/product_bundle/product_bundle.py
@@ -118,9 +118,9 @@ class ProductBundle(Document):
if len(invoice_links):
frappe.throw(
- "This Product Bundle is linked with {}. You will have to cancel these documents in order to delete this Product Bundle".format(
- ", ".join(invoice_links)
- ),
+ _(
+ "This Product Bundle is linked with {0}. You will have to cancel these documents in order to delete this Product Bundle"
+ ).format(", ".join(invoice_links)),
title=_("Not Allowed"),
)
diff --git a/erpnext/selling/page/sales_funnel/sales_funnel.py b/erpnext/selling/page/sales_funnel/sales_funnel.py
index 6ce192e95e2..e7c636ee385 100644
--- a/erpnext/selling/page/sales_funnel/sales_funnel.py
+++ b/erpnext/selling/page/sales_funnel/sales_funnel.py
@@ -16,7 +16,7 @@ def validate_filters(from_date, to_date, company):
frappe.throw(_("To Date must be greater than From Date"))
if not company:
- frappe.throw(_("Please Select a Company"))
+ frappe.throw(_("Please select a Company"))
@frappe.whitelist()
diff --git a/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.py b/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.py
index 5b98c4bf386..859156a6d23 100644
--- a/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.py
+++ b/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.py
@@ -47,7 +47,7 @@ class SalesPartnerSummaryReport:
frappe.throw(_("Please select the document type first."))
if self.filters.get("doctype") not in SALES_TRANSACTION_DOCTYPES:
- frappe.throw(_("DocType can be one of them {0}").format(comma_or(SALES_TRANSACTION_DOCTYPES)))
+ frappe.throw(_("DocType can be one of {0}").format(comma_or(SALES_TRANSACTION_DOCTYPES)))
if not self.filters.get("company"):
frappe.throw(_("Please select a company."))
diff --git a/erpnext/selling/report/sales_partner_commission_summary/test_sales_partner_commission_summary.py b/erpnext/selling/report/sales_partner_commission_summary/test_sales_partner_commission_summary.py
index 9a46bcb85db..32f71f12aaf 100644
--- a/erpnext/selling/report/sales_partner_commission_summary/test_sales_partner_commission_summary.py
+++ b/erpnext/selling/report/sales_partner_commission_summary/test_sales_partner_commission_summary.py
@@ -19,7 +19,7 @@ class SalesPartnerSummaryReportTestMixin(ERPNextTestSuite):
with self.assertRaisesRegex(
frappe.ValidationError,
- _("DocType can be one of them {0}").format(comma_or(SALES_TRANSACTION_DOCTYPES)),
+ _("DocType can be one of {0}").format(comma_or(SALES_TRANSACTION_DOCTYPES)),
):
run(self.report_name, self.filters)