mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
Merge branch 'i18n' of git://github.com/bperretti/erpnext into bperretti-i18n
This commit is contained in:
@@ -61,7 +61,8 @@ cur_frm.cscript.has_special_chars = function(t) {
|
||||
|
||||
cur_frm.cscript.company_name = function(doc){
|
||||
if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){
|
||||
msgprint("<font color=red>Special Characters <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> are not allowed for</font>\nCompany Name <b>" + doc.company_name +"</b>")
|
||||
msgprint(("<font color=red>"+wn._("Special Characters")+" <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> "+
|
||||
wn._("are not allowed for ")+"</font>\n"+wn._("Company Name")+" <b> "+ doc.company_name +"</b>"))
|
||||
doc.company_name = '';
|
||||
refresh_field('company_name');
|
||||
}
|
||||
@@ -69,7 +70,8 @@ cur_frm.cscript.company_name = function(doc){
|
||||
|
||||
cur_frm.cscript.abbr = function(doc){
|
||||
if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){
|
||||
msgprint("<font color=red>Special Characters <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> are not allowed for</font>\nAbbr <b>" + doc.abbr +"</b>")
|
||||
msgprint("<font color=red>"+wn._("Special Characters ")+"<b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b>" +
|
||||
wn._("are not allowed for")+ "</font>\nAbbr <b>" + doc.abbr +"</b>")
|
||||
doc.abbr = '';
|
||||
refresh_field('abbr');
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
||||
// read-only for root customer group
|
||||
if(!doc.parent_customer_group) {
|
||||
cur_frm.perm = [[1,0,0], [1,0,0]];
|
||||
cur_frm.set_intro("This is a root customer group and cannot be edited.");
|
||||
cur_frm.set_intro(wn._("This is a root customer group and cannot be edited."));
|
||||
} else {
|
||||
cur_frm.set_intro(null);
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
doc = locals[dt][dn];
|
||||
var save_msg = "You must <b>Save</b> the form before proceeding";
|
||||
var err_msg = "There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists."
|
||||
var save_msg = wn._("You must ")+ "<b>"+wn._("Save ")+"</b>"+wn._("the form before proceeding");
|
||||
var err_msg = wn._("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.")
|
||||
|
||||
cur_frm.add_custom_button('View Now', function() {
|
||||
cur_frm.add_custom_button(wn._('View Now'), function() {
|
||||
doc = locals[dt][dn];
|
||||
if(doc.__unsaved != 1) {
|
||||
return $c_obj(make_doclist(dt, dn), 'get_digest_msg', '', function(r, rt) {
|
||||
@@ -16,7 +16,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
} else {
|
||||
//console.log(arguments);
|
||||
var d = new wn.ui.Dialog({
|
||||
title: 'Email Digest: ' + dn,
|
||||
title: wn._('Email Digest: ') + dn,
|
||||
width: 800
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
msgprint(save_msg);
|
||||
}
|
||||
}, 1);
|
||||
cur_frm.add_custom_button('Send Now', function() {
|
||||
cur_frm.add_custom_button(wn._('Send Now'), function() {
|
||||
doc = locals[dt][dn];
|
||||
if(doc.__unsaved != 1) {
|
||||
return $c_obj(make_doclist(dt, dn), 'send', '', function(r, rt) {
|
||||
@@ -38,7 +38,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
console.log(r.exc);
|
||||
} else {
|
||||
//console.log(arguments);
|
||||
msgprint('Message Sent');
|
||||
msgprint(wn._('Message Sent'));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@@ -56,7 +56,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
|
||||
// Open a dialog and display checkboxes against email addresses
|
||||
doc = locals[dt][dn];
|
||||
var d = new wn.ui.Dialog({
|
||||
title: 'Add/Remove Recipients',
|
||||
title: wn._('Add/Remove Recipients'),
|
||||
width: 400
|
||||
});
|
||||
var dialog_div = $a(d.body, 'div', 'dialog-div', '', '');
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.set_root_readonly(doc);
|
||||
cur_frm.add_custom_button("Item Group Tree", function() {
|
||||
cur_frm.add_custom_button(wn._("Item Group Tree"), function() {
|
||||
wn.set_route("Sales Browser", "Item Group");
|
||||
})
|
||||
|
||||
@@ -19,7 +19,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
||||
// read-only for root item group
|
||||
if(!doc.parent_item_group) {
|
||||
cur_frm.perm = [[1,0,0], [1,0,0]];
|
||||
cur_frm.set_intro("This is a root item group and cannot be edited.");
|
||||
cur_frm.set_intro(wn._("This is a root item group and cannot be edited."));
|
||||
} else {
|
||||
cur_frm.set_intro(null);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ cur_frm.cscript.make_address = function() {
|
||||
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
|
||||
},
|
||||
as_dict: 1,
|
||||
no_results_message: 'No addresses created',
|
||||
no_results_message: wn._('No addresses created'),
|
||||
render_row: function(wrapper, data) {
|
||||
$(wrapper).css('padding','5px 0px');
|
||||
var link = $ln(wrapper,cstr(data.name), function() { loaddoc("Address", this.dn); }, {fontWeight:'bold'});
|
||||
@@ -69,7 +69,7 @@ cur_frm.cscript.make_contact = function() {
|
||||
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
|
||||
},
|
||||
as_dict: 1,
|
||||
no_results_message: 'No contacts created',
|
||||
no_results_message: wn._('No contacts created'),
|
||||
render_row: function(wrapper, data) {
|
||||
$(wrapper).css('padding', '5px 0px');
|
||||
var link = $ln(wrapper, cstr(data.name), function() { loaddoc("Contact", this.dn); }, {fontWeight:'bold'});
|
||||
|
||||
@@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
||||
// read-only for root
|
||||
if(!doc.parent_sales_person) {
|
||||
cur_frm.perm = [[1,0,0], [1,0,0]];
|
||||
cur_frm.set_intro("This is a root sales person and cannot be edited.");
|
||||
cur_frm.set_intro(wn._("This is a root sales person and cannot be edited."));
|
||||
} else {
|
||||
cur_frm.set_intro(null);
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
// License: GNU General Public License v3. See license.txt
|
||||
|
||||
cur_frm.cscript.refresh = function(doc) {
|
||||
cur_frm.set_intro(doc.__islocal ? "" : "There is nothing to edit.")
|
||||
cur_frm.set_intro(doc.__islocal ? "" : wn._("There is nothing to edit."))
|
||||
}
|
||||
@@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
|
||||
// read-only for root territory
|
||||
if(!doc.parent_territory) {
|
||||
cur_frm.perm = [[1,0,0], [1,0,0]];
|
||||
cur_frm.set_intro("This is a root territory and cannot be edited.");
|
||||
cur_frm.set_intro(wn._("This is a root territory and cannot be edited."));
|
||||
} else {
|
||||
cur_frm.set_intro(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user