diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index 76a1e56fe92..2a805cfca3b 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -3,7 +3,7 @@
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(doc.__islocal) {
- msgprint(frappe._("Please create new account from Chart of Accounts."));
+ msgprint(__("Please create new account from Chart of Accounts."));
throw "cannot create";
}
@@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
// read-only for root accounts
if(!doc.parent_account) {
cur_frm.set_read_only();
- cur_frm.set_intro(frappe._("This is a root account and cannot be edited."));
+ cur_frm.set_intro(__("This is a root account and cannot be edited."));
} else {
// credit days and type if customer or supplier
cur_frm.set_intro(null);
@@ -64,17 +64,17 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
}
cur_frm.cscript.add_toolbar_buttons = function(doc) {
- cur_frm.appframe.add_button(frappe._('Chart of Accounts'),
+ cur_frm.appframe.add_button(__('Chart of Accounts'),
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
if (cstr(doc.group_or_ledger) == 'Group') {
- cur_frm.add_custom_button(frappe._('Convert to Ledger'),
+ cur_frm.add_custom_button(__('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
- cur_frm.add_custom_button(frappe._('Convert to Group'),
+ cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
- cur_frm.appframe.add_button(frappe._('View Ledger'), function() {
+ cur_frm.appframe.add_button(__('View Ledger'), function() {
frappe.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index aea996aab6f..089f61e8210 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -4,5 +4,5 @@
cur_frm.add_fetch("bank_account", "company", "company");
cur_frm.cscript.onload = function(doc, cdt, cdn){
cur_frm.set_intro(' ' +
- frappe._("Update clearance date of Journal Entries marked as 'Bank Vouchers'"))
+ __("Update clearance date of Journal Entries marked as 'Bank Vouchers'"))
}
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index 0cd3a700a40..71239bafc17 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -40,8 +40,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_enable(['group_or_ledger', 'company'], doc.__islocal);
if(!doc.__islocal && doc.group_or_ledger=='Group') {
- intro_txt += '
'+frappe._('Note:')+''+ frappe._('This Cost Center is a')+ ''+frappe._('Group')+', '+
- frappe._('Accounting Entries are not allowed against groups.')+'
'+frappe._('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'
'+
+ '
'+__('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'
'+
'
'+
- frappe._('Accounting Entries can be made against leaf nodes, called')+
- '' +frappe._('Ledgers')+'.'+ frappe._('Entries against') +
- '' +frappe._('Groups') + ''+ frappe._('are not allowed.')+
+ __('Accounting Entries can be made against leaf nodes, called')+
+ '' +__('Ledgers')+'.'+ __('Entries against') +
+ '' +__('Groups') + ''+ __('are not allowed.')+
'
'+
- '
'+frappe._('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'
'+
+ '
'+__('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'
'+
'
'+
- ''+frappe._('To create a Bank Account:')+''+
- frappe._('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+
- frappe._('and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
+ ''+__('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"')+
'
'+
'
'+
- ''+frappe._('To create a Tax Account:')+''+
- frappe._('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+
- frappe._('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
+ ''+__('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.')+
'
'+
''+
- '
'+frappe._('Please setup your chart of accounts before you start Accounting Entries')+'
').appendTo(main);
+ '
'+__('Please setup your chart of accounts before you start Accounting Entries')+'
').appendTo(main);
if (frappe.boot.user.can_create.indexOf("Company") !== -1) {
- wrapper.appframe.add_button(frappe._('New Company'), function() { newdoc('Company'); },
+ wrapper.appframe.add_button(__('New Company'), function() { newdoc('Company'); },
'icon-plus');
}
@@ -184,21 +182,19 @@ erpnext.AccountsChart = Class.extend({
// the dialog
var d = new frappe.ui.Dialog({
- title:frappe._('New Account'),
+ title:__('New Account'),
fields: [
- {fieldtype:'Data', fieldname:'account_name', label:frappe._('New Account Name'), reqd:true,
- description: frappe._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+
- frappe._("they are created automatically from the Customer and Supplier master")},
- {fieldtype:'Select', fieldname:'group_or_ledger', label:frappe._('Group or Ledger'),
- options:'Group\nLedger', description: frappe._('Further accounts can be made under Groups,')+
- frappe._('but entries can be made against Ledger')},
- {fieldtype:'Select', fieldname:'account_type', label:frappe._('Account Type'),
+ {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'),
options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',
'Income Account', 'Tax', 'Chargeable'].join('\n'),
- description: frappe._("Optional. This setting will be used to filter in various transactions.") },
- {fieldtype:'Float', fieldname:'tax_rate', label:frappe._('Tax Rate')},
- {fieldtype:'Button', fieldname:'create_new', label:frappe._('Create New') }
+ 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') }
]
})
@@ -261,13 +257,12 @@ erpnext.AccountsChart = Class.extend({
var me = this;
// the dialog
var d = new frappe.ui.Dialog({
- title:frappe._('New Cost Center'),
+ title:__('New Cost Center'),
fields: [
- {fieldtype:'Data', fieldname:'cost_center_name', label:frappe._('New Cost Center Name'), reqd:true},
- {fieldtype:'Select', fieldname:'group_or_ledger', label:frappe._('Group or Ledger'),
- options:'Group\nLedger', description:frappe._('Further accounts can be made under Groups,')+
- frappe._('but entries can be made against Ledger')},
- {fieldtype:'Button', fieldname:'create_new', label:frappe._('Create New') }
+ {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') }
]
});
@@ -292,4 +287,4 @@ erpnext.AccountsChart = Class.extend({
});
d.show();
}
-});
\ No newline at end of file
+});
diff --git a/erpnext/accounts/page/financial_analytics/financial_analytics.js b/erpnext/accounts/page/financial_analytics/financial_analytics.js
index 27ca19dcbf6..9e4d19e87ed 100644
--- a/erpnext/accounts/page/financial_analytics/financial_analytics.js
+++ b/erpnext/accounts/page/financial_analytics/financial_analytics.js
@@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/account_tree_grid.js");
frappe.pages['financial-analytics'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
- title: frappe._('Financial Analytics'),
+ title: __('Financial Analytics'),
single_column: true
});
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
@@ -17,7 +17,7 @@ frappe.pages['financial-analytics'].onload = function(wrapper) {
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
filters: [
{
- fieldtype:"Select", label: frappe._("PL or BS"),
+ fieldtype:"Select", label: __("PL or BS"),
options:["Profit and Loss", "Balance Sheet"],
filter: function(val, item, opts, me) {
if(item._show) return true;
@@ -31,31 +31,31 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
}
},
{
- fieldtype:"Select", label: frappe._("Company"),
+ fieldtype:"Select", label: __("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: frappe._("Fiscal Year"), link:"Fiscal Year",
+ {fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year",
default_value: "Select Fiscal Year..."},
- {fieldtype:"Date", label: frappe._("From Date")},
- {fieldtype:"Label", label: frappe._("To")},
- {fieldtype:"Date", label: frappe._("To Date")},
- {fieldtype:"Select", label: frappe._("Range"),
+ {fieldtype:"Date", label: __("From Date")},
+ {fieldtype:"Label", label: __("To")},
+ {fieldtype:"Date", label: __("To Date")},
+ {fieldtype:"Select", label: __("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
- {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
- {fieldtype:"Button", label: frappe._("Reset Filters")}
+ {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
+ {fieldtype:"Button", label: __("Reset Filters")}
],
setup_columns: function() {
var std_columns = [
- {id: "check", name: frappe._("Plot"), field: "check", width: 30,
+ {id: "check", name: __("Plot"), field: "check", width: 30,
formatter: this.check_formatter},
- {id: "name", name: frappe._("Account"), field: "name", width: 300,
+ {id: "name", name: __("Account"), field: "name", width: 300,
formatter: this.tree_formatter},
- {id: "opening_dr", name: frappe._("Opening (Dr)"), field: "opening_dr",
+ {id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr",
hidden: true, formatter: this.currency_formatter, balance_type: "Dr"},
- {id: "opening_cr", name: frappe._("Opening (Cr)"), field: "opening_cr",
+ {id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr",
hidden: true, formatter: this.currency_formatter, balance_type: "Cr"},
];
diff --git a/erpnext/accounts/page/trial_balance/trial_balance.js b/erpnext/accounts/page/trial_balance/trial_balance.js
index 80a4aa8d6cb..95818093f62 100644
--- a/erpnext/accounts/page/trial_balance/trial_balance.js
+++ b/erpnext/accounts/page/trial_balance/trial_balance.js
@@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/account_tree_grid.js");
frappe.pages['trial-balance'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
- title: frappe._('Trial Balance'),
+ title: __('Trial Balance'),
single_column: true
});
var TrialBalance = erpnext.AccountTreeGrid.extend({
@@ -18,7 +18,7 @@ frappe.pages['trial-balance'].onload = function(wrapper) {
this.wrapper.bind("make", function() {
$('
'+__("Jobs Email Settings")+' \
+ '+__('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"
';
}
},
refresh: function(doc) {
diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js
index 2a6223af44f..695ae5515c6 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.js
+++ b/erpnext/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(frappe._("Fill the form and save it"))
+ cur_frm.set_intro(__("Fill the form and save it"))
} else {
if(doc.docstatus==0 && doc.status=="Open") {
if(user==doc.leave_approver) {
- cur_frm.set_intro(frappe._("You are the Leave Approver for this record. Please Update the 'Status' and Save"));
+ cur_frm.set_intro(__("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(frappe._("This Leave Application is pending approval. Only the Leave Apporver can update status."))
+ cur_frm.set_intro(__("This Leave Application is pending approval. Only the Leave Apporver can update status."))
cur_frm.toggle_enable("status", false);
if(!doc.__islocal) {
cur_frm.frm_head.appframe.set_title_right("");
@@ -46,12 +46,12 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}
} else {
if(doc.status=="Approved") {
- cur_frm.set_intro(frappe._("Leave application has been approved."));
+ cur_frm.set_intro(__("Leave application has been approved."));
if(cur_frm.doc.docstatus==0) {
- cur_frm.set_intro(frappe._("Please submit to update Leave Balance."));
+ cur_frm.set_intro(__("Please submit to update Leave Balance."));
}
} else if(doc.status=="Rejected") {
- cur_frm.set_intro(frappe._("Leave application has been rejected."));
+ cur_frm.set_intro(__("Leave application has been rejected."));
}
}
}
@@ -85,7 +85,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(frappe._("To Date should be same as From Date for Half Day leave"));
+ msgprint(__("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/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
index 16ede6782da..4497b63430f 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
@@ -13,7 +13,7 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) {
function(r, rt) {
var doc = locals[cdt][cdn];
if (r.message) {
- msgprint(frappe._("To date cannot be before from date"));
+ msgprint(__("To date cannot be before from date"));
doc.to_date = '';
refresh_field('to_date');
}
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.js b/erpnext/hr/doctype/salary_manager/salary_manager.js
index 3745ee5a948..55ab920657c 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.js
+++ b/erpnext/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 =
- '
'+frappe._("Activity Log:")+'
'+msg+'
';
+ '
'+__("Activity Log:")+'
'+msg+'
';
}
//Create salary slip
@@ -19,7 +19,7 @@ cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) {
}
cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) {
- var check = confirm(frappe._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ frappe._(" and fiscal year : ")+doc.fiscal_year);
+ var check = confirm(__("Do you really want to Submit all Salary Slip for month : ") + doc.month+ __(" and fiscal year : ")+doc.fiscal_year);
if(check){
var callback = function(r, rt){
if (r.message)
@@ -33,7 +33,7 @@ cur_frm.cscript.make_bank_voucher = function(doc,cdt,cdn){
if(doc.company && doc.month && doc.fiscal_year){
cur_frm.cscript.make_jv(doc, cdt, cdn);
} else {
- msgprint(frappe._("Company, Month and Fiscal Year is mandatory"));
+ msgprint(__("Company, Month and Fiscal Year is mandatory"));
}
}
@@ -42,8 +42,8 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) {
var jv = frappe.model.make_new_doc_and_get_name('Journal Voucher');
jv = locals['Journal Voucher'][jv];
jv.voucher_type = 'Bank Voucher';
- jv.user_remark = frappe._('Payment of salary for the month: ') + doc.month +
- frappe._(' and fiscal year: ') + doc.fiscal_year;
+ jv.user_remark = __('Payment of salary for the month: ') + doc.month +
+ __(' 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/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index 0cfb6c4437e..e4235eac227 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/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(frappe._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
+ cur_frm.add_custom_button(__('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
}
cur_frm.toggle_enable('employee', doc.__islocal);
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.js b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
index 404ba52f44d..7606289f22a 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.js
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
@@ -17,7 +17,7 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
get_template:function() {
if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) {
- msgprint(frappe._("Attendance From Date and Attendance To Date is mandatory"));
+ msgprint(__("Attendance From Date and Attendance To Date is mandatory"));
return;
}
window.location.href = repl(frappe.request.url +
@@ -56,10 +56,10 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
return v;
});
- r.messages = ["
"+frappe._("Import Failed!")+"
"]
+ r.messages = ["
"+__("Import Failed!")+"
"]
.concat(r.messages)
} else {
- r.messages = ["
"+frappe._("Import Successful!")+"
"].
+ r.messages = ["
"+__("Import Successful!")+"
"].
concat(r.message.messages)
}
diff --git a/erpnext/hr/report/employee_birthday/employee_birthday.js b/erpnext/hr/report/employee_birthday/employee_birthday.js
index 9af3f3973f3..d8eb3372456 100644
--- a/erpnext/hr/report/employee_birthday/employee_birthday.js
+++ b/erpnext/hr/report/employee_birthday/employee_birthday.js
@@ -5,7 +5,7 @@ frappe.query_reports["Employee Birthday"] = {
"filters": [
{
"fieldname":"month",
- "label": frappe._("Month"),
+ "label": __("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 @@ frappe.query_reports["Employee Birthday"] = {
},
{
"fieldname":"company",
- "label": frappe._("Company"),
+ "label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js
index ff0bdf437ee..60302197395 100644
--- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js
+++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js
@@ -5,14 +5,14 @@ frappe.query_reports["Employee Leave Balance"] = {
"filters": [
{
"fieldname":"fiscal_year",
- "label": frappe._("Fiscal Year"),
+ "label": __("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": frappe.defaults.get_user_default("fiscal_year")
},
{
"fieldname":"company",
- "label": frappe._("Company"),
+ "label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
index f6a29fb3ea0..efb85e6b8d8 100644
--- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
+++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js
@@ -5,7 +5,7 @@ frappe.query_reports["Monthly Attendance Sheet"] = {
"filters": [
{
"fieldname":"month",
- "label": frappe._("Month"),
+ "label": __("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 @@ frappe.query_reports["Monthly Attendance Sheet"] = {
},
{
"fieldname":"fiscal_year",
- "label": frappe._("Fiscal Year"),
+ "label": __("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
},
{
"fieldname":"employee",
- "label": frappe._("Employee"),
+ "label": __("Employee"),
"fieldtype": "Link",
"options": "Employee"
},
{
"fieldname":"company",
- "label": frappe._("Company"),
+ "label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
diff --git a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.js b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.js
index cd9acccaebc..e570fd47511 100644
--- a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.js
+++ b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.js
@@ -5,7 +5,7 @@ frappe.query_reports["Monthly Salary Register"] = {
"filters": [
{
"fieldname":"month",
- "label": frappe._("Month"),
+ "label": __("Month"),
"fieldtype": "Select",
"options": "\nJan\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 @@ frappe.query_reports["Monthly Salary Register"] = {
},
{
"fieldname":"fiscal_year",
- "label": frappe._("Fiscal Year"),
+ "label": __("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
},
{
"fieldname":"employee",
- "label": frappe._("Employee"),
+ "label": __("Employee"),
"fieldtype": "Link",
"options": "Employee"
},
{
"fieldname":"company",
- "label": frappe._("Company"),
+ "label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js
index d0e9cc71f3f..ac023f360dd 100644
--- a/erpnext/manufacturing/doctype/bom/bom.js
+++ b/erpnext/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(frappe._("Update Cost"), cur_frm.cscript.update_cost);
+ cur_frm.add_custom_button(__("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(frappe._("You can not change rate if BOM mentioned agianst any item"));
+ msgprint(__("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/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js
index 59017319b96..0b014baf44a 100644
--- a/erpnext/manufacturing/doctype/production_order/production_order.js
+++ b/erpnext/manufacturing/doctype/production_order/production_order.js
@@ -17,13 +17,13 @@ $.extend(cur_frm.cscript, {
cfn_set_fields(doc, dt, dn);
if (doc.docstatus === 0 && !doc.__islocal) {
- this.frm.set_intro(frappe._("Submit this Production Order for further processing."));
+ this.frm.set_intro(__("Submit this Production Order for further processing."));
} else if (doc.docstatus === 1) {
var percent = flt(doc.produced_qty) / flt(doc.qty) * 100;
- this.frm.dashboard.add_progress(cint(percent) + "% " + frappe._("Complete"), percent);
+ this.frm.dashboard.add_progress(cint(percent) + "% " + __("Complete"), percent);
if(doc.status === "Stopped") {
- this.frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop");
+ this.frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop");
}
}
},
@@ -55,20 +55,20 @@ $.extend(cur_frm.cscript, {
var cfn_set_fields = function(doc, dt, dn) {
if (doc.docstatus == 1) {
if (doc.status != 'Stopped' && doc.status != 'Completed')
- cur_frm.add_custom_button(frappe._('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
+ cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
else if (doc.status == 'Stopped')
- cur_frm.add_custom_button(frappe._('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
+ cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
- cur_frm.add_custom_button(frappe._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
- cur_frm.add_custom_button(frappe._('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']);
+ 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.cscript['Stop Production Order'] = function() {
var doc = cur_frm.doc;
- var check = confirm(frappe._("Do you really want to stop production order: " + doc.name));
+ var check = confirm(__("Do you really want to stop production order: " + doc.name));
if (check) {
return $c_obj(doc, 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();});
}
@@ -76,7 +76,7 @@ cur_frm.cscript['Stop Production Order'] = function() {
cur_frm.cscript['Unstop Production Order'] = function() {
var doc = cur_frm.doc;
- var check = confirm(frappe._("Do really want to unstop production order: " + doc.name));
+ var check = confirm(__("Do really want to unstop production order: " + doc.name));
if (check)
return $c_obj(doc, 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();});
}
@@ -111,5 +111,5 @@ cur_frm.set_query("bom_no", function(doc) {
query: "erpnext.controllers.queries.bom",
filters: {item: cstr(doc.production_item)}
}
- } else msgprint(frappe._("Please enter Production Item first"));
+ } else msgprint(__("Please enter Production Item first"));
});
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
index fc7abde06cf..54aa9a2b576 100644
--- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js
+++ b/erpnext/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: "erpnext.controllers.queries.bom",
filters:{'item': cstr(d.item_code)}
}
- } else msgprint(frappe._("Please enter Item first"));
+ } else msgprint(__("Please enter Item first"));
}
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index 46de4f004b2..5d899865968 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -4,11 +4,11 @@
// show tasks
cur_frm.cscript.refresh = function(doc) {
if(!doc.__islocal) {
- cur_frm.appframe.add_button(frappe._("Gantt Chart"), function() {
+ cur_frm.appframe.add_button(__("Gantt Chart"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("Gantt", "Task");
}, "icon-tasks");
- cur_frm.add_custom_button(frappe._("Tasks"), function() {
+ cur_frm.add_custom_button(__("Tasks"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("List", "Task");
}, "icon-list");
diff --git a/erpnext/projects/doctype/task/task_calendar.js b/erpnext/projects/doctype/task/task_calendar.js
index 029a48f8d8b..a9d3d6b5663 100644
--- a/erpnext/projects/doctype/task/task_calendar.js
+++ b/erpnext/projects/doctype/task/task_calendar.js
@@ -6,7 +6,7 @@ frappe.views.calendar["Task"] = {
"start": "exp_start_date",
"end": "exp_end_date",
"id": "name",
- "title": frappe._("subject"),
+ "title": __("subject"),
"allDay": "allDay"
},
gantt: true,
@@ -15,7 +15,7 @@ frappe.views.calendar["Task"] = {
"fieldtype": "Link",
"fieldname": "project",
"options": "Project",
- "label": frappe._("Project")
+ "label": __("Project")
}
],
get_events_method: "erpnext.projects.doctype.task.task.get_events"
diff --git a/erpnext/projects/doctype/time_log/time_log_list.js b/erpnext/projects/doctype/time_log/time_log_list.js
index af7f8ab13ad..e56fc64f50d 100644
--- a/erpnext/projects/doctype/time_log/time_log_list.js
+++ b/erpnext/projects/doctype/time_log/time_log_list.js
@@ -6,22 +6,22 @@ frappe.listview_settings['Time Log'] = {
add_fields: ["`tabTime Log`.`status`", "`tabTime Log`.`billable`", "`tabTime Log`.`activity_type`"],
selectable: true,
onload: function(me) {
- me.appframe.add_button(frappe._("Make Time Log Batch"), function() {
+ me.appframe.add_button(__("Make Time Log Batch"), function() {
var selected = me.get_checked_items() || [];
if(!selected.length) {
- msgprint(frappe._("Please select Time Logs."))
+ msgprint(__("Please select Time Logs."))
}
// select only billable time logs
for(var i in selected) {
var d = selected[i];
if(!d.billable) {
- msgprint(frappe._("Time Log is not billable") + ": " + d.name);
+ msgprint(__("Time Log is not billable") + ": " + d.name);
return;
}
if(d.status!="Submitted") {
- msgprint(frappe._("Time Log Status must be Submitted."));
+ msgprint(__("Time Log Status must be Submitted."));
}
}
diff --git a/erpnext/projects/doctype/time_log_batch/time_log_batch.js b/erpnext/projects/doctype/time_log_batch/time_log_batch.js
index 7f3a17e6ef4..05e62df29a6 100644
--- a/erpnext/projects/doctype/time_log_batch/time_log_batch.js
+++ b/erpnext/projects/doctype/time_log_batch/time_log_batch.js
@@ -18,14 +18,14 @@ cur_frm.set_query("time_log", "time_log_batch_details", function(doc) {
$.extend(cur_frm.cscript, {
refresh: function(doc) {
cur_frm.set_intro({
- "Draft": frappe._("Select Time Logs and Submit to create a new Sales Invoice."),
- "Submitted": frappe._("Click on 'Make Sales Invoice' button to create a new Sales Invoice."),
- "Billed": frappe._("This Time Log Batch has been billed."),
- "Cancelled": frappe._("This Time Log Batch has been cancelled.")
+ "Draft": __("Select Time Logs and Submit to create a new Sales Invoice."),
+ "Submitted": __("Click on 'Make Sales Invoice' button to create a new Sales Invoice."),
+ "Billed": __("This Time Log Batch has been billed."),
+ "Cancelled": __("This Time Log Batch has been cancelled.")
}[doc.status]);
if(doc.status=="Submitted") {
- cur_frm.add_custom_button(frappe._("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() },
+ cur_frm.add_custom_button(__("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() },
"icon-file-alt");
}
},
diff --git a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.js b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.js
index 11bd736f4e7..16fb4d8728b 100644
--- a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.js
+++ b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.js
@@ -5,13 +5,13 @@ frappe.query_reports["Daily Time Log Summary"] = {
"filters": [
{
"fieldname":"from_date",
- "label": frappe._("From Date"),
+ "label": __("From Date"),
"fieldtype": "Date",
"default": frappe.datetime.get_today()
},
{
"fieldname":"to_date",
- "label": frappe._("To Date"),
+ "label": __("To Date"),
"fieldtype": "Date",
"default": frappe.datetime.get_today()
},
diff --git a/erpnext/public/js/account_tree_grid.js b/erpnext/public/js/account_tree_grid.js
index ab5ce26c140..df39d3ffddf 100644
--- a/erpnext/public/js/account_tree_grid.js
+++ b/erpnext/public/js/account_tree_grid.js
@@ -37,39 +37,39 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
},
setup_columns: function() {
this.columns = [
- {id: "name", name: frappe._("Account"), field: "name", width: 300, cssClass: "cell-title",
+ {id: "name", name: __("Account"), field: "name", width: 300, cssClass: "cell-title",
formatter: this.tree_formatter},
- {id: "opening_dr", name: frappe._("Opening (Dr)"), field: "opening_dr", width: 100,
+ {id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr", width: 100,
formatter: this.currency_formatter},
- {id: "opening_cr", name: frappe._("Opening (Cr)"), field: "opening_cr", width: 100,
+ {id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr", width: 100,
formatter: this.currency_formatter},
- {id: "debit", name: frappe._("Debit"), field: "debit", width: 100,
+ {id: "debit", name: __("Debit"), field: "debit", width: 100,
formatter: this.currency_formatter},
- {id: "credit", name: frappe._("Credit"), field: "credit", width: 100,
+ {id: "credit", name: __("Credit"), field: "credit", width: 100,
formatter: this.currency_formatter},
- {id: "closing_dr", name: frappe._("Closing (Dr)"), field: "closing_dr", width: 100,
+ {id: "closing_dr", name: __("Closing (Dr)"), field: "closing_dr", width: 100,
formatter: this.currency_formatter},
- {id: "closing_cr", name: frappe._("Closing (Cr)"), field: "closing_cr", width: 100,
+ {id: "closing_cr", name: __("Closing (Cr)"), field: "closing_cr", width: 100,
formatter: this.currency_formatter}
];
},
filters: [
- {fieldtype: "Select", label: frappe._("Company"), link:"Company", default_value: "Select Company...",
+ {fieldtype: "Select", label: __("Company"), link:"Company", default_value: "Select Company...",
filter: function(val, item, opts, me) {
if (item.company == val || val == opts.default_value) {
return me.apply_zero_filter(val, item, opts, me);
}
return false;
}},
- {fieldtype: "Select", label: frappe._("Fiscal Year"), link:"Fiscal Year",
+ {fieldtype: "Select", label: __("Fiscal Year"), link:"Fiscal Year",
default_value: "Select Fiscal Year..."},
- {fieldtype: "Date", label: frappe._("From Date")},
- {fieldtype: "Label", label: frappe._("To")},
- {fieldtype: "Date", label: frappe._("To Date")},
- {fieldtype: "Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white",
+ {fieldtype: "Date", label: __("From Date")},
+ {fieldtype: "Label", label: __("To")},
+ {fieldtype: "Date", label: __("To Date")},
+ {fieldtype: "Button", label: __("Refresh"), icon:"icon-refresh icon-white",
cssClass:"btn-info"},
- {fieldtype: "Button", label: frappe._("Reset Filters")},
+ {fieldtype: "Button", label: __("Reset Filters")},
],
setup_filters: function() {
this._super();
@@ -207,7 +207,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
set_fiscal_year: function() {
if (this.opening_date > this.closing_date) {
- msgprint(frappe._("Opening Date should be before Closing Date"));
+ msgprint(__("Opening Date should be before Closing Date"));
return;
}
@@ -221,7 +221,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
});
if (!this.fiscal_year) {
- msgprint(frappe._("Opening Date and Closing Date should be within same Fiscal Year"));
+ msgprint(__("Opening Date and Closing Date should be within same Fiscal Year"));
return;
}
},
diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js
index e976052afba..76a114cd772 100644
--- a/erpnext/public/js/conf.js
+++ b/erpnext/public/js/conf.js
@@ -23,12 +23,12 @@ $(document).bind('toolbar_setup', function() {
frappe.provide('frappe.ui.misc');
frappe.ui.misc.about = function() {
if(!frappe.ui.misc.about_dialog) {
- var d = new frappe.ui.Dialog({title: frappe._('About')})
+ var d = new frappe.ui.Dialog({title: __('About')})
$(d.body).html(repl("
\
ERPNext
\
-
"+frappe._("An open source ERP made for the web.
") +
- "
"+frappe._("To report an issue, go to ")+"GitHub Issues
" +
- frappe._("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.")+
+ __("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.")+
"
";
frappe.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg;
}
diff --git a/erpnext/setup/doctype/backup_manager/backup_manager.js b/erpnext/setup/doctype/backup_manager/backup_manager.js
index 9fd16dc86b7..ee2b1a7fb4e 100644
--- a/erpnext/setup/doctype/backup_manager/backup_manager.js
+++ b/erpnext/setup/doctype/backup_manager/backup_manager.js
@@ -7,12 +7,11 @@ $.extend(cur_frm.cscript, {
if(!(cint(cur_frm.doc.dropbox_access_allowed) ||
cint(cur_frm.doc.gdrive_access_allowed))) {
- cur_frm.set_intro(frappe._("You can start by selecting backup frequency and \
- granting access for sync"));
+ cur_frm.set_intro(__("You can start by selecting backup frequency and granting access for sync"));
} else {
var services = {
- "dropbox": frappe._("Dropbox"),
- "gdrive": frappe._("Google Drive")
+ "dropbox": __("Dropbox"),
+ "gdrive": __("Google Drive")
}
var active_services = [];
@@ -25,7 +24,7 @@ $.extend(cur_frm.cscript, {
});
if(active_services.length > 0) {
- cur_frm.set_intro(frappe._("Backups will be uploaded to") + ": " +
+ cur_frm.set_intro(__("Backups will be uploaded to") + ": " +
frappe.utils.comma_and(active_services));
} else {
cur_frm.set_intro("");
@@ -36,8 +35,8 @@ $.extend(cur_frm.cscript, {
validate_send_notifications_to: function() {
if(!cur_frm.doc.send_notifications_to) {
- msgprint(frappe._("Please specify") + ": " +
- frappe._(frappe.meta.get_label(cur_frm.doctype, "send_notifications_to")));
+ msgprint(__("Please specify") + ": " +
+ __(frappe.meta.get_label(cur_frm.doctype, "send_notifications_to")));
return false;
}
@@ -90,4 +89,4 @@ $.extend(cur_frm.cscript, {
// upload_backups_to_gdrive: function() {
// cur_frm.save();
// },
-});
\ No newline at end of file
+});
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index d49a43ec474..d421a953286 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -35,7 +35,7 @@ cur_frm.cscript.replace_abbr = function() {
},
callback: function(r) {
if(r.exc) {
- msgprint(frappe._("There were errors."));
+ msgprint(__("There were errors."));
return;
} else {
cur_frm.set_value("abbr", args.new_abbr);
@@ -61,8 +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((""+frappe._("Special Characters")+" ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? "+
- frappe._("are not allowed for ")+"\n"+frappe._("Company Name")+" "+ doc.company_name +""))
+ msgprint((""+__("Special Characters")+" ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? "+
+ __("are not allowed for ")+"\n"+__("Company Name")+" "+ doc.company_name +""))
doc.company_name = '';
refresh_field('company_name');
}
@@ -70,8 +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(""+frappe._("Special Characters ")+"! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?" +
- frappe._("are not allowed for")+ "\nAbbr " + doc.abbr +"")
+ msgprint(""+__("Special Characters ")+"! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?" +
+ __("are not allowed for")+ "\nAbbr " + doc.abbr +"")
doc.abbr = '';
refresh_field('abbr');
}
diff --git a/erpnext/setup/doctype/currency/currency.js b/erpnext/setup/doctype/currency/currency.js
index bdda70ef795..79343e9ae6d 100644
--- a/erpnext/setup/doctype/currency/currency.js
+++ b/erpnext/setup/doctype/currency/currency.js
@@ -4,6 +4,6 @@
cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro("");
if(!cur_frm.doc.enabled) {
- cur_frm.set_intro(frappe._("This Currency is disabled. Enable to use in transactions"))
+ cur_frm.set_intro(__("This Currency is disabled. Enable to use in transactions"))
}
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/currency_exchange/currency_exchange.js b/erpnext/setup/doctype/currency_exchange/currency_exchange.js
index b4187efc1f9..f6beba559f4 100644
--- a/erpnext/setup/doctype/currency_exchange/currency_exchange.js
+++ b/erpnext/setup/doctype/currency_exchange/currency_exchange.js
@@ -22,7 +22,7 @@ $.extend(cur_frm.cscript, {
set_exchange_rate_label: function() {
if(cur_frm.doc.from_currency && cur_frm.doc.to_currency) {
- var default_label = frappe._(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label);
+ var default_label = __(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label);
cur_frm.fields_dict.exchange_rate.set_label(default_label +
repl(" (1 %(from_currency)s = [?] %(to_currency)s)", cur_frm.doc));
}
diff --git a/erpnext/setup/doctype/customer_group/customer_group.js b/erpnext/setup/doctype/customer_group/customer_group.js
index 13abd8c3078..04670720dfd 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.js
+++ b/erpnext/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.set_read_only();
- cur_frm.set_intro(frappe._("This is a root customer group and cannot be edited."));
+ cur_frm.set_intro(__("This is a root customer group and cannot be edited."));
} else {
cur_frm.set_intro(null);
}
diff --git a/erpnext/setup/doctype/email_digest/email_digest.js b/erpnext/setup/doctype/email_digest/email_digest.js
index 51f6231c29b..a0be163425a 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.js
+++ b/erpnext/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 = frappe._("You must ")+ ""+frappe._("Save ")+""+frappe._("the form before proceeding");
- var err_msg = frappe._("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 = __("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.")
- cur_frm.add_custom_button(frappe._('View Now'), function() {
+ cur_frm.add_custom_button(__('View Now'), function() {
doc = locals[dt][dn];
if(doc.__unsaved != 1) {
return $c_obj(doc, '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 frappe.ui.Dialog({
- title: frappe._('Email Digest: ') + dn,
+ title: __('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(frappe._('Send Now'), function() {
+ cur_frm.add_custom_button(__('Send Now'), function() {
doc = locals[dt][dn];
if(doc.__unsaved != 1) {
return $c_obj(doc, '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(frappe._('Message Sent'));
+ msgprint(__('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 frappe.ui.Dialog({
- title: frappe._('Add/Remove Recipients'),
+ title: __('Add/Remove Recipients'),
width: 400
});
var dialog_div = $a(d.body, 'div', 'dialog-div', '', '');
diff --git a/erpnext/setup/doctype/item_group/item_group.js b/erpnext/setup/doctype/item_group/item_group.js
index 5e0e8436842..589039e245c 100644
--- a/erpnext/setup/doctype/item_group/item_group.js
+++ b/erpnext/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.appframe.add_button(frappe._("Item Group Tree"), function() {
+ cur_frm.appframe.add_button(__("Item Group Tree"), function() {
frappe.set_route("Sales Browser", "Item Group");
}, "icon-sitemap")
@@ -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.set_read_only();
- cur_frm.set_intro(frappe._("This is a root item group and cannot be edited."));
+ cur_frm.set_intro(__("This is a root item group and cannot be edited."));
} else {
cur_frm.set_intro(null);
}
diff --git a/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.js b/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.js
index a8ac0bd28bb..cda8fd6f20e 100644
--- a/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.js
+++ b/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.js
@@ -7,9 +7,9 @@ cur_frm.cscript = {
refresh: function(doc) {
cur_frm.set_intro("");
if(doc.extract_emails) {
- cur_frm.set_intro(frappe._("Active: Will extract emails from ") + doc.email_id);
+ cur_frm.set_intro(__("Active: Will extract emails from ") + doc.email_id);
} else {
- cur_frm.set_intro(frappe._("Not Active"));
+ cur_frm.set_intro(__("Not Active"));
}
}
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_email_settings/sales_email_settings.js b/erpnext/setup/doctype/sales_email_settings/sales_email_settings.js
index a8ac0bd28bb..cda8fd6f20e 100644
--- a/erpnext/setup/doctype/sales_email_settings/sales_email_settings.js
+++ b/erpnext/setup/doctype/sales_email_settings/sales_email_settings.js
@@ -7,9 +7,9 @@ cur_frm.cscript = {
refresh: function(doc) {
cur_frm.set_intro("");
if(doc.extract_emails) {
- cur_frm.set_intro(frappe._("Active: Will extract emails from ") + doc.email_id);
+ cur_frm.set_intro(__("Active: Will extract emails from ") + doc.email_id);
} else {
- cur_frm.set_intro(frappe._("Not Active"));
+ cur_frm.set_intro(__("Not Active"));
}
}
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js
index 9cf2393db6a..8f12aa98906 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.js
+++ b/erpnext/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: frappe._('No addresses created'),
+ no_results_message: __('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: frappe._('No contacts created'),
+ no_results_message: __('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/erpnext/setup/doctype/sales_person/sales_person.js b/erpnext/setup/doctype/sales_person/sales_person.js
index 84ce303ec02..a87279f6666 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.js
+++ b/erpnext/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.set_read_only();
- cur_frm.set_intro(frappe._("This is a root sales person and cannot be edited."));
+ cur_frm.set_intro(__("This is a root sales person and cannot be edited."));
} else {
cur_frm.set_intro(null);
}
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.js b/erpnext/setup/doctype/supplier_type/supplier_type.js
index 12a77cbc4ae..0949b6a033b 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.js
+++ b/erpnext/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 ? "" : frappe._("There is nothing to edit."))
+ cur_frm.set_intro(doc.__islocal ? "" : __("There is nothing to edit."))
}
\ No newline at end of file
diff --git a/erpnext/setup/doctype/territory/territory.js b/erpnext/setup/doctype/territory/territory.js
index c027271a411..4b7b2f68c88 100644
--- a/erpnext/setup/doctype/territory/territory.js
+++ b/erpnext/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.set_read_only();
- cur_frm.set_intro(frappe._("This is a root territory and cannot be edited."));
+ cur_frm.set_intro(__("This is a root territory and cannot be edited."));
} else {
cur_frm.set_intro(null);
}
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js
index fe2ceb88d38..fbc5d024176 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.js
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.js
@@ -17,7 +17,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
args: values,
callback: function(r) {
if(r.exc) {
- var d = msgprint(frappe._("There were errors."));
+ var d = msgprint(__("There were errors."));
d.custom_onhide = function() {
frappe.set_route(erpnext.wiz.page_name, "0");
}
@@ -25,7 +25,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
wiz.show_complete();
setTimeout(function() {
if(user==="Administrator") {
- msgprint(frappe._("Login with your new User ID") + ":" + values.email);
+ msgprint(__("Login with your new User ID") + ":" + values.email);
setTimeout(function() {
frappe.app.logout();
}, 2000);
@@ -37,40 +37,40 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
}
})
},
- title: frappe._("ERPNext Setup Guide"),
+ title: __("ERPNext Setup Guide"),
welcome_html: '
\
-
'+frappe._('ERPNext Setup')+'
\
+
'+__('ERPNext Setup')+'
\
' +
- frappe._('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') +
+ __('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') +
'
',
working_html: '
\
-
'+frappe._('Setting up...')+'
\
+
'+__('Setting up...')+'
\
' +
- frappe._('Sit tight while your system is being setup. This may take a few moments.') +
+ __('Sit tight while your system is being setup. This may take a few moments.') +
'
',
complete_html: '
\
-
'+frappe._('Setup Complete!')+'
\
+
'+__('Setup Complete!')+'
\
' +
- frappe._('Your setup is complete. Refreshing...') +
+ __('Your setup is complete. Refreshing...') +
'
',
slides: [
// User
{
- title: frappe._("The First User: You"),
+ title: __("The First User: You"),
icon: "icon-user",
fields: [
- {"fieldname": "first_name", "label": frappe._("First Name"), "fieldtype": "Data",
+ {"fieldname": "first_name", "label": __("First Name"), "fieldtype": "Data",
reqd:1},
- {"fieldname": "last_name", "label": frappe._("Last Name"), "fieldtype": "Data",
+ {"fieldname": "last_name", "label": __("Last Name"), "fieldtype": "Data",
reqd:1},
- {"fieldname": "email", "label": frappe._("Email Id"), "fieldtype": "Data",
+ {"fieldname": "email", "label": __("Email Id"), "fieldtype": "Data",
reqd:1, "description":"Your Login Id", "options":"Email"},
- {"fieldname": "password", "label": frappe._("Password"), "fieldtype": "Password",
+ {"fieldname": "password", "label": __("Password"), "fieldtype": "Password",
reqd:1},
{fieldtype:"Attach Image", fieldname:"attach_user",
label:"Attach Your User..."},
],
- help: frappe._('The first user will become the System Manager (you can change that later).'),
+ help: __('The first user will become the System Manager (you can change that later).'),
onload: function(slide) {
if(user!=="Administrator") {
slide.form.fields_dict.password.$wrapper.toggle(false);
@@ -86,21 +86,21 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
// Organization
{
- title: frappe._("The Organization"),
+ title: __("The Organization"),
icon: "icon-building",
fields: [
- {fieldname:'company_name', label: frappe._('Company Name'), fieldtype:'Data', reqd:1,
+ {fieldname:'company_name', label: __('Company Name'), fieldtype:'Data', reqd:1,
placeholder: 'e.g. "My Company LLC"'},
- {fieldname:'company_abbr', label: frappe._('Company Abbreviation'), fieldtype:'Data',
+ {fieldname:'company_abbr', label: __('Company Abbreviation'), fieldtype:'Data',
placeholder:'e.g. "MC"',reqd:1},
{fieldname:'fy_start_date', label:'Financial Year Start Date', fieldtype:'Date',
description:'Your financial year begins on', reqd:1},
{fieldname:'fy_end_date', label:'Financial Year End Date', fieldtype:'Date',
description:'Your financial year ends on', reqd:1},
- {fieldname:'company_tagline', label: frappe._('What does it do?'), fieldtype:'Data',
+ {fieldname:'company_tagline', label: __('What does it do?'), fieldtype:'Data',
placeholder:'e.g. "Build tools for builders"', reqd:1},
],
- help: frappe._('The name of your company for which you are setting up this system.'),
+ help: __('The name of your company for which you are setting up this system.'),
onload: function(slide) {
slide.get_input("company_name").on("change", function() {
var parts = slide.get_input("company_name").val().split(" ");
@@ -120,19 +120,19 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
// Country
{
- title: frappe._("Country, Timezone and Currency"),
+ title: __("Country, Timezone and Currency"),
icon: "icon-flag",
fields: [
- {fieldname:'country', label: frappe._('Country'), reqd:1,
+ {fieldname:'country', label: __('Country'), reqd:1,
options: "", fieldtype: 'Select'},
- {fieldname:'currency', label: frappe._('Default Currency'), reqd:1,
+ {fieldname:'currency', label: __('Default Currency'), reqd:1,
options: "", fieldtype: 'Select'},
- {fieldname:'timezone', label: frappe._('Time Zone'), reqd:1,
+ {fieldname:'timezone', label: __('Time Zone'), reqd:1,
options: "", fieldtype: 'Select'},
- {fieldname:'chart_of_accounts', label: frappe._('Chart of Accounts'),
+ {fieldname:'chart_of_accounts', label: __('Chart of Accounts'),
options: "", fieldtype: 'Select'}
],
- help: frappe._('Select your home country and check the timezone and currency.'),
+ help: __('Select your home country and check the timezone and currency.'),
onload: function(slide, form) {
frappe.call({
method:"frappe.country_info.get_country_timezone_info",
@@ -179,8 +179,8 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
// Logo
{
icon: "icon-bookmark",
- title: frappe._("Logo and Letter Heads"),
- help: frappe._('Upload your letter head and logo - you can edit them later.'),
+ title: __("Logo and Letter Heads"),
+ help: __('Upload your letter head and logo - you can edit them later.'),
fields: [
{fieldtype:"Attach Image", fieldname:"attach_letterhead", label:"Attach Letterhead..."},
{fieldtype:"Attach Image", fieldname:"attach_logo", label:"Attach Logo..."},
@@ -190,40 +190,40 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
// Taxes
{
icon: "icon-money",
- "title": frappe._("Add Taxes"),
- "help": frappe._("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."),
+ "title": __("Add Taxes"),
+ "help": __("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."),
"fields": [],
},
// Customers
{
icon: "icon-group",
- "title": frappe._("Your Customers"),
- "help": frappe._("List a few of your customers. They could be organizations or individuals."),
+ "title": __("Your Customers"),
+ "help": __("List a few of your customers. They could be organizations or individuals."),
"fields": [],
},
// Items to Sell
{
icon: "icon-barcode",
- "title": frappe._("Your Products or Services"),
- "help": frappe._("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."),
+ "title": __("Your Products or Services"),
+ "help": __("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."),
"fields": [],
},
// Suppliers
{
icon: "icon-group",
- "title": frappe._("Your Suppliers"),
- "help": frappe._("List a few of your suppliers. They could be organizations or individuals."),
+ "title": __("Your Suppliers"),
+ "help": __("List a few of your suppliers. They could be organizations or individuals."),
"fields": [],
},
// Items to Buy
{
icon: "icon-barcode",
- "title": frappe._("Products or Services You Buy"),
- "help": frappe._("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."),
+ "title": __("Products or Services You Buy"),
+ "help": __("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."),
"fields": [],
},
@@ -324,7 +324,7 @@ frappe.wiz.Wizard = Class.extend({
return;
var me = this;
this.$welcome = this.get_message(this.welcome_html +
- ' ')
+ ' ')
.appendTo(this.parent);
this.$welcome.find(".btn").click(function() {
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index f94a118ff63..e9ce9bd92bf 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -25,20 +25,20 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
});
if(!from_sales_invoice)
- cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_sales_invoice);
+ cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice);
}
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
- cur_frm.add_custom_button(frappe._('Make Installation Note'), this.make_installation_note);
+ cur_frm.add_custom_button(__('Make Installation Note'), this.make_installation_note);
if (doc.docstatus==1) {
- cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
+ cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
this.show_stock_ledger();
this.show_general_ledger();
}
if(doc.docstatus==0 && !doc.__islocal) {
- cur_frm.add_custom_button(frappe._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
+ cur_frm.add_custom_button(__('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
}
set_print_hide(doc, dt, dn);
@@ -48,7 +48,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(["expense_account", "cost_center"], aii_enabled);
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(frappe._('From Sales Order'),
+ cur_frm.add_custom_button(__('From Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 78bdcb08b57..6037c23448b 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -130,7 +130,7 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) {
cur_frm.cscript.add_image = function(doc, dt, dn) {
if(!doc.image) {
- msgprint(frappe._('Please select an "Image" first'));
+ msgprint(__('Please select an "Image" first'));
return;
}
@@ -145,7 +145,7 @@ cur_frm.cscript.add_image = function(doc, dt, dn) {
// Quotation to validation - either customer or lead mandatory
cur_frm.cscript.weight_to_validate = function(doc, cdt, cdn){
if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom) {
- msgprint(frappe._('Weight is mentioned,\nPlease mention "Weight UOM" too'));
+ msgprint(__('Weight is mentioned,\nPlease mention "Weight UOM" too'));
validated = 0;
}
}
@@ -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(frappe._("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]));
}
}
diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
index 6917efc4497..38e8636f8e4 100644
--- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
+++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
@@ -10,7 +10,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
var me = this;
this.frm.fields_dict.lc_pr_details.grid.get_field('purchase_receipt').get_query =
function() {
- if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
+ if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
filters:[
['Purchase Receipt', 'docstatus', '=', '1'],
@@ -20,7 +20,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
};
this.frm.fields_dict.landed_cost_details.grid.get_field('account_head').get_query = function() {
- if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
+ if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
filters:[
['Account', 'group_or_ledger', '=', 'Ledger'],
@@ -32,7 +32,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
this.frm.fields_dict.landed_cost_details.grid.get_field('cost_center').get_query =
function() {
- if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
+ if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
filters:[
['Cost Center', 'group_or_ledger', '=', 'Ledger'],
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 081469b1038..271fe865680 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -25,38 +25,38 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
cur_frm.dashboard.reset();
if(doc.docstatus===1) {
if(doc.status==="Stopped") {
- cur_frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop")
+ cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop")
}
cur_frm.dashboard.add_progress(cint(doc.per_ordered) + "% "
- + frappe._("Fulfilled"), cint(doc.per_ordered));
+ + __("Fulfilled"), cint(doc.per_ordered));
}
if(doc.docstatus==0) {
- cur_frm.add_custom_button(frappe._("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap");
+ cur_frm.add_custom_button(__("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap");
}
if(doc.docstatus == 1 && doc.status != 'Stopped') {
if(doc.material_request_type === "Purchase")
- cur_frm.add_custom_button(frappe._("Make Supplier Quotation"),
+ cur_frm.add_custom_button(__("Make Supplier Quotation"),
this.make_supplier_quotation);
if(doc.material_request_type === "Transfer" && doc.status === "Submitted")
- cur_frm.add_custom_button(frappe._("Transfer Material"), this.make_stock_entry);
+ cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry);
if(flt(doc.per_ordered, 2) < 100) {
if(doc.material_request_type === "Purchase")
- cur_frm.add_custom_button(frappe._('Make Purchase Order'),
+ cur_frm.add_custom_button(__('Make Purchase Order'),
this.make_purchase_order);
- cur_frm.add_custom_button(frappe._('Stop Material Request'),
+ cur_frm.add_custom_button(__('Stop Material Request'),
cur_frm.cscript['Stop Material Request'], "icon-exclamation");
}
- cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
+ cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
}
if (this.frm.doc.docstatus===0) {
- cur_frm.add_custom_button(frappe._('From Sales Order'),
+ cur_frm.add_custom_button(__('From Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request",
@@ -72,7 +72,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
}
if(doc.docstatus == 1 && doc.status == 'Stopped')
- cur_frm.add_custom_button(frappe._('Unstop Material Request'),
+ cur_frm.add_custom_button(__('Unstop Material Request'),
cur_frm.cscript['Unstop Material Request'], "icon-check");
},
@@ -91,13 +91,13 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
get_items_from_bom: function() {
var d = new frappe.ui.Dialog({
- title: frappe._("Get Items from BOM"),
+ title: __("Get Items from BOM"),
fields: [
- {"fieldname":"bom", "fieldtype":"Link", "label":frappe._("BOM"),
+ {"fieldname":"bom", "fieldtype":"Link", "label":__("BOM"),
options:"BOM"},
{"fieldname":"fetch_exploded", "fieldtype":"Check",
- "label":frappe._("Fetch exploded BOM (including sub-assemblies)"), "default":1},
- {fieldname:"fetch", "label":frappe._("Get Items from BOM"), "fieldtype":"Button"}
+ "label":__("Fetch exploded BOM (including sub-assemblies)"), "default":1},
+ {fieldname:"fetch", "label":__("Get Items from BOM"), "fieldtype":"Button"}
]
});
d.get_input("fetch").on("click", function() {
@@ -164,12 +164,12 @@ $.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur
cur_frm.cscript.qty = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (flt(d.qty) < flt(d.min_order_qty))
- alert(frappe._("Warning: Material Requested Qty is less than Minimum Order Qty"));
+ alert(__("Warning: Material Requested Qty is less than Minimum Order Qty"));
};
cur_frm.cscript['Stop Material Request'] = function() {
var doc = cur_frm.doc;
- var check = confirm(frappe._("Do you really want to STOP this Material Request?"));
+ var check = confirm(__("Do you really want to STOP this Material Request?"));
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': doc}, function(r,rt) {
@@ -180,7 +180,7 @@ cur_frm.cscript['Stop Material Request'] = function() {
cur_frm.cscript['Unstop Material Request'] = function(){
var doc = cur_frm.doc;
- var check = confirm(frappe._("Do you really want to UNSTOP this Material Request?"));
+ var check = confirm(__("Do you really want to UNSTOP this Material Request?"));
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': doc}, function(r,rt) {
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.js b/erpnext/stock/doctype/packing_slip/packing_slip.js
index ff1e1f036e8..2f0bd81b125 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.js
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.js
@@ -45,13 +45,13 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
cur_frm.cscript.validate_case_nos = function(doc) {
doc = locals[doc.doctype][doc.name];
if(cint(doc.from_case_no)==0) {
- msgprint(frappe._("Case No. cannot be 0"))
+ msgprint(__("Case No. cannot be 0"))
validated = false;
} else if(!cint(doc.to_case_no)) {
doc.to_case_no = doc.from_case_no;
refresh_field('to_case_no');
} else if(cint(doc.to_case_no) < cint(doc.from_case_no)) {
- msgprint(frappe._("'To Case No.' cannot be less than 'From Case No.'"));
+ msgprint(__("'To Case No.' cannot be less than 'From Case No.'"));
validated = false;
}
}
@@ -72,14 +72,13 @@ cur_frm.cscript.validate_duplicate_items = function(doc, ps_detail) {
for(var i=0; i' + make_row('Gross Weight', doc.gross_weight_pkg) + ''
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index 2359700809b..ac90ec15e2b 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -17,7 +17,7 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
if(this.frm.doc.docstatus == 1) {
if(!this.frm.doc.__billing_complete) {
- cur_frm.add_custom_button(frappe._('Make Purchase Invoice'),
+ cur_frm.add_custom_button(__('Make Purchase Invoice'),
this.make_purchase_invoice);
}
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
@@ -25,7 +25,7 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
this.show_stock_ledger();
this.show_general_ledger();
} else {
- cur_frm.add_custom_button(frappe._(frappe._('From Purchase Order')),
+ cur_frm.add_custom_button(__(__('From Purchase Order')),
function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
@@ -63,8 +63,8 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
}
if(item.qty > item.received_qty) {
- msgprint(frappe._("Error") + ": " + frappe._(frappe.meta.get_label(item.doctype, "qty", item.name))
- + " > " + frappe._(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(frappe._("Error") + ": " +
- frappe._(frappe.meta.get_label(item.doctype, "rejected_qty", item.name))
- + " > " + frappe._(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));
@@ -141,7 +140,7 @@ cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('batch_no').get_q
}
}
else
- msgprint(frappe._("Please enter Item Code."));
+ msgprint(__("Please enter Item Code."));
}
cur_frm.cscript.select_print_heading = function(doc, cdt, cdn) {
@@ -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);
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 07456debf77..d32f17884cf 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -70,10 +70,10 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
if(this.frm.doc.docstatus === 1 &&
frappe.boot.user.can_create.indexOf("Journal Voucher")!==-1) {
if(this.frm.doc.purpose === "Sales Return") {
- this.frm.add_custom_button(frappe._("Make Credit Note"), function() { me.make_return_jv(); });
+ this.frm.add_custom_button(__("Make Credit Note"), function() { me.make_return_jv(); });
this.add_excise_button();
} else if(this.frm.doc.purpose === "Purchase Return") {
- this.frm.add_custom_button(frappe._("Make Debit Note"), function() { me.make_return_jv(); });
+ this.frm.add_custom_button(__("Make Debit Note"), function() { me.make_return_jv(); });
this.add_excise_button();
}
}
@@ -166,11 +166,11 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
if(this.frm.doc.purpose === "Sales Return") {
if(this.frm.doc.delivery_note_no && this.frm.doc.sales_invoice_no) {
// both specified
- msgprint(frappe._("You can not enter both Delivery Note No and Sales Invoice No. Please enter any one."));
+ msgprint(__("You can not enter both Delivery Note No and Sales Invoice No. Please enter any one."));
} else if(!(this.frm.doc.delivery_note_no || this.frm.doc.sales_invoice_no)) {
// none specified
- msgprint(frappe._("Please enter Delivery Note No or Sales Invoice No to proceed"));
+ msgprint(__("Please enter Delivery Note No or Sales Invoice No to proceed"));
} else if(this.frm.doc.delivery_note_no) {
return {doctype: "Delivery Note", docname: this.frm.doc.delivery_note_no};
@@ -185,7 +185,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
} else {
// not specified
- msgprint(frappe._("Please enter Purchase Receipt No to proceed"));
+ msgprint(__("Please enter Purchase Receipt No to proceed"));
}
}
@@ -193,7 +193,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
add_excise_button: function() {
if(frappe.boot.sysdefaults.country === "India")
- this.frm.add_custom_button(frappe._("Make Excise Invoice"), function() {
+ this.frm.add_custom_button(__("Make Excise Invoice"), function() {
var excise = frappe.model.make_new_doc_and_get_name('Journal Voucher');
excise = locals['Journal Voucher'][excise];
excise.voucher_type = 'Excise Voucher';
@@ -333,7 +333,7 @@ cur_frm.fields_dict['mtn_details'].grid.get_field('batch_no').get_query = functi
}
}
} else {
- msgprint(frappe._("Please enter Item Code to get batch no"));
+ msgprint(__("Please enter Item Code to get batch no"));
}
}
@@ -390,7 +390,7 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
cur_frm.cscript.validate_items = function(doc) {
cl = doc.mtn_details || [];
if (!cl.length) {
- msgprint(frappe._("Item table can not be blank"));
+ msgprint(__("Item table can not be blank"));
validated = false;
}
}
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index bf62c75ac19..aff3b2eb4f7 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -56,12 +56,12 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
this.show_download_template();
this.show_upload();
if(this.frm.doc.reconciliation_json) {
- this.frm.set_intro(frappe._("You can submit this Stock Reconciliation."));
+ this.frm.set_intro(__("You can submit this Stock Reconciliation."));
} else {
- this.frm.set_intro(frappe._("Download the Template, fill appropriate data and attach the modified file."));
+ this.frm.set_intro(__("Download the Template, fill appropriate data and attach the modified file."));
}
} else if(this.frm.doc.docstatus == 1) {
- this.frm.set_intro(frappe._("Cancelling this Stock Reconciliation will nullify its effect."));
+ this.frm.set_intro(__("Cancelling this Stock Reconciliation will nullify its effect."));
this.show_stock_ledger();
this.show_general_ledger();
} else {
@@ -73,20 +73,18 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
show_download_template: function() {
var me = this;
- this.frm.add_custom_button(frappe._("Download Template"), function() {
- this.title = frappe._("Stock Reconcilation Template");
- frappe.tools.downloadify([[frappe._("Stock Reconciliation")],
+ this.frm.add_custom_button(__("Download Template"), function() {
+ this.title = __("Stock Reconcilation Template");
+ frappe.tools.downloadify([[__("Stock Reconciliation")],
["----"],
- [frappe._("Stock Reconciliation can be used to update the stock on a particular date, ")
- + frappe._("usually as per physical inventory.")],
- [frappe._("When submitted, the system creates difference entries ")
- + frappe._("to set the given stock and valuation on this date.")],
- [frappe._("It can also be used to create opening stock entries and to fix stock value.")],
+ [__("Stock Reconciliation can be used to update the stock on a particular date, usually as per physical inventory.")],
+ [__("When submitted, the system creates difference entries to set the given stock and valuation on this date.")],
+ [__("It can also be used to create opening stock entries and to fix stock value.")],
["----"],
- [frappe._("Notes:")],
- [frappe._("Item Code and Warehouse should already exist.")],
- [frappe._("You can update either Quantity or Valuation Rate or both.")],
- [frappe._("If no change in either Quantity or Valuation Rate, leave the cell blank.")],
+ [__("Notes:")],
+ [__("Item Code and Warehouse should already exist.")],
+ [__("You can update either Quantity or Valuation Rate or both.")],
+ [__("If no change in either Quantity or Valuation Rate, leave the cell blank.")],
["----"],
["Item Code", "Warehouse", "Quantity", "Valuation Rate"]], null, this);
return false;
@@ -120,8 +118,8 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
show_download_reconciliation_data: function() {
var me = this;
if(this.frm.doc.reconciliation_json) {
- this.frm.add_custom_button(frappe._("Download Reconcilation Data"), function() {
- this.title = frappe._("Stock Reconcilation Data");
+ this.frm.add_custom_button(__("Download Reconcilation Data"), function() {
+ this.title = __("Stock Reconcilation Data");
frappe.tools.downloadify(JSON.parse(me.frm.doc.reconciliation_json), null, this);
return false;
}, "icon-download");
@@ -158,4 +156,4 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
},
});
-cur_frm.cscript = new erpnext.stock.StockReconciliation({frm: cur_frm});
\ No newline at end of file
+cur_frm.cscript = new erpnext.stock.StockReconciliation({frm: cur_frm});
diff --git a/erpnext/stock/page/stock_ageing/stock_ageing.js b/erpnext/stock/page/stock_ageing/stock_ageing.js
index d7a2b3e8bd3..c16e2eca1be 100644
--- a/erpnext/stock/page/stock_ageing/stock_ageing.js
+++ b/erpnext/stock/page/stock_ageing/stock_ageing.js
@@ -5,7 +5,7 @@
frappe.pages['stock-ageing'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
- title: frappe._('Stock Ageing'),
+ title: __('Stock Ageing'),
single_column: true
});
@@ -21,7 +21,7 @@ frappe.require("assets/erpnext/js/stock_grid_report.js");
erpnext.StockAgeing = erpnext.StockGridReport.extend({
init: function(wrapper) {
this._super({
- title: frappe._("Stock Ageing"),
+ title: __("Stock Ageing"),
page: wrapper,
parent: $(wrapper).find('.layout-main'),
appframe: wrapper.appframe,
@@ -30,37 +30,37 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
},
setup_columns: function() {
this.columns = [
- {id: "name", name: frappe._("Item"), field: "name", width: 300,
+ {id: "name", name: __("Item"), field: "name", width: 300,
link_formatter: {
open_btn: true,
doctype: '"Item"'
}},
- {id: "item_name", name: frappe._("Item Name"), field: "item_name",
+ {id: "item_name", name: __("Item Name"), field: "item_name",
width: 100, formatter: this.text_formatter},
- {id: "description", name: frappe._("Description"), field: "description",
+ {id: "description", name: __("Description"), field: "description",
width: 200, formatter: this.text_formatter},
- {id: "brand", name: frappe._("Brand"), field: "brand", width: 100},
- {id: "average_age", name: frappe._("Average Age"), field: "average_age",
+ {id: "brand", name: __("Brand"), field: "brand", width: 100},
+ {id: "average_age", name: __("Average Age"), field: "average_age",
formatter: this.currency_formatter},
- {id: "earliest", name: frappe._("Earliest"), field: "earliest",
+ {id: "earliest", name: __("Earliest"), field: "earliest",
formatter: this.currency_formatter},
- {id: "latest", name: frappe._("Latest"), field: "latest",
+ {id: "latest", name: __("Latest"), field: "latest",
formatter: this.currency_formatter},
{id: "stock_uom", name: "UOM", field: "stock_uom", width: 100},
];
},
filters: [
- {fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
+ {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse",
default_value: "Select Warehouse..."},
- {fieldtype:"Select", label: frappe._("Brand"), link:"Brand",
+ {fieldtype:"Select", label: __("Brand"), link:"Brand",
default_value: "Select Brand...", filter: function(val, item, opts) {
return val == opts.default_value || item.brand == val;
}, link_formatter: {filter_input: "brand"}},
- {fieldtype:"Select", label: frappe._("Plot By"),
+ {fieldtype:"Select", label: __("Plot By"),
options: ["Average Age", "Earliest", "Latest"]},
- {fieldtype:"Date", label: frappe._("To Date")},
- {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
- {fieldtype:"Button", label: frappe._("Reset Filters")}
+ {fieldtype:"Date", label: __("To Date")},
+ {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
+ {fieldtype:"Button", label: __("Reset Filters")}
],
setup_filters: function() {
var me = this;
diff --git a/erpnext/stock/page/stock_analytics/stock_analytics.js b/erpnext/stock/page/stock_analytics/stock_analytics.js
index f6f80436a12..963cff0b758 100644
--- a/erpnext/stock/page/stock_analytics/stock_analytics.js
+++ b/erpnext/stock/page/stock_analytics/stock_analytics.js
@@ -5,7 +5,7 @@
frappe.pages['stock-analytics'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
- title: frappe._('Stock Analytics'),
+ title: __('Stock Analytics'),
single_column: true
});
diff --git a/erpnext/stock/page/stock_balance/stock_balance.js b/erpnext/stock/page/stock_balance/stock_balance.js
index c3204a4e03f..52e73f1a916 100644
--- a/erpnext/stock/page/stock_balance/stock_balance.js
+++ b/erpnext/stock/page/stock_balance/stock_balance.js
@@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/stock_analytics.js");
frappe.pages['stock-balance'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
- title: frappe._('Stock Balance'),
+ title: __('Stock Balance'),
single_column: true
});
@@ -20,58 +20,58 @@ frappe.pages['stock-balance'].onload = function(wrapper) {
erpnext.StockBalance = erpnext.StockAnalytics.extend({
init: function(wrapper) {
this._super(wrapper, {
- title: frappe._("Stock Balance"),
+ title: __("Stock Balance"),
doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand",
"Stock Entry", "Project", "Serial No"],
});
},
setup_columns: function() {
this.columns = [
- {id: "name", name: frappe._("Item"), field: "name", width: 300,
+ {id: "name", name: __("Item"), field: "name", width: 300,
formatter: this.tree_formatter},
- {id: "item_name", name: frappe._("Item Name"), field: "item_name", width: 100},
- {id: "description", name: frappe._("Description"), field: "description", width: 200,
+ {id: "item_name", name: __("Item Name"), field: "item_name", width: 100},
+ {id: "description", name: __("Description"), field: "description", width: 200,
formatter: this.text_formatter},
- {id: "brand", name: frappe._("Brand"), field: "brand", width: 100},
- {id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100},
- {id: "opening_qty", name: frappe._("Opening Qty"), field: "opening_qty", width: 100,
+ {id: "brand", name: __("Brand"), field: "brand", width: 100},
+ {id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100},
+ {id: "opening_qty", name: __("Opening Qty"), field: "opening_qty", width: 100,
formatter: this.currency_formatter},
- {id: "inflow_qty", name: frappe._("In Qty"), field: "inflow_qty", width: 100,
+ {id: "inflow_qty", name: __("In Qty"), field: "inflow_qty", width: 100,
formatter: this.currency_formatter},
- {id: "outflow_qty", name: frappe._("Out Qty"), field: "outflow_qty", width: 100,
+ {id: "outflow_qty", name: __("Out Qty"), field: "outflow_qty", width: 100,
formatter: this.currency_formatter},
- {id: "closing_qty", name: frappe._("Closing Qty"), field: "closing_qty", width: 100,
+ {id: "closing_qty", name: __("Closing Qty"), field: "closing_qty", width: 100,
formatter: this.currency_formatter},
- {id: "opening_value", name: frappe._("Opening Value"), field: "opening_value", width: 100,
+ {id: "opening_value", name: __("Opening Value"), field: "opening_value", width: 100,
formatter: this.currency_formatter},
- {id: "inflow_value", name: frappe._("In Value"), field: "inflow_value", width: 100,
+ {id: "inflow_value", name: __("In Value"), field: "inflow_value", width: 100,
formatter: this.currency_formatter},
- {id: "outflow_value", name: frappe._("Out Value"), field: "outflow_value", width: 100,
+ {id: "outflow_value", name: __("Out Value"), field: "outflow_value", width: 100,
formatter: this.currency_formatter},
- {id: "closing_value", name: frappe._("Closing Value"), field: "closing_value", width: 100,
+ {id: "closing_value", name: __("Closing Value"), field: "closing_value", width: 100,
formatter: this.currency_formatter},
];
},
filters: [
- {fieldtype:"Select", label: frappe._("Brand"), link:"Brand",
+ {fieldtype:"Select", label: __("Brand"), link:"Brand",
default_value: "Select Brand...", filter: function(val, item, opts) {
return val == opts.default_value || item.brand == val || item._show;
}, link_formatter: {filter_input: "brand"}},
- {fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
+ {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse",
default_value: "Select Warehouse...", filter: function(val, item, opts, me) {
return me.apply_zero_filter(val, item, opts, me);
}},
- {fieldtype:"Select", label: frappe._("Project"), link:"Project",
+ {fieldtype:"Select", label: __("Project"), link:"Project",
default_value: "Select Project...", filter: function(val, item, opts, me) {
return me.apply_zero_filter(val, item, opts, me);
}, link_formatter: {filter_input: "project"}},
- {fieldtype:"Date", label: frappe._("From Date")},
- {fieldtype:"Label", label: frappe._("To")},
- {fieldtype:"Date", label: frappe._("To Date")},
- {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
- {fieldtype:"Button", label: frappe._("Reset Filters")}
+ {fieldtype:"Date", label: __("From Date")},
+ {fieldtype:"Label", label: __("To")},
+ {fieldtype:"Date", label: __("To Date")},
+ {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
+ {fieldtype:"Button", label: __("Reset Filters")}
],
setup_plot_check: function() {
diff --git a/erpnext/stock/page/stock_ledger/stock_ledger.js b/erpnext/stock/page/stock_ledger/stock_ledger.js
index 107304a05f9..4e31e37de40 100644
--- a/erpnext/stock/page/stock_ledger/stock_ledger.js
+++ b/erpnext/stock/page/stock_ledger/stock_ledger.js
@@ -4,7 +4,7 @@
frappe.pages['stock-ledger'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
- title: frappe._('Stock Ledger'),
+ title: __('Stock Ledger'),
single_column: true
});
@@ -17,7 +17,7 @@ frappe.require("assets/erpnext/js/stock_grid_report.js");
erpnext.StockLedger = erpnext.StockGridReport.extend({
init: function(wrapper) {
this._super({
- title: frappe._("Stock Ledger"),
+ title: __("Stock Ledger"),
page: wrapper,
parent: $(wrapper).find('.layout-main'),
appframe: wrapper.appframe,
@@ -28,29 +28,29 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
setup_columns: function() {
this.hide_balance = (this.is_default("item_code") || this.voucher_no) ? true : false;
this.columns = [
- {id: "posting_datetime", name: frappe._("Posting Date"), field: "posting_datetime", width: 120,
+ {id: "posting_datetime", name: __("Posting Date"), field: "posting_datetime", width: 120,
formatter: this.date_formatter},
- {id: "item_code", name: frappe._("Item Code"), field: "item_code", width: 160,
+ {id: "item_code", name: __("Item Code"), field: "item_code", width: 160,
link_formatter: {
filter_input: "item_code",
open_btn: true,
doctype: '"Item"',
}},
- {id: "description", name: frappe._("Description"), field: "description", width: 200,
+ {id: "description", name: __("Description"), field: "description", width: 200,
formatter: this.text_formatter},
- {id: "warehouse", name: frappe._("Warehouse"), field: "warehouse", width: 100,
+ {id: "warehouse", name: __("Warehouse"), field: "warehouse", width: 100,
link_formatter: {filter_input: "warehouse"}},
- {id: "brand", name: frappe._("Brand"), field: "brand", width: 100},
- {id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100},
- {id: "qty", name: frappe._("Qty"), field: "qty", width: 100,
+ {id: "brand", name: __("Brand"), field: "brand", width: 100},
+ {id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100},
+ {id: "qty", name: __("Qty"), field: "qty", width: 100,
formatter: this.currency_formatter},
- {id: "balance", name: frappe._("Balance Qty"), field: "balance", width: 100,
+ {id: "balance", name: __("Balance Qty"), field: "balance", width: 100,
formatter: this.currency_formatter,
hidden: this.hide_balance},
- {id: "balance_value", name: frappe._("Balance Value"), field: "balance_value", width: 100,
+ {id: "balance_value", name: __("Balance Value"), field: "balance_value", width: 100,
formatter: this.currency_formatter, hidden: this.hide_balance},
- {id: "voucher_type", name: frappe._("Voucher Type"), field: "voucher_type", width: 120},
- {id: "voucher_no", name: frappe._("Voucher No"), field: "voucher_no", width: 160,
+ {id: "voucher_type", name: __("Voucher Type"), field: "voucher_type", width: 120},
+ {id: "voucher_no", name: __("Voucher No"), field: "voucher_no", width: 160,
link_formatter: {
filter_input: "voucher_no",
open_btn: true,
@@ -60,11 +60,11 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
},
filters: [
- {fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
+ {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse",
default_value: "Select Warehouse...", filter: function(val, item, opts) {
return item.warehouse == val || val == opts.default_value;
}},
- {fieldtype:"Link", label: frappe._("Item Code"), link:"Item", default_value: "Select Item...",
+ {fieldtype:"Link", label: __("Item Code"), link:"Item", default_value: "Select Item...",
filter: function(val, item, opts) {
return item.item_code == val || !val;
}},
@@ -72,20 +72,20 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
default_value: "Select Brand...", filter: function(val, item, opts) {
return val == opts.default_value || item.brand == val || item._show;
}, link_formatter: {filter_input: "brand"}},
- {fieldtype:"Data", label: frappe._("Voucher No"),
+ {fieldtype:"Data", label: __("Voucher No"),
filter: function(val, item, opts) {
if(!val) return true;
return (item.voucher_no && item.voucher_no.indexOf(val)!=-1);
}},
- {fieldtype:"Date", label: frappe._("From Date"), filter: function(val, item) {
+ {fieldtype:"Date", label: __("From Date"), filter: function(val, item) {
return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date);
}},
- {fieldtype:"Label", label: frappe._("To")},
- {fieldtype:"Date", label: frappe._("To Date"), filter: function(val, item) {
+ {fieldtype:"Label", label: __("To")},
+ {fieldtype:"Date", label: __("To Date"), filter: function(val, item) {
return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
}},
- {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
- {fieldtype:"Button", label: frappe._("Reset Filters")}
+ {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
+ {fieldtype:"Button", label: __("Reset Filters")}
],
setup_filters: function() {
diff --git a/erpnext/stock/page/stock_level/stock_level.js b/erpnext/stock/page/stock_level/stock_level.js
index 1b84b73e955..b04882f120e 100644
--- a/erpnext/stock/page/stock_level/stock_level.js
+++ b/erpnext/stock/page/stock_level/stock_level.js
@@ -4,7 +4,7 @@
frappe.pages['stock-level'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
- title: frappe._('Stock Level'),
+ title: __('Stock Level'),
single_column: true
});
@@ -22,7 +22,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
var me = this;
this._super({
- title: frappe._("Stock Level"),
+ title: __("Stock Level"),
page: wrapper,
parent: $(wrapper).find('.layout-main'),
appframe: wrapper.appframe,
@@ -37,12 +37,11 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({
Projected Qty = Actual Qty + Planned Qty + Requested Qty \
+ Ordered Qty - Reserved Qty \
\
-
"+frappe._("Actual Qty: Quantity available in the warehouse.") +"
"+
- "
"+frappe._("Planned Qty: Quantity, for which, Production Order has been raised,")+
- frappe._("but is pending to be manufactured.")+ "
" +
- "
"+frappe._("Requested Qty: Quantity requested for purchase, but not ordered.") + "
" +
- "
" + frappe._("Ordered Qty: Quantity ordered for purchase, but not received.")+ "
" +
- "
" + frappe._("Reserved Qty: Quantity ordered for sale, but not delivered.") + "
" +
+
"+__("Actual Qty: Quantity available in the warehouse.") +"
"+
+ "
"+__("Planned Qty: Quantity, for which, Production Order has been raised, but is pending to be manufactured.")+ "
" +
+ "
"+__("Requested Qty: Quantity requested for purchase, but not ordered.") + "
" +
+ "
" + __("Ordered Qty: Quantity ordered for purchase, but not received.")+ "
" +
+ "
" + __("Reserved Qty: Quantity ordered for sale, but not delivered.") + "
" +
- frappe._("Upload a .csv file with two columns: the old name and the new name. Max 500 rows.")
+ __("Upload a .csv file with two columns: the old name and the new name. Max 500 rows.")
+ "