js translations refactor
This commit is contained in:
parent
b52618c142
commit
b0f279a34e
@ -274,7 +274,7 @@ erpnext.POS = Class.extend({
|
||||
if(!me.frm.doc[me.party.toLowerCase()] && ((me.frm.doctype == "Quotation" &&
|
||||
me.frm.doc.quotation_to == "Customer")
|
||||
|| me.frm.doctype != "Quotation")) {
|
||||
msgprint("Please select " + me.party + " first.");
|
||||
msgprint("Please select {0} first.", [me.party]);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -605,4 +605,4 @@ erpnext.POS = Class.extend({
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
@ -61,11 +61,11 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
|
||||
var me = this;
|
||||
this.validate_salary_structure(btn, function(r) {
|
||||
if(r.message) {
|
||||
msgprint(__("Employee") + ' "' + me.frm.doc.name + '": '
|
||||
+ __("An active Salary Structure already exists. \
|
||||
msgprint(__("Employee {0}:\
|
||||
An active Salary Structure already exists. \
|
||||
If you want to create new one, please ensure that no active \
|
||||
Salary Structure exists for this Employee. \
|
||||
Go to the active Salary Structure and set \"Is Active\" = \"No\""));
|
||||
Go to the active Salary Structure and set \"Is Active\" = \"No\"", [me.frm.doc.name]));
|
||||
} else if(!r.exc) {
|
||||
frappe.model.map({
|
||||
source: me.frm.doc,
|
||||
|
@ -90,8 +90,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
|
||||
validate_company_and_party: function(party_field) {
|
||||
if(!this.frm.doc.quotation_to) {
|
||||
msgprint(__("Please select a value for" + " " +
|
||||
frappe.meta.get_label(this.frm.doc.doctype, "quotation_to", this.frm.doc.name)));
|
||||
msgprint(__("Please select a value for {0} quotation_to {1}", [this.frm.doc.doctype, this.frm.doc.name]));
|
||||
return false;
|
||||
} else if (this.frm.doc.quotation_to == "Lead") {
|
||||
return true;
|
||||
@ -166,4 +165,4 @@ cur_frm.cscript['Declare Order Lost'] = function(){
|
||||
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
||||
if(cint(frappe.boot.notification_settings.quotation))
|
||||
cur_frm.email_doc(frappe.boot.notification_settings.quotation_message);
|
||||
}
|
||||
}
|
||||
|
@ -181,7 +181,6 @@ cur_frm.cscript.image = function() {
|
||||
if(!cur_frm.doc.description_html)
|
||||
cur_frm.cscript.add_image(cur_frm.doc);
|
||||
else {
|
||||
msgprint(__("You may need to update: ") +
|
||||
frappe.meta.get_docfield(cur_frm.doc.doctype, "description_html").label);
|
||||
msgprint(__("You may need to update: {0}", [frappe.meta.get_docfield(cur_frm.doc.doctype, "description_html").label]));
|
||||
}
|
||||
}
|
||||
|
@ -78,8 +78,7 @@ cur_frm.cscript.validate_duplicate_items = function(doc, ps_detail) {
|
||||
}
|
||||
}
|
||||
if(flt(ps_detail[i].qty)<=0) {
|
||||
msgprint(__("Invalid quantity specified for item ") + ps_detail[i].item_code +
|
||||
"."+__(" Quantity should be greater than 0."));
|
||||
msgprint(__("Invalid quantity specified for item {0}. Quantity should be greater than 0.", [ps_detail[i].item_code]));
|
||||
validated = false;
|
||||
}
|
||||
}
|
||||
@ -95,9 +94,7 @@ cur_frm.cscript.calc_net_total_pkg = function(doc, ps_detail) {
|
||||
for(var i=0; i<ps_detail.length; i++) {
|
||||
var item = ps_detail[i];
|
||||
if(item.weight_uom != doc.net_weight_uom) {
|
||||
msgprint(__("Different UOM for items will lead to incorrect")+
|
||||
__("(Total) Net Weight value. Make sure that Net Weight of each item is")+
|
||||
__("in the same UOM."))
|
||||
msgprint(__("Different UOM for items will lead to incorrect (Total) Net Weight value. Make sure that Net Weight of each item is in the same UOM."));
|
||||
validated = false;
|
||||
}
|
||||
net_weight_pkg += flt(item.net_weight) * flt(item.qty);
|
||||
@ -123,4 +120,4 @@ cur_frm.pformat.net_weight_pkg= function(doc){
|
||||
|
||||
cur_frm.pformat.gross_weight_pkg= function(doc){
|
||||
return '<table style="width:100%">' + make_row('Gross Weight', doc.gross_weight_pkg) + '</table>'
|
||||
}
|
||||
}
|
||||
|
@ -63,8 +63,8 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
|
||||
}
|
||||
|
||||
if(item.qty > item.received_qty) {
|
||||
msgprint(__("Error") + ": " + __(frappe.meta.get_label(item.doctype, "qty", item.name))
|
||||
+ " > " + __(frappe.meta.get_label(item.doctype, "received_qty", item.name)));
|
||||
msgprint(__("Error: {0} > {1}", [__(frappe.meta.get_label(item.doctype, "qty", item.name)),
|
||||
__(frappe.meta.get_label(item.doctype, "received_qty", item.name))]))
|
||||
item.qty = item.rejected_qty = 0.0;
|
||||
} else {
|
||||
item.rejected_qty = flt(item.received_qty - item.qty, precision("rejected_qty", item));
|
||||
@ -78,9 +78,8 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
|
||||
frappe.model.round_floats_in(item, ["received_qty", "rejected_qty"]);
|
||||
|
||||
if(item.rejected_qty > item.received_qty) {
|
||||
msgprint(__("Error") + ": " +
|
||||
__(frappe.meta.get_label(item.doctype, "rejected_qty", item.name))
|
||||
+ " > " + __(frappe.meta.get_label(item.doctype, "received_qty", item.name)));
|
||||
msgprint(__("Error: {0} > {1}", [__(frappe.meta.get_label(item.doctype, "rejected_qty", item.name)),
|
||||
__(frappe.meta.get_label(item.doctype, "received_qty", item.name))]));
|
||||
item.qty = item.rejected_qty = 0.0;
|
||||
} else {
|
||||
item.qty = flt(item.received_qty - item.rejected_qty, precision("qty", item));
|
||||
@ -170,4 +169,4 @@ cur_frm.fields_dict.purchase_receipt_details.grid.get_field("qa_no").get_query =
|
||||
cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
|
||||
if(cint(frappe.boot.notification_settings.purchase_receipt))
|
||||
cur_frm.email_doc(frappe.boot.notification_settings.purchase_receipt_message);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user