diff --git a/erpnext/public/js/bulk_transaction_processing.js b/erpnext/public/js/bulk_transaction_processing.js index e1906c4f55b..406d31010b9 100644 --- a/erpnext/public/js/bulk_transaction_processing.js +++ b/erpnext/public/js/bulk_transaction_processing.js @@ -25,10 +25,9 @@ $.extend(erpnext.bulk_transaction_processing, { }) .then(() => {}); if (count_of_rows > 10) { - frappe.show_alert("Starting a background job to create {0} {1}", [ - count_of_rows, - __(to_doctype), - ]); + frappe.show_alert( + __("Starting a background job to create {0} {1}", [count_of_rows, __(to_doctype)]) + ); } } else { frappe.msgprint(__("Selected document must be in submitted state")); diff --git a/erpnext/public/js/controllers/accounts.js b/erpnext/public/js/controllers/accounts.js index 97e40f490d6..0e93d9566b0 100644 --- a/erpnext/public/js/controllers/accounts.js +++ b/erpnext/public/js/controllers/accounts.js @@ -228,7 +228,7 @@ erpnext.accounts.taxes = { on_previous_row_error(tax.row_id == 1 ? "1" : "1 - " + tax.row_id); } } else if (tax.category == "Valuation") { - frappe.throw(__("Valuation type charges can not marked as Inclusive")); + frappe.throw(__("Valuation type charges cannot be marked as Inclusive")); } } }, diff --git a/erpnext/public/js/controllers/buying.js b/erpnext/public/js/controllers/buying.js index 5c556287c6c..14b9f7f8483 100644 --- a/erpnext/public/js/controllers/buying.js +++ b/erpnext/public/js/controllers/buying.js @@ -552,10 +552,10 @@ erpnext.buying.link_to_mrs = function (frm) { item.qty = my_qty; frappe.msgprint( - "Assigning " + d.mr_name + " to " + d.item_code + " (row " + item.idx + ")" + __("Assigning {0} to {1} (row {2})", [d.mr_name, d.item_code, item.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 newrow = frappe.model.add_child(frm.doc, item.doctype, "items"); item_length++; diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 1843cb02b47..67f16c5fbd5 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -2635,11 +2635,9 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe ) { if (!me.frm.doc[fieldname]) { frappe.msgprint( - __("Please specify") + - ": " + - __(frappe.meta.get_label(me.frm.doc.doctype, fieldname, me.frm.doc.name)) + - ". " + - __("It is needed to fetch Item Details.") + __("Please specify {0}. It is needed to fetch Item Details.", [ + __(frappe.meta.get_label(me.frm.doc.doctype, fieldname, me.frm.doc.name)), + ]) ); valid = false; } diff --git a/erpnext/public/js/utils/sales_common.js b/erpnext/public/js/utils/sales_common.js index d1d5d77f285..3d11b27a3be 100644 --- a/erpnext/public/js/utils/sales_common.js +++ b/erpnext/public/js/utils/sales_common.js @@ -331,9 +331,15 @@ erpnext.sales_common = { if (this.frm.doc.commission_rate > 100) { this.frm.set_value("commission_rate", 100); frappe.throw( - `${__( - frappe.meta.get_label(this.frm.doc.doctype, "commission_rate", this.frm.doc.name) - )} ${__("cannot be greater than 100")}` + __("{0} cannot be greater than 100", [ + __( + frappe.meta.get_label( + this.frm.doc.doctype, + "commission_rate", + this.frm.doc.name + ) + ), + ]) ); } diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js index fd1e0c4167f..3e5f77203ea 100644 --- a/erpnext/public/js/utils/serial_no_batch_selector.js +++ b/erpnext/public/js/utils/serial_no_batch_selector.js @@ -660,7 +660,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { } if ((entries && !entries.length) || !entries) { - frappe.throw(__("Please add atleast one Serial No / Batch No")); + frappe.throw(__("Please add at least one Serial No / Batch No")); } if (!warehouse) { @@ -668,7 +668,7 @@ erpnext.SerialBatchPackageSelector = class SerialNoBatchBundleUpdate { } if (this.item?.is_rejected && this.item.rejected_warehouse === this.item.warehouse) { - frappe.throw(__("Rejected Warehouse and Accepted Warehouse cannot be same.")); + frappe.throw(__("Rejected Warehouse and Accepted Warehouse cannot be the same.")); } frappe