chore: rewrite user-facing JS messages in Buying 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.
This commit is contained in:
Mihir Kandoi
2026-06-25 17:30:25 +05:30
parent b0887e03fe
commit 41c7f2fd48

View File

@@ -590,16 +590,14 @@ erpnext.buying.PurchaseOrderController = class PurchaseOrderController extends (
me.frm.doc.items[i].qty = my_qty;
frappe.msgprint(
"Assigning " +
d.mr_name +
" to " +
d.item_code +
" (row " +
me.frm.doc.items[i].idx +
")"
__("Assigning {0} to {1} (row {2})", [
d.mr_name,
d.item_code,
me.frm.doc.items[i].idx,
])
);
if (qty > 0) {
frappe.msgprint("Splitting " + qty + " units of " + d.item_code);
frappe.msgprint(__("Splitting {0} units of {1}", [qty, d.item_code]));
var new_row = frappe.model.add_child(
me.frm.doc,
me.frm.doc.items[i].doctype,