Merge pull request #56471 from mihir-kandoi/messages/setup

chore: rewrite user-facing messages in setup module
This commit is contained in:
Mihir Kandoi
2026-06-25 17:54:53 +05:30
committed by GitHub
3 changed files with 5 additions and 3 deletions

View File

@@ -46,7 +46,9 @@ class ItemGroup(NestedSet):
frappe.throw(
_("{0} entered twice {1} in Item Taxes").format(
frappe.bold(d.item_tax_template),
f"for tax category {frappe.bold(d.tax_category)}" if d.tax_category else "",
_("for tax category {0}").format(frappe.bold(d.tax_category))
if d.tax_category
else "",
)
)
else:

View File

@@ -646,7 +646,7 @@ class TransactionDeletionRecord(Document):
def validate_doc_status(self):
if self.status != "Running":
frappe.throw(
_("{0} is not running. Cannot trigger events for this Document").format(
_("{0} is not running. Cannot trigger events for this document").format(
get_link_to_form("Transaction Deletion Record", self.name)
)
)

View File

@@ -11,7 +11,7 @@ from frappe import _
def setup_taxes_and_charges(company_name: str, country: str):
if not frappe.db.exists("Company", company_name):
frappe.throw(_("Company {} does not exist yet. Taxes setup aborted.").format(company_name))
frappe.throw(_("Company {0} does not exist yet. Taxes setup aborted.").format(company_name))
file_path = os.path.join(os.path.dirname(__file__), "..", "data", "country_wise_tax.json")
with open(file_path) as json_file: