From d451eddac2659036ed884c0787a5f15a2e03cf77 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 25 Jun 2026 17:30:17 +0530 Subject: [PATCH] chore: rewrite user-facing JS messages in Setup 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. --- erpnext/setup/doctype/company/company.js | 2 +- erpnext/setup/doctype/department/department.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index 66971a354b4..2173804a86f 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -236,7 +236,7 @@ frappe.ui.form.on("Company", { }, function (data) { if (data.company_name !== frm.doc.name) { - frappe.msgprint(__("Company name not same")); + frappe.msgprint(__("Company name does not match")); return; } frappe.call({ diff --git a/erpnext/setup/doctype/department/department.js b/erpnext/setup/doctype/department/department.js index d703a52fc50..73c9265e94d 100644 --- a/erpnext/setup/doctype/department/department.js +++ b/erpnext/setup/doctype/department/department.js @@ -16,7 +16,7 @@ frappe.ui.form.on("Department", { }, validate: function (frm) { if (frm.doc.name == "All Departments") { - frappe.throw(__("You cannot edit root node.")); + frappe.throw(__("You cannot edit the root node.")); } }, });