To add child nodes, explore tree and click on the node under which you \
- want to add more nodes.\
-
Accounting Entries can be made against leaf nodes, called Ledgers.\
- Entries against Groups are not allowed.\
-
Please do NOT create Account (Ledgers) for Customers and Suppliers. \
- They are created directly from the Customer / Supplier masters.\
-
To create a Bank Account: Go to the appropriate group \
- (usually Application of Funds > Current Assets > Bank Accounts)\
- and create a new Account Ledger (by clicking on Add Child) of \
- type "Bank or Cash"\
-
To create a Tax Account: Go to the appropriate group \
- (usually Source of Funds > Current Liabilities > Taxes and Duties) \
- and create a new Account Ledger (by clicking on Add Child) of type\
- "Tax" and do mention the Tax rate.\
-
\
-
Please setup your chart of accounts before you start Accounting Entries
\
-
').appendTo(main);
+ help_area = $('
'+
+ '
'+wn._('Quick Help')+'
'+
+ ''+
+ '
'+wn._('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'
'+
+ '
'+
+ wn._('Accounting Entries can be made against leaf nodes, called')+
+ '' +wn._('Ledgers')+'.'+ wn._('Entries against') +
+ '' +wn._('Groups') + ''+ wn._('are not allowed.')+
+ '
'+
+ '
'+wn._('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'
'+
+ '
'+
+ ''+wn._('To create a Bank Account:')+''+
+ wn._('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+
+ wn._('and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"')+
+ '
'+
+ '
'+
+ ''+wn._('To create a Tax Account:')+''+
+ wn._('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+
+ wn._('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
+ '
'+
+ ''+
+ '
'+wn._('Please setup your chart of accounts before you start Accounting Entries')+'
').appendTo(main);
if (wn.boot.profile.can_create.indexOf("Company") !== -1) {
- wrapper.appframe.add_button('New Company', function() { newdoc('Company'); },
+ wrapper.appframe.add_button(wn._('New Company'), function() { newdoc('Company'); },
'icon-plus');
}
@@ -145,20 +147,20 @@ erpnext.AccountsChart = Class.extend({
var node_links = [];
// edit
if (wn.model.can_read(this.ctype) !== -1) {
- node_links.push('Edit');
+ node_links.push(''+wn._('Edit')+'');
}
if (data.expandable && wn.boot.profile.in_create.indexOf(this.ctype) !== -1) {
- node_links.push('Add Child');
+ node_links.push(''+wn._('Add Child')+'');
} else if (this.ctype === 'Account' && wn.boot.profile.can_read.indexOf("GL Entry") !== -1) {
- node_links.push('View Ledger');
+ node_links.push(''+wn._('View Ledger')+'');
}
if (this.can_write) {
- node_links.push('Rename');
+ node_links.push(''+wn._('Rename')+'');
};
if (this.can_delete) {
- node_links.push('Delete');
+ node_links.push(''+wn._('Delete')+'');
};
link.toolbar.append(node_links.join(" | "));
@@ -204,20 +206,20 @@ erpnext.AccountsChart = Class.extend({
// the dialog
var d = new wn.ui.Dialog({
- title:'New Account',
+ title:wn._('New Account'),
fields: [
- {fieldtype:'Data', fieldname:'account_name', label:'New Account Name', reqd:true,
- description: "Name of new Account. Note: Please don't create accounts for Customers and Suppliers, \
- they are created automatically from the Customer and Supplier master"},
- {fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger',
- options:'Group\nLedger', description:'Further accounts can be made under Groups,\
- but entries can be made against Ledger'},
- {fieldtype:'Select', fieldname:'account_type', label:'Account Type',
+ {fieldtype:'Data', fieldname:'account_name', label:wn._('New Account Name'), reqd:true,
+ description: wn._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+
+ wn._("they are created automatically from the Customer and Supplier master")},
+ {fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'),
+ options:'Group\nLedger', description: wn._('Further accounts can be made under Groups,')+
+ wn._('but entries can be made against Ledger')},
+ {fieldtype:'Select', fieldname:'account_type', label:wn._('Account Type'),
options: ['', 'Fixed Asset Account', 'Bank or Cash', 'Expense Account', 'Tax',
'Income Account', 'Chargeable'].join('\n'),
- description: "Optional. This setting will be used to filter in various transactions." },
- {fieldtype:'Float', fieldname:'tax_rate', label:'Tax Rate'},
- {fieldtype:'Button', fieldname:'create_new', label:'Create New' }
+ description: wn._("Optional. This setting will be used to filter in various transactions.") },
+ {fieldtype:'Float', fieldname:'tax_rate', label:wn._('Tax Rate')},
+ {fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') }
]
})
@@ -282,13 +284,13 @@ erpnext.AccountsChart = Class.extend({
var me = this;
// the dialog
var d = new wn.ui.Dialog({
- title:'New Cost Center',
+ title:wn._('New Cost Center'),
fields: [
- {fieldtype:'Data', fieldname:'cost_center_name', label:'New Cost Center Name', reqd:true},
- {fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger',
- options:'Group\nLedger', description:'Further accounts can be made under Groups,\
- but entries can be made against Ledger'},
- {fieldtype:'Button', fieldname:'create_new', label:'Create New' }
+ {fieldtype:'Data', fieldname:'cost_center_name', label:wn._('New Cost Center Name'), reqd:true},
+ {fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'),
+ options:'Group\nLedger', description:wn._('Further accounts can be made under Groups,')+
+ wn._('but entries can be made against Ledger')},
+ {fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') }
]
});
diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js
index d6c388335f..7a4f511a8b 100644
--- a/accounts/page/accounts_home/accounts_home.js
+++ b/accounts/page/accounts_home/accounts_home.js
@@ -88,12 +88,12 @@ wn.module_page["Accounts"] = [
{
"label": wn._("Period Closing Voucher"),
"doctype": "Period Closing Voucher",
- description: "Close Balance Sheet and book Profit or Loss."
+ description: wn._("Close Balance Sheet and book Profit or Loss.")
},
{
"page":"voucher-import-tool",
"label": wn._("Voucher Import Tool"),
- "description": "Import accounting entries from CSV."
+ "description": wn._("Import accounting entries from CSV.")
},
]
},
@@ -105,7 +105,7 @@ wn.module_page["Accounts"] = [
"label": wn._("Accounts Settings"),
"route": "Form/Accounts Settings",
"doctype":"Accounts Settings",
- "description": "Settings for Accounts"
+ "description": wn._("Settings for Accounts")
},
{
"label": wn._("Sales Taxes and Charges Master"),
@@ -130,7 +130,7 @@ wn.module_page["Accounts"] = [
{
"label": wn._("Point-of-Sale Setting"),
"doctype":"POS Setting",
- "description": "User settings for Point-of-sale (POS)"
+ "description": wn._("User settings for Point-of-sale (POS)")
},
{
"doctype":"Budget Distribution",
@@ -150,7 +150,7 @@ wn.module_page["Accounts"] = [
{
"doctype":"C-Form",
"label": wn._("C-Form"),
- description: "C-Form records",
+ description: wn._("C-Form records"),
country: "India"
}
]
diff --git a/accounts/page/financial_analytics/financial_analytics.js b/accounts/page/financial_analytics/financial_analytics.js
index 13b9067760..ffe29ac1a2 100644
--- a/accounts/page/financial_analytics/financial_analytics.js
+++ b/accounts/page/financial_analytics/financial_analytics.js
@@ -6,7 +6,7 @@ wn.require("app/js/account_tree_grid.js");
wn.pages['financial-analytics'].onload = function(wrapper) {
wn.ui.make_app_page({
parent: wrapper,
- title: 'Financial Analytics',
+ title: wn._('Financial Analytics'),
single_column: true
});
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
@@ -18,7 +18,7 @@ wn.pages['financial-analytics'].onload = function(wrapper) {
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
filters: [
- {fieldtype:"Select", label: "PL or BS", options:["Profit and Loss", "Balance Sheet"],
+ {fieldtype:"Select", label: wn._("PL or BS"), options:["Profit and Loss", "Balance Sheet"],
filter: function(val, item, opts, me) {
if(item._show) return true;
@@ -28,27 +28,27 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
return me.apply_zero_filter(val, item, opts, me);
}},
- {fieldtype:"Select", label: "Company", link:"Company", default_value: "Select Company...",
+ {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company...",
filter: function(val, item, opts) {
return item.company == val || val == opts.default_value || item._show;
}},
- {fieldtype:"Select", label: "Fiscal Year", link:"Fiscal Year",
+ {fieldtype:"Select", label: wn._("Fiscal Year"), link:"Fiscal Year",
default_value: "Select Fiscal Year..."},
- {fieldtype:"Date", label: "From Date"},
- {fieldtype:"Label", label: "To"},
- {fieldtype:"Date", label: "To Date"},
- {fieldtype:"Select", label: "Range",
+ {fieldtype:"Date", label: wn._("From Date")},
+ {fieldtype:"Label", label: wn._("To")},
+ {fieldtype:"Date", label: wn._("To Date")},
+ {fieldtype:"Select", label: wn._("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
- {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
- {fieldtype:"Button", label: "Reset Filters"}
+ {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
+ {fieldtype:"Button", label: wn._("Reset Filters")}
],
setup_columns: function() {
var std_columns = [
- {id: "check", name: "Plot", field: "check", width: 30,
+ {id: "check", name: wn._("Plot"), field: "check", width: 30,
formatter: this.check_formatter},
- {id: "name", name: "Account", field: "name", width: 300,
+ {id: "name", name: wn._("Account"), field: "name", width: 300,
formatter: this.tree_formatter},
- {id: "opening", name: "Opening", field: "opening", hidden: true,
+ {id: "opening", name: wn._("Opening"), field: "opening", hidden: true,
formatter: this.currency_formatter}
];
diff --git a/accounts/page/financial_statements/financial_statements.js b/accounts/page/financial_statements/financial_statements.js
index 48931250f2..6a11683070 100644
--- a/accounts/page/financial_statements/financial_statements.js
+++ b/accounts/page/financial_statements/financial_statements.js
@@ -6,7 +6,7 @@ erpnext.fs = {}
pscript['onload_Financial Statements'] = function(wrapper) {
wn.ui.make_app_page({
parent: wrapper,
- "title": "Financial Statements",
+ "title": wn._("Financial Statements"),
"single_column": true,
});
@@ -34,18 +34,18 @@ pscript['onload_Financial Statements'] = function(wrapper) {
options: ['Loading...']
})
- wrapper.appframe.add_button("Create", function() {
+ wrapper.appframe.add_button(wn._("Create"), function() {
pscript.stmt_new();
}, "icon-refresh")
- wrapper.appframe.add_button("Print", function() {
+ wrapper.appframe.add_button(wn._("Print"), function() {
_p.go($i('print_html').innerHTML);
}, "icon-print")
$(wrapper).find(".layout-main").html('
\
\
\
-
Please select options and click on Create
\
+
'+wn._('Please select options and click on Create')+'
')
diff --git a/hr/doctype/appraisal/appraisal.js b/hr/doctype/appraisal/appraisal.js
index f94a288fd5..8c5df8e297 100644
--- a/hr/doctype/appraisal/appraisal.js
+++ b/hr/doctype/appraisal/appraisal.js
@@ -45,7 +45,7 @@ cur_frm.cscript.score = function(doc,cdt,cdn){
var d = locals[cdt][cdn];
if (d.score){
if (flt(d.score) > 5) {
- msgprint("Score must be less than or equal to 5");
+ msgprint(wn._("Score must be less than or equal to 5"));
d.score = 0;
refresh_field('score', d.name, 'appraisal_details');
}
diff --git a/hr/doctype/employee/employee.js b/hr/doctype/employee/employee.js
index 615e2761b8..3814dd9c11 100644
--- a/hr/doctype/employee/employee.js
+++ b/hr/doctype/employee/employee.js
@@ -21,7 +21,7 @@ erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({
var me = this;
erpnext.hide_naming_series();
if(!this.frm.doc.__islocal) {
- cur_frm.add_custom_button('Make Salary Structure', function() {
+ cur_frm.add_custom_button(wn._('Make Salary Structure'), function() {
me.make_salary_structure(this); });
}
},
diff --git a/hr/doctype/expense_claim/expense_claim.js b/hr/doctype/expense_claim/expense_claim.js
index f7895b10eb..e19cac7751 100644
--- a/hr/doctype/expense_claim/expense_claim.js
+++ b/hr/doctype/expense_claim/expense_claim.js
@@ -93,28 +93,28 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
cur_frm.savesubmit();
if(doc.docstatus==1 && wn.model.can_create("Journal Voucher"))
- cur_frm.add_custom_button("Make Bank Voucher", cur_frm.cscript.make_bank_voucher);
+ cur_frm.add_custom_button(wn._("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher);
}
}
cur_frm.cscript.set_help = function(doc) {
cur_frm.set_intro("");
if(doc.__islocal && !in_list(user_roles, "HR User")) {
- cur_frm.set_intro("Fill the form and save it")
+ cur_frm.set_intro(wn._("Fill the form and save it"))
} else {
if(doc.docstatus==0 && doc.approval_status=="Draft") {
if(user==doc.exp_approver) {
- cur_frm.set_intro("You are the Expense Approver for this record. \
- Please Update the 'Status' and Save");
+ cur_frm.set_intro(wn._("You are the Expense Approver for this record. \
+ Please Update the 'Status' and Save"));
} else {
- cur_frm.set_intro("Expense Claim is pending approval. \
- Only the Expense Approver can update status.");
+ cur_frm.set_intro(wn._("Expense Claim is pending approval. \
+ Only the Expense Approver can update status."));
}
} else {
if(doc.approval_status=="Approved") {
- cur_frm.set_intro("Expense Claim has been approved.");
+ cur_frm.set_intro(wn._("Expense Claim has been approved."));
} else if(doc.approval_status=="Rejected") {
- cur_frm.set_intro("Expense Claim has been rejected.");
+ cur_frm.set_intro(wn._("Expense Claim has been rejected."));
}
}
}
diff --git a/hr/doctype/job_applicant/job_applicant.js b/hr/doctype/job_applicant/job_applicant.js
index f82da11f07..ccfbbc25b9 100644
--- a/hr/doctype/job_applicant/job_applicant.js
+++ b/hr/doctype/job_applicant/job_applicant.js
@@ -7,8 +7,8 @@ cur_frm.cscript = {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
cur_frm.footer.help_area.innerHTML = '\
-
Jobs Email Settings \
- Automatically extract Job Applicants from a mail box e.g. "jobs@example.com"
';
+
'+wn._("Jobs Email Settings")+' \
+ '+wn._('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"
';
}
},
refresh: function(doc) {
diff --git a/hr/doctype/leave_application/leave_application.js b/hr/doctype/leave_application/leave_application.js
index 5969f4dc4f..7b32cff691 100755
--- a/hr/doctype/leave_application/leave_application.js
+++ b/hr/doctype/leave_application/leave_application.js
@@ -31,14 +31,14 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}
cur_frm.set_intro("");
if(doc.__islocal && !in_list(user_roles, "HR User")) {
- cur_frm.set_intro("Fill the form and save it")
+ cur_frm.set_intro(wn._("Fill the form and save it"))
} else {
if(doc.docstatus==0 && doc.status=="Open") {
if(user==doc.leave_approver) {
- cur_frm.set_intro("You are the Leave Approver for this record. Please Update the 'Status' and Save");
+ cur_frm.set_intro(wn._("You are the Leave Approver for this record. Please Update the 'Status' and Save"));
cur_frm.toggle_enable("status", true);
} else {
- cur_frm.set_intro("This Leave Application is pending approval. Only the Leave Apporver can update status.")
+ cur_frm.set_intro(wn._("This Leave Application is pending approval. Only the Leave Apporver can update status."))
cur_frm.toggle_enable("status", false);
if(!doc.__islocal) {
if(cur_frm.frm_head.appframe.buttons.Submit)
@@ -47,12 +47,12 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}
} else {
if(doc.status=="Approved") {
- cur_frm.set_intro("Leave application has been approved.");
+ cur_frm.set_intro(wn._("Leave application has been approved."));
if(cur_frm.doc.docstatus==0) {
- cur_frm.set_intro("Please submit to update Leave Balance.");
+ cur_frm.set_intro(wn._("Please submit to update Leave Balance."));
}
} else if(doc.status=="Rejected") {
- cur_frm.set_intro("Leave application has been rejected.");
+ cur_frm.set_intro(wn._("Leave application has been rejected."));
}
}
}
@@ -86,7 +86,7 @@ cur_frm.cscript.from_date = function(doc, dt, dn) {
cur_frm.cscript.to_date = function(doc, dt, dn) {
if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){
- msgprint("To Date should be same as From Date for Half Day leave");
+ msgprint(wn._("To Date should be same as From Date for Half Day leave"));
set_multiple(dt,dn,{to_date:doc.from_date});
}
cur_frm.cscript.calculate_total_days(doc, dt, dn);
diff --git a/hr/doctype/leave_control_panel/leave_control_panel.js b/hr/doctype/leave_control_panel/leave_control_panel.js
index a53f031f4c..7a840ba78d 100644
--- a/hr/doctype/leave_control_panel/leave_control_panel.js
+++ b/hr/doctype/leave_control_panel/leave_control_panel.js
@@ -15,7 +15,7 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) {
function(r, rt) {
var doc = locals[cdt][cdn];
if (r.message) {
- alert("To date cannot be before from date");
+ alert(wn._("To date cannot be before from date"));
doc.to_date = '';
refresh_field('to_date');
}
diff --git a/hr/doctype/salary_manager/salary_manager.js b/hr/doctype/salary_manager/salary_manager.js
index 178ab3ef6b..b27d41c418 100644
--- a/hr/doctype/salary_manager/salary_manager.js
+++ b/hr/doctype/salary_manager/salary_manager.js
@@ -5,7 +5,7 @@ var display_activity_log = function(msg) {
if(!pscript.ss_html)
pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div');
pscript.ss_html.innerHTML =
- '
Activity Log:
'+msg+'
';
+ '
'+wn._("Activity Log:")+'
'+msg+'
';
}
//Create salary slip
@@ -23,7 +23,7 @@ cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) {
//Submit salary slip
//-----------------------
cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) {
- var check = confirm("Do you really want to Submit all Salary Slip for month : " + doc.month+" and fiscal year : "+doc.fiscal_year);
+ var check = confirm(wn._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ wn._(" and fiscal year : ")+doc.fiscal_year);
if(check){
var callback = function(r, rt){
if (r.message)
@@ -49,7 +49,7 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) {
var jv = wn.model.make_new_doc_and_get_name('Journal Voucher');
jv = locals['Journal Voucher'][jv];
jv.voucher_type = 'Bank Voucher';
- jv.user_remark = 'Payment of salary for the month: ' + doc.month + 'and fiscal year: ' + doc.fiscal_year;
+ jv.user_remark = wn._('Payment of salary for the month: ') + doc.month + wn._('and fiscal year: ') + doc.fiscal_year;
jv.fiscal_year = doc.fiscal_year;
jv.company = doc.company;
jv.posting_date = dateutil.obj_to_str(new Date());
diff --git a/hr/doctype/salary_structure/salary_structure.js b/hr/doctype/salary_structure/salary_structure.js
index 81cb63d352..15b3512935 100644
--- a/hr/doctype/salary_structure/salary_structure.js
+++ b/hr/doctype/salary_structure/salary_structure.js
@@ -12,7 +12,7 @@ cur_frm.cscript.onload = function(doc, dt, dn){
cur_frm.cscript.refresh = function(doc, dt, dn){
if((!doc.__islocal) && (doc.is_active == 'Yes')){
- cur_frm.add_custom_button('Make Salary Slip', cur_frm.cscript['Make Salary Slip']);
+ cur_frm.add_custom_button(wn._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
}
cur_frm.toggle_enable('employee', doc.__islocal);
diff --git a/hr/doctype/upload_attendance/upload_attendance.js b/hr/doctype/upload_attendance/upload_attendance.js
index 71e266928d..06a78c6735 100644
--- a/hr/doctype/upload_attendance/upload_attendance.js
+++ b/hr/doctype/upload_attendance/upload_attendance.js
@@ -17,7 +17,7 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({
get_template:function() {
if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) {
- msgprint("Attendance From Date and Attendance To Date is mandatory");
+ msgprint(wn._("Attendance From Date and Attendance To Date is mandatory"));
return;
}
window.location.href = repl(wn.request.url +
@@ -56,10 +56,10 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({
return v;
});
- r.messages = ["
Import Failed!
"]
+ r.messages = ["
"+wn._("Import Failed!")+"
"]
.concat(r.messages)
} else {
- r.messages = ["
Import Successful!
"].
+ r.messages = ["
"+wn._("Import Successful!")+"
"].
concat(r.message.messages)
}
diff --git a/hr/report/employee_birthday/employee_birthday.js b/hr/report/employee_birthday/employee_birthday.js
index 3fd849266f..8fce812abf 100644
--- a/hr/report/employee_birthday/employee_birthday.js
+++ b/hr/report/employee_birthday/employee_birthday.js
@@ -5,7 +5,7 @@ wn.query_reports["Employee Birthday"] = {
"filters": [
{
"fieldname":"month",
- "label": "Month",
+ "label": wn._("Month"),
"fieldtype": "Select",
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@@ -13,7 +13,7 @@ wn.query_reports["Employee Birthday"] = {
},
{
"fieldname":"company",
- "label": "Company",
+ "label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_user_default("company")
diff --git a/hr/report/employee_leave_balance/employee_leave_balance.js b/hr/report/employee_leave_balance/employee_leave_balance.js
index 1bf252d2a7..7af65b641f 100644
--- a/hr/report/employee_leave_balance/employee_leave_balance.js
+++ b/hr/report/employee_leave_balance/employee_leave_balance.js
@@ -5,14 +5,14 @@ wn.query_reports["Employee Leave Balance"] = {
"filters": [
{
"fieldname":"fiscal_year",
- "label": "Fiscal Year",
+ "label": wn._("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": wn.defaults.get_user_default("fiscal_year")
},
{
"fieldname":"company",
- "label": "Company",
+ "label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_user_default("company")
diff --git a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
index 678e7af713..fc14b6dd8e 100644
--- a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
+++ b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
@@ -5,7 +5,7 @@ wn.query_reports["Monthly Attendance Sheet"] = {
"filters": [
{
"fieldname":"month",
- "label": "Month",
+ "label": wn._("Month"),
"fieldtype": "Select",
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@@ -13,20 +13,20 @@ wn.query_reports["Monthly Attendance Sheet"] = {
},
{
"fieldname":"fiscal_year",
- "label": "Fiscal Year",
+ "label": wn._("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
},
{
"fieldname":"employee",
- "label": "Employee",
+ "label": wn._("Employee"),
"fieldtype": "Link",
"options": "Employee"
},
{
"fieldname":"company",
- "label": "Company",
+ "label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_default("company")
diff --git a/hr/report/monthly_salary_register/monthly_salary_register.js b/hr/report/monthly_salary_register/monthly_salary_register.js
index eb33d08cd0..45d7ff9bad 100644
--- a/hr/report/monthly_salary_register/monthly_salary_register.js
+++ b/hr/report/monthly_salary_register/monthly_salary_register.js
@@ -5,7 +5,7 @@ wn.query_reports["Monthly Salary Register"] = {
"filters": [
{
"fieldname":"month",
- "label": "Month",
+ "label": wn._("Month"),
"fieldtype": "Select",
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@@ -13,20 +13,20 @@ wn.query_reports["Monthly Salary Register"] = {
},
{
"fieldname":"fiscal_year",
- "label": "Fiscal Year",
+ "label": wn._("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
},
{
"fieldname":"employee",
- "label": "Employee",
+ "label": wn._("Employee"),
"fieldtype": "Link",
"options": "Employee"
},
{
"fieldname":"company",
- "label": "Company",
+ "label": wn._("Company"),
"fieldtype": "Link",
"options": "Company",
"default": wn.defaults.get_default("company")
diff --git a/manufacturing/doctype/bom/bom.js b/manufacturing/doctype/bom/bom.js
index badb108048..020325867a 100644
--- a/manufacturing/doctype/bom/bom.js
+++ b/manufacturing/doctype/bom/bom.js
@@ -6,7 +6,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){
cur_frm.toggle_enable("item", doc.__islocal);
if (!doc.__islocal && doc.docstatus<2) {
- cur_frm.add_custom_button("Update Cost", cur_frm.cscript.update_cost);
+ cur_frm.add_custom_button(wn._("Update Cost"), cur_frm.cscript.update_cost);
}
cur_frm.cscript.with_operations(doc);
@@ -123,7 +123,7 @@ cur_frm.cscript.qty = function(doc, cdt, cdn) {
cur_frm.cscript.rate = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (d.bom_no) {
- msgprint("You can not change rate if BOM mentioned agianst any item");
+ msgprint(wn._("You can not change rate if BOM mentioned agianst any item"));
get_bom_material_detail(doc, cdt, cdn);
} else {
calculate_rm_cost(doc);
diff --git a/manufacturing/doctype/production_order/production_order.js b/manufacturing/doctype/production_order/production_order.js
index f680776a56..7c4325dc37 100644
--- a/manufacturing/doctype/production_order/production_order.js
+++ b/manufacturing/doctype/production_order/production_order.js
@@ -13,7 +13,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
cfn_set_fields(doc, dt, dn);
if(doc.docstatus===0 && !doc.__islocal) {
- cur_frm.set_intro("Submit this Production Order for further processing.");
+ cur_frm.set_intro(wn._("Submit this Production Order for further processing."));
} else if(doc.docstatus===1) {
var percent = flt(doc.produced_qty) / flt(doc.qty) * 100;
cur_frm.dashboard.add_progress(cint(percent) + "% " + wn._("Complete"), percent);
@@ -27,13 +27,13 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
var cfn_set_fields = function(doc, dt, dn) {
if (doc.docstatus == 1) {
if (doc.status != 'Stopped' && doc.status != 'Completed')
- cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Production Order']);
+ cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Production Order']);
else if (doc.status == 'Stopped')
- cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Production Order']);
+ cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Production Order']);
if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
- cur_frm.add_custom_button('Transfer Raw Materials', cur_frm.cscript['Transfer Raw Materials']);
- cur_frm.add_custom_button('Update Finished Goods', cur_frm.cscript['Update Finished Goods']);
+ cur_frm.add_custom_button(wn._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
+ cur_frm.add_custom_button(wn._('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']);
}
}
}
@@ -47,7 +47,7 @@ cur_frm.cscript.production_item = function(doc) {
cur_frm.cscript['Stop Production Order'] = function() {
var doc = cur_frm.doc;
- var check = confirm("Do you really want to stop production order: " + doc.name);
+ var check = confirm(wn._("Do you really want to stop production order: " + doc.name));
if (check) {
return $c_obj(make_doclist(doc.doctype, doc.name), 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();});
}
@@ -55,7 +55,7 @@ cur_frm.cscript['Stop Production Order'] = function() {
cur_frm.cscript['Unstop Production Order'] = function() {
var doc = cur_frm.doc;
- var check = confirm("Do really want to unstop production order: " + doc.name);
+ var check = confirm(wn._("Do really want to unstop production order: " + doc.name));
if (check)
return $c_obj(make_doclist(doc.doctype, doc.name), 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();});
}
@@ -105,5 +105,5 @@ cur_frm.set_query("bom_no", function(doc) {
query:"controllers.queries.bom",
filters: {item: cstr(doc.production_item)}
}
- } else msgprint(" Please enter Production Item first");
+ } else msgprint(wn._("Please enter Production Item first"));
});
\ No newline at end of file
diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/manufacturing/doctype/production_planning_tool/production_planning_tool.js
index daa701352b..22bf6caef4 100644
--- a/manufacturing/doctype/production_planning_tool/production_planning_tool.js
+++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.js
@@ -44,7 +44,7 @@ cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function(
query:"controllers.queries.bom",
filters:{'item': cstr(d.item_code)}
}
- } else msgprint(" Please enter Item first");
+ } else msgprint(wn._("Please enter Item first"));
}
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
diff --git a/portal/templates/includes/cart.js b/portal/templates/includes/cart.js
index bd3f56533c..a894b32e6b 100644
--- a/portal/templates/includes/cart.js
+++ b/portal/templates/includes/cart.js
@@ -13,11 +13,11 @@ $(document).ready(function() {
$(".progress").remove();
if(r.exc) {
if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) {
- erpnext.cart.show_error("Oops!", "Price List not configured.");
+ erpnext.cart.show_error("Oops!", wn._("Price List not configured."));
} else if(r["403"]) {
- erpnext.cart.show_error("Hey!", "You need to be logged in to view your cart.");
+ erpnext.cart.show_error("Hey!", wn._("You need to be logged in to view your cart."));
} else {
- erpnext.cart.show_error("Oops!", "Something went wrong.");
+ erpnext.cart.show_error("Oops!", wn._("Something went wrong."));
}
} else {
erpnext.cart.set_cart_count();
@@ -78,7 +78,7 @@ $.extend(erpnext.cart, {
var no_items = $.map(doclist, function(d) { return d.item_code || null;}).length===0;
if(no_items) {
- erpnext.cart.show_error("Empty :-(", "Go ahead and add something to your cart.");
+ erpnext.cart.show_error("Empty :-(", wn._("Go ahead and add something to your cart."));
$("#cart-addresses").toggle(false);
return;
}
@@ -117,7 +117,7 @@ $.extend(erpnext.cart, {
});
if(!(addresses && addresses.length)) {
- $cart_shipping_address.html('
ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\
+
"+wn._("ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\
to provide an integrated tool to manage most processes in a small organization.\
- For more information about Web Notes, or to buy hosting servies, go to \
- https://erpnext.com.
\
- For 'Sales BOM' items, warehouse, serial no and batch no \
+ help_msg = "
" +
+ wn._("For 'Sales BOM' items, warehouse, serial no and batch no \
will be considered from the 'Packing List' table. \
If warehouse and batch no are same for all packing items for any 'Sales BOM' item, \
- those values can be entered in the main item table, values will be copied to 'Packing List' table. \
-
";
+ those values can be entered in the main item table, values will be copied to 'Packing List' table.")+
+ "
";
wn.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg;
}
} else {
diff --git a/setup/doctype/company/company.js b/setup/doctype/company/company.js
index d023f8df49..0c864fa80a 100644
--- a/setup/doctype/company/company.js
+++ b/setup/doctype/company/company.js
@@ -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("Special Characters ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? are not allowed for\nCompany Name " + doc.company_name +"")
+ msgprint((""+wn._("Special Characters")+" ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? "+
+ wn._("are not allowed for ")+"\n"+wn._("Company Name")+" "+ doc.company_name +""))
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("Special Characters ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? are not allowed for\nAbbr " + doc.abbr +"")
+ msgprint(""+wn._("Special Characters ")+"! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?" +
+ wn._("are not allowed for")+ "\nAbbr " + doc.abbr +"")
doc.abbr = '';
refresh_field('abbr');
}
diff --git a/setup/doctype/customer_group/customer_group.js b/setup/doctype/customer_group/customer_group.js
index 2953de542d..9541cf8e10 100644
--- a/setup/doctype/customer_group/customer_group.js
+++ b/setup/doctype/customer_group/customer_group.js
@@ -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);
}
diff --git a/setup/doctype/email_digest/email_digest.js b/setup/doctype/email_digest/email_digest.js
index 552109231f..d009080e98 100644
--- a/setup/doctype/email_digest/email_digest.js
+++ b/setup/doctype/email_digest/email_digest.js
@@ -3,10 +3,10 @@
cur_frm.cscript.refresh = function(doc, dt, dn) {
doc = locals[dt][dn];
- var save_msg = "You must Save 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 ")+ ""+wn._("Save ")+""+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', '', '');
diff --git a/setup/doctype/item_group/item_group.js b/setup/doctype/item_group/item_group.js
index 0c18db001c..6dbb0d273b 100644
--- a/setup/doctype/item_group/item_group.js
+++ b/setup/doctype/item_group/item_group.js
@@ -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);
}
diff --git a/setup/doctype/sales_partner/sales_partner.js b/setup/doctype/sales_partner/sales_partner.js
index 86b7712142..351aa3d0f6 100644
--- a/setup/doctype/sales_partner/sales_partner.js
+++ b/setup/doctype/sales_partner/sales_partner.js
@@ -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'});
diff --git a/setup/doctype/sales_person/sales_person.js b/setup/doctype/sales_person/sales_person.js
index 34f267e825..ec21ead6be 100644
--- a/setup/doctype/sales_person/sales_person.js
+++ b/setup/doctype/sales_person/sales_person.js
@@ -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);
}
diff --git a/setup/doctype/supplier_type/supplier_type.js b/setup/doctype/supplier_type/supplier_type.js
index b65f67c21c..5ebf6d51e2 100644
--- a/setup/doctype/supplier_type/supplier_type.js
+++ b/setup/doctype/supplier_type/supplier_type.js
@@ -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."))
}
\ No newline at end of file
diff --git a/setup/doctype/territory/territory.js b/setup/doctype/territory/territory.js
index 7561816185..de708b6d05 100644
--- a/setup/doctype/territory/territory.js
+++ b/setup/doctype/territory/territory.js
@@ -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);
}
diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js
index f39618685d..0127a2a3f0 100644
--- a/setup/page/setup/setup.js
+++ b/setup/page/setup/setup.js
@@ -5,12 +5,12 @@ wn.pages['Setup'].onload = function(wrapper) {
if(msg_dialog && msg_dialog.display) msg_dialog.hide();
wn.ui.make_app_page({
parent: wrapper,
- title: 'Setup',
+ title: wn._('Setup'),
single_column: true
});
wrapper.appframe.add_module_icon("Setup");
- wrapper.appframe.add_button("Refresh", function() {
+ wrapper.appframe.add_button(wn._("Refresh"), function() {
wn.pages.Setup.make(wrapper);
}, "icon-refresh");
@@ -110,7 +110,7 @@ wn.pages.Setup.make = function(wrapper) {
})
} else if(item.single) {
- $(' Edit')
+ $(''+wn._('Edit')+'')
.appendTo($links)
$links.find(".view-link")
@@ -119,11 +119,11 @@ wn.pages.Setup.make = function(wrapper) {
wn.set_route("Form", $(this).attr("data-doctype"));
})
} else if(item.type !== "Link"){
- $(' New \
+ $(''+wn._('New')+' \
| \
- View \
+ '+wn._('View')+' \
| \
- Import')
+ '+wn._('Import')+'')
.appendTo($links)
$links.find(".view-link")
@@ -180,11 +180,11 @@ wn.pages.Setup.make = function(wrapper) {
if(r.message) {
body.empty();
if(wn.boot.expires_on) {
- $(body).prepend("