diff --git a/accounts/doctype/account/account.js b/accounts/doctype/account/account.js index 9ccb16b1d9..67a46cda15 100644 --- a/accounts/doctype/account/account.js +++ b/accounts/doctype/account/account.js @@ -11,7 +11,7 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { // ----------------------------------------- cur_frm.cscript.refresh = function(doc, cdt, cdn) { if(doc.__islocal) { - msgprint("Please create new account from Chart of Accounts."); + msgprint(wn._("Please create new account from Chart of Accounts.")); throw "cannot create"; } @@ -38,7 +38,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { // read-only for root accounts if(!doc.parent_account) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root account and cannot be edited."); + cur_frm.set_intro(wn._("This is a root account and cannot be edited.")); } else { // credit days and type if customer or supplier cur_frm.set_intro(null); @@ -81,17 +81,17 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) { // Hide/unhide group or ledger // ----------------------------------------- cur_frm.cscript.add_toolbar_buttons = function(doc) { - cur_frm.add_custom_button('Chart of Accounts', + cur_frm.add_custom_button(wn._('Chart of Accounts'), function() { wn.set_route("Accounts Browser", "Account"); }, 'icon-sitemap') if (cstr(doc.group_or_ledger) == 'Group') { - cur_frm.add_custom_button('Convert to Ledger', + cur_frm.add_custom_button(wn._('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('Convert to Group', + cur_frm.add_custom_button(wn._('Convert to Group'), function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet') - cur_frm.add_custom_button('View Ledger', function() { + cur_frm.add_custom_button(wn._('View Ledger'), function() { wn.route_options = { "account": doc.name, "from_date": sys_defaults.year_start_date, diff --git a/accounts/doctype/cost_center/cost_center.js b/accounts/doctype/cost_center/cost_center.js index c3519bfc6c..9995b6b1b5 100644 --- a/accounts/doctype/cost_center/cost_center.js +++ b/accounts/doctype/cost_center/cost_center.js @@ -41,8 +41,8 @@ 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 += '

Note: This Cost Center is a Group, \ - Accounting Entries are not allowed against groups.

'; + intro_txt += '

'+wn._('Note:')+''+ wn._('This Cost Center is a')+ ''+wn._('Group')+', '+ + wn._('Accounting Entries are not allowed against groups.')+'

'; } cur_frm.cscript.hide_unhide_group_ledger(doc); @@ -50,22 +50,22 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger') cur_frm.set_intro(intro_txt); - cur_frm.add_custom_button('Chart of Cost Centers', + cur_frm.add_custom_button(wn._('Chart of Cost Centers'), function() { wn.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap') } cur_frm.cscript.parent_cost_center = function(doc,cdt,cdn){ if(!doc.company){ - alert('Please enter company name first'); + alert(wn._('Please enter company name first')); } } cur_frm.cscript.hide_unhide_group_ledger = function(doc) { if (cstr(doc.group_or_ledger) == 'Group') { - cur_frm.add_custom_button('Convert to Ledger', + cur_frm.add_custom_button(wn._('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('Convert to Group', + cur_frm.add_custom_button(wn._('Convert to Group'), function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet') } } diff --git a/accounts/doctype/fiscal_year/fiscal_year.js b/accounts/doctype/fiscal_year/fiscal_year.js index c5500aa1f3..ba63520e29 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.js +++ b/accounts/doctype/fiscal_year/fiscal_year.js @@ -5,8 +5,8 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { cur_frm.toggle_enable('year_start_date', doc.__islocal) if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) { - cur_frm.add_custom_button("Set as Default", cur_frm.cscript.set_as_default); - cur_frm.set_intro("To set this Fiscal Year as Deafult, click on 'Set as Default'"); + cur_frm.add_custom_button(wn._("Set as Default"), cur_frm.cscript.set_as_default); + cur_frm.set_intro(wn._("To set this Fiscal Year as Deafult, click on 'Set as Default'")); } else cur_frm.set_intro(""); } diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js index 95adc8ecac..15fad3f9f3 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.js +++ b/accounts/doctype/journal_voucher/journal_voucher.js @@ -115,7 +115,7 @@ cur_frm.cscript.refresh = function(doc) { erpnext.hide_naming_series(); cur_frm.cscript.voucher_type(doc); if(doc.docstatus==1) { - cur_frm.add_custom_button('View Ledger', function() { + cur_frm.add_custom_button(wn._('View Ledger'), function() { wn.route_options = { "voucher_no": doc.name, "from_date": doc.posting_date, @@ -185,7 +185,7 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){ cur_frm.pformat.print_heading = doc.select_print_heading; } else - cur_frm.pformat.print_heading = "Journal Voucher"; + cur_frm.pformat.print_heading = wn._("Journal Voucher"); } cur_frm.cscript.voucher_type = function(doc, cdt, cdn) { diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js index a48520cbd5..980d6e7d3c 100644 --- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js +++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js @@ -13,15 +13,15 @@ cur_frm.cscript.onload_post_render = function(doc) { cur_frm.cscript.refresh = function(doc) { cur_frm.set_intro(""); if(!doc.voucher_no) { - cur_frm.set_intro("Select the Invoice against which you want to allocate payments."); + cur_frm.set_intro(wn._("Select the Invoice against which you want to allocate payments.")); } else { - cur_frm.set_intro("Set allocated amount against each Payment Entry and click 'Allocate'."); + cur_frm.set_intro(wn._("Set allocated amount against each Payment Entry and click 'Allocate'.")); } } cur_frm.fields_dict.voucher_no.get_query = function(doc) { // TO-do: check for pos, it should not come - if (!doc.account) msgprint("Please select Account first"); + if (!doc.account) msgprint(wn._("Please select Account first")); else { return { doctype: doc.voucher_type, diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.js b/accounts/doctype/purchase_invoice/purchase_invoice.js index fb5569a5f0..ed75934f14 100644 --- a/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -27,10 +27,10 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ // Show / Hide button if(doc.docstatus==1 && doc.outstanding_amount > 0) - this.frm.add_custom_button('Make Payment Entry', this.make_bank_voucher); + this.frm.add_custom_button(wn._('Make Payment Entry'), this.make_bank_voucher); if(doc.docstatus==1) { - cur_frm.add_custom_button('View Ledger', function() { + cur_frm.add_custom_button(wn._('View Ledger'), function() { wn.route_options = { "voucher_no": doc.name, "from_date": doc.posting_date, @@ -214,5 +214,5 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){ cur_frm.pformat.print_heading = doc.select_print_heading; } else - cur_frm.pformat.print_heading = "Purchase Invoice"; + cur_frm.pformat.print_heading = wn._("Purchase Invoice"); } \ No newline at end of file diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js index 3368773601..294923c14f 100644 --- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js +++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js @@ -62,12 +62,12 @@ cur_frm.pformat.purchase_tax_details= function(doc){ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.category && d.add_deduct_tax){ - alert("Please select Category first"); + alert(wn._("Please select Category first")); d.add_deduct_tax = ''; } else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') { console.log([d.category, d.add_deduct_tax]); - msgprint("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"); + msgprint(wn._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'")); d.add_deduct_tax = ''; } @@ -76,15 +76,15 @@ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) { cur_frm.cscript.charge_type = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.category && d.charge_type){ - alert("Please select Category first"); + alert(wn._("Please select Category first")); d.charge_type = ''; } else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){ - alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"); + alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); d.charge_type = ''; } else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){ - alert("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total") + alert(wn._("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total")) d.charge_type = ''; } validated = false; @@ -99,16 +99,16 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) { cur_frm.cscript.row_id = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.row_id){ - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.row_id = ''; } else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) { - alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"); + alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'")); d.row_id = ''; } else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){ if(d.row_id >= d.idx){ - alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"); + alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); d.row_id = ''; } } @@ -136,10 +136,27 @@ cur_frm.fields_dict['purchase_tax_details'].grid.get_field("cost_center").get_qu } } +<<<<<<< HEAD +cur_frm.cscript.account_head = function(doc, cdt, cdn) { + var d = locals[cdt][cdn]; + if(!d.charge_type && d.account_head){ + alert(wn._("Please select Charge Type first")); + validated = false; + d.account_head = ''; + } + else if(d.account_head && d.charge_type) { + arg = "{'charge_type' : '" + d.charge_type + "', 'account_head' : '" + d.account_head + "'}"; + return get_server_fields('get_rate', arg, 'purchase_tax_details', doc, cdt, cdn, 1); + } + refresh_field('account_head',d.name,'purchase_tax_details'); +} + +======= +>>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.rate) { - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.rate = ''; } validated = false; @@ -149,11 +166,11 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) { cur_frm.cscript.tax_amount = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.tax_amount){ - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.tax_amount = ''; } else if(d.charge_type && d.tax_amount) { - alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"); + alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); d.tax_amount = ''; } validated = false; diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js index 19d27165a0..9afa33d3c8 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.js +++ b/accounts/doctype/sales_invoice/sales_invoice.js @@ -61,7 +61,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100); cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid); - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); if(cint(doc.update_stock)!=1) { // show Make Delivery Note button only if Sales Invoice is not created from Delivery Note @@ -72,11 +72,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte }); if(!from_delivery_note) - cur_frm.add_custom_button('Make Delivery', cur_frm.cscript['Make Delivery Note']); + cur_frm.add_custom_button(wn._('Make Delivery'), cur_frm.cscript['Make Delivery Note']); } if(doc.outstanding_amount!=0) - cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript.make_bank_voucher); + cur_frm.add_custom_button(wn._('Make Payment Entry'), cur_frm.cscript.make_bank_voucher); } // Show buttons only when pos view is active diff --git a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js index d8f55fdd50..0e623a1dc7 100644 --- a/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js +++ b/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js @@ -95,7 +95,7 @@ cur_frm.pformat.other_charges= function(doc){ cur_frm.cscript.charge_type = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')){ - alert("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"); + alert(wn._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); d.charge_type = ''; } validated = false; @@ -108,16 +108,16 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) { cur_frm.cscript.row_id = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.row_id){ - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.row_id = ''; } else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) { - alert("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"); + alert(wn._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'")); d.row_id = ''; } else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id){ if(d.row_id >= d.idx){ - alert("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"); + alert(wn._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); d.row_id = ''; } } @@ -145,10 +145,28 @@ cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = f } } +<<<<<<< HEAD + +cur_frm.cscript.account_head = function(doc, cdt, cdn) { + var d = locals[cdt][cdn]; + if(!d.charge_type && d.account_head){ + alert(wn._("Please select Charge Type first")); + validated = false; + d.account_head = ''; + } + else if(d.account_head && d.charge_type) { + arg = "{'charge_type' : '" + d.charge_type +"', 'account_head' : '" + d.account_head + "'}"; + return get_server_fields('get_rate', arg, 'other_charges', doc, cdt, cdn, 1); + } + refresh_field('account_head',d.name,'other_charges'); +} + +======= +>>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.rate) { - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.rate = ''; } validated = false; @@ -158,11 +176,11 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) { cur_frm.cscript.tax_amount = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.tax_amount){ - alert("Please select Charge Type first"); + alert(wn._("Please select Charge Type first")); d.tax_amount = ''; } else if(d.charge_type && d.tax_amount) { - alert("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"); + alert(wn._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); d.tax_amount = ''; } validated = false; diff --git a/accounts/page/accounts_browser/accounts_browser.js b/accounts/page/accounts_browser/accounts_browser.js index 6b577959a1..fafe816cd9 100644 --- a/accounts/page/accounts_browser/accounts_browser.js +++ b/accounts/page/accounts_browser/accounts_browser.js @@ -20,29 +20,31 @@ pscript['onload_Accounts Browser'] = function(wrapper){ chart_area = $("
") .css({"margin-bottom": "15px"}) .appendTo(main), - help_area = $('
\ -

Quick Help

\ -
    \ -
  1. To add child nodes, explore tree and click on the node under which you \ - want to add more nodes.\ -
  2. Accounting Entries can be made against leaf nodes, called Ledgers.\ - Entries against Groups are not allowed.\ -
  3. Please do NOT create Account (Ledgers) for Customers and Suppliers. \ - They are created directly from the Customer / Supplier masters.\ -
  4. To create a Bank Account: Go to the appropriate group \ - (usually Application of Funds > Current Assets > Bank Accounts)\ - and create a new Account Ledger (by clicking on Add Child) of \ - type "Bank or Cash"\ -
  5. To create a Tax Account: Go to the appropriate group \ - (usually Source of Funds > Current Liabilities > Taxes and Duties) \ - and create a new Account Ledger (by clicking on Add Child) of type\ - "Tax" and do mention the Tax rate.\ -
\ -

Please setup your chart of accounts before you start Accounting Entries

\ -
').appendTo(main); + help_area = $('
'+ + '

'+wn._('Quick Help')+'

'+ + '
    '+ + '
  1. '+wn._('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'
  2. '+ + '
  3. '+ + wn._('Accounting Entries can be made against leaf nodes, called')+ + '' +wn._('Ledgers')+'.'+ wn._('Entries against') + + '' +wn._('Groups') + ''+ wn._('are not allowed.')+ + '
  4. '+ + '
  5. '+wn._('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'
  6. '+ + '
  7. '+ + ''+wn._('To create a Bank Account:')+''+ + wn._('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+ + wn._('and create a new Account Ledger (by clicking on Add Child) of type "Bank or Cash"')+ + '
  8. '+ + '
  9. '+ + ''+wn._('To create a Tax Account:')+''+ + wn._('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+ + wn._('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+ + '
  10. '+ + '
'+ + '

'+wn._('Please setup your chart of accounts before you start Accounting Entries')+'

').appendTo(main); if (wn.boot.profile.can_create.indexOf("Company") !== -1) { - wrapper.appframe.add_button('New Company', function() { newdoc('Company'); }, + wrapper.appframe.add_button(wn._('New Company'), function() { newdoc('Company'); }, 'icon-plus'); } @@ -145,20 +147,20 @@ erpnext.AccountsChart = Class.extend({ var node_links = []; // edit if (wn.model.can_read(this.ctype) !== -1) { - node_links.push('Edit'); + node_links.push(''+wn._('Edit')+''); } if (data.expandable && wn.boot.profile.in_create.indexOf(this.ctype) !== -1) { - node_links.push('Add Child'); + node_links.push(''+wn._('Add Child')+''); } else if (this.ctype === 'Account' && wn.boot.profile.can_read.indexOf("GL Entry") !== -1) { - node_links.push('View Ledger'); + node_links.push(''+wn._('View Ledger')+''); } if (this.can_write) { - node_links.push('Rename'); + node_links.push(''+wn._('Rename')+''); }; if (this.can_delete) { - node_links.push('Delete'); + node_links.push(''+wn._('Delete')+''); }; link.toolbar.append(node_links.join(" | ")); @@ -204,20 +206,20 @@ erpnext.AccountsChart = Class.extend({ // the dialog var d = new wn.ui.Dialog({ - title:'New Account', + title:wn._('New Account'), fields: [ - {fieldtype:'Data', fieldname:'account_name', label:'New Account Name', reqd:true, - description: "Name of new Account. Note: Please don't create accounts for Customers and Suppliers, \ - they are created automatically from the Customer and Supplier master"}, - {fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger', - options:'Group\nLedger', description:'Further accounts can be made under Groups,\ - but entries can be made against Ledger'}, - {fieldtype:'Select', fieldname:'account_type', label:'Account Type', + {fieldtype:'Data', fieldname:'account_name', label:wn._('New Account Name'), reqd:true, + description: wn._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+ + wn._("they are created automatically from the Customer and Supplier master")}, + {fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'), + options:'Group\nLedger', description: wn._('Further accounts can be made under Groups,')+ + wn._('but entries can be made against Ledger')}, + {fieldtype:'Select', fieldname:'account_type', label:wn._('Account Type'), options: ['', 'Fixed Asset Account', 'Bank or Cash', 'Expense Account', 'Tax', 'Income Account', 'Chargeable'].join('\n'), - description: "Optional. This setting will be used to filter in various transactions." }, - {fieldtype:'Float', fieldname:'tax_rate', label:'Tax Rate'}, - {fieldtype:'Button', fieldname:'create_new', label:'Create New' } + description: wn._("Optional. This setting will be used to filter in various transactions.") }, + {fieldtype:'Float', fieldname:'tax_rate', label:wn._('Tax Rate')}, + {fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') } ] }) @@ -282,13 +284,13 @@ erpnext.AccountsChart = Class.extend({ var me = this; // the dialog var d = new wn.ui.Dialog({ - title:'New Cost Center', + title:wn._('New Cost Center'), fields: [ - {fieldtype:'Data', fieldname:'cost_center_name', label:'New Cost Center Name', reqd:true}, - {fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger', - options:'Group\nLedger', description:'Further accounts can be made under Groups,\ - but entries can be made against Ledger'}, - {fieldtype:'Button', fieldname:'create_new', label:'Create New' } + {fieldtype:'Data', fieldname:'cost_center_name', label:wn._('New Cost Center Name'), reqd:true}, + {fieldtype:'Select', fieldname:'group_or_ledger', label:wn._('Group or Ledger'), + options:'Group\nLedger', description:wn._('Further accounts can be made under Groups,')+ + wn._('but entries can be made against Ledger')}, + {fieldtype:'Button', fieldname:'create_new', label:wn._('Create New') } ] }); diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js index d6c388335f..7a4f511a8b 100644 --- a/accounts/page/accounts_home/accounts_home.js +++ b/accounts/page/accounts_home/accounts_home.js @@ -88,12 +88,12 @@ wn.module_page["Accounts"] = [ { "label": wn._("Period Closing Voucher"), "doctype": "Period Closing Voucher", - description: "Close Balance Sheet and book Profit or Loss." + description: wn._("Close Balance Sheet and book Profit or Loss.") }, { "page":"voucher-import-tool", "label": wn._("Voucher Import Tool"), - "description": "Import accounting entries from CSV." + "description": wn._("Import accounting entries from CSV.") }, ] }, @@ -105,7 +105,7 @@ wn.module_page["Accounts"] = [ "label": wn._("Accounts Settings"), "route": "Form/Accounts Settings", "doctype":"Accounts Settings", - "description": "Settings for Accounts" + "description": wn._("Settings for Accounts") }, { "label": wn._("Sales Taxes and Charges Master"), @@ -130,7 +130,7 @@ wn.module_page["Accounts"] = [ { "label": wn._("Point-of-Sale Setting"), "doctype":"POS Setting", - "description": "User settings for Point-of-sale (POS)" + "description": wn._("User settings for Point-of-sale (POS)") }, { "doctype":"Budget Distribution", @@ -150,7 +150,7 @@ wn.module_page["Accounts"] = [ { "doctype":"C-Form", "label": wn._("C-Form"), - description: "C-Form records", + description: wn._("C-Form records"), country: "India" } ] diff --git a/accounts/page/financial_analytics/financial_analytics.js b/accounts/page/financial_analytics/financial_analytics.js index 13b9067760..ffe29ac1a2 100644 --- a/accounts/page/financial_analytics/financial_analytics.js +++ b/accounts/page/financial_analytics/financial_analytics.js @@ -6,7 +6,7 @@ wn.require("app/js/account_tree_grid.js"); wn.pages['financial-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Financial Analytics', + title: wn._('Financial Analytics'), single_column: true }); erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics'); @@ -18,7 +18,7 @@ wn.pages['financial-analytics'].onload = function(wrapper) { erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({ filters: [ - {fieldtype:"Select", label: "PL or BS", options:["Profit and Loss", "Balance Sheet"], + {fieldtype:"Select", label: wn._("PL or BS"), options:["Profit and Loss", "Balance Sheet"], filter: function(val, item, opts, me) { if(item._show) return true; @@ -28,27 +28,27 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({ return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Company", link:"Company", default_value: "Select Company...", + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company...", filter: function(val, item, opts) { return item.company == val || val == opts.default_value || item._show; }}, - {fieldtype:"Select", label: "Fiscal Year", link:"Fiscal Year", + {fieldtype:"Select", label: wn._("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_columns: function() { var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "name", name: "Account", field: "name", width: 300, + {id: "name", name: wn._("Account"), field: "name", width: 300, formatter: this.tree_formatter}, - {id: "opening", name: "Opening", field: "opening", hidden: true, + {id: "opening", name: wn._("Opening"), field: "opening", hidden: true, formatter: this.currency_formatter} ]; diff --git a/accounts/page/financial_statements/financial_statements.js b/accounts/page/financial_statements/financial_statements.js index 48931250f2..6a11683070 100644 --- a/accounts/page/financial_statements/financial_statements.js +++ b/accounts/page/financial_statements/financial_statements.js @@ -6,7 +6,7 @@ erpnext.fs = {} pscript['onload_Financial Statements'] = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - "title": "Financial Statements", + "title": wn._("Financial Statements"), "single_column": true, }); @@ -34,18 +34,18 @@ pscript['onload_Financial Statements'] = function(wrapper) { options: ['Loading...'] }) - wrapper.appframe.add_button("Create", function() { + wrapper.appframe.add_button(wn._("Create"), function() { pscript.stmt_new(); }, "icon-refresh") - wrapper.appframe.add_button("Print", function() { + wrapper.appframe.add_button(wn._("Print"), function() { _p.go($i('print_html').innerHTML); }, "icon-print") $(wrapper).find(".layout-main").html('').css({"min-height": "400px"}); // load companies @@ -61,7 +61,7 @@ pscript['onload_Financial Statements'] = function(wrapper) { pscript.stmt_new = function(stmt,company_name,level,period,year) { - $i('stmt_tree').innerHTML = 'Refreshing....'; + $i('stmt_tree').innerHTML = wn._('Refreshing....'); $i('stmt_tree').style.display = 'block'; var company =erpnext.fs.stmt_company.get_value(); diff --git a/accounts/page/general_ledger/general_ledger.js b/accounts/page/general_ledger/general_ledger.js index da28eb3e0a..93a23889bf 100644 --- a/accounts/page/general_ledger/general_ledger.js +++ b/accounts/page/general_ledger/general_ledger.js @@ -4,7 +4,7 @@ wn.pages['general-ledger'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'General Ledger', + title: wn._('General Ledger'), single_column: true }); @@ -16,7 +16,7 @@ wn.pages['general-ledger'].onload = function(wrapper) { erpnext.GeneralLedger = wn.views.GridReport.extend({ init: function(wrapper) { this._super({ - title: "General Ledger", + title: wn._("General Ledger"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -24,41 +24,42 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ }); }, setup_columns: function() { + var DEFAULT_COMPANY_VALUE = wn._("Select Company..."); this.columns = [ - {id: "posting_date", name: "Posting Date", field: "posting_date", width: 100, + {id: "posting_date", name: wn._("Posting Date"), field: "posting_date", width: 100, formatter: this.date_formatter}, - {id: "account", name: "Account", field: "account", width: 240, + {id: "account", name: wn._("Account"), field: "account", width: 240, link_formatter: { filter_input: "account", open_btn: true, doctype: "'Account'" }}, - {id: "against_account", name: "Against Account", field: "against_account", + {id: "against_account", name: wn._("Against Account"), field: "against_account", width: 240, hidden: !this.account}, - {id: "debit", name: "Debit", field: "debit", width: 100, + {id: "debit", name: wn._("Debit"), field: "debit", width: 100, formatter: this.currency_formatter}, - {id: "credit", name: "Credit", field: "credit", width: 100, + {id: "credit", name: wn._("Credit"), field: "credit", width: 100, formatter: this.currency_formatter}, - {id: "voucher_type", name: "Voucher Type", field: "voucher_type", width: 120}, - {id: "voucher_no", name: "Voucher No", field: "voucher_no", width: 160, + {id: "voucher_type", name: wn._("Voucher Type"), field: "voucher_type", width: 120}, + {id: "voucher_no", name: wn._("Voucher No"), field: "voucher_no", width: 160, link_formatter: { filter_input: "voucher_no", open_btn: true, doctype: "dataContext.voucher_type" }}, - {id: "remarks", name: "Remarks", field: "remarks", width: 200, + {id: "remarks", name: wn._("Remarks"), field: "remarks", width: 200, formatter: this.text_formatter}, ]; }, filters: [ - {fieldtype:"Select", label: "Company", link:"Company", default_value: "Select Company...", + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: DEFAULT_COMPANY_VALUE, filter: function(val, item, opts) { - return item.company == val || val == opts.default_value; + return item.company == val || val == DEFAULT_COMPANY_VALUE; }}, - {fieldtype:"Link", label: "Account", link:"Account", + {fieldtype:"Link", label: wn._("Account"), link:"Account", filter: function(val, item, opts, me) { if(!val) { return true; @@ -68,22 +69,22 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ return me.is_child_account(val, item.account); } }}, - {fieldtype:"Data", label: "Voucher No", + {fieldtype:"Data", label: wn._("Voucher No"), filter: function(val, item, opts) { if(!val) return true; return (item.voucher_no && item.voucher_no.indexOf(val)!=-1); }}, - {fieldtype:"Date", label: "From Date", filter: function(val, item) { + {fieldtype:"Date", label: wn._("From Date"), filter: function(val, item) { return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date", filter: function(val, item) { + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) { return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype: "Check", label: "Group by Ledger"}, - {fieldtype: "Check", label: "Group by Voucher"}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype: "Check", label: wn._("Group by Ledger")}, + {fieldtype: "Check", label: wn._("Group by Voucher")}, + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { this._super(); @@ -160,7 +161,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ var to_date = dateutil.str_to_obj(this.to_date); if(to_date < from_date) { - msgprint("From Date must be before To Date"); + msgprint(wn._("From Date must be before To Date")); return; } @@ -236,7 +237,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ closing.credit = opening.credit + totals.credit; if(me.account) { - me.appframe.set_title("General Ledger: " + me.account); + me.appframe.set_title(wn._("General Ledger: ") + me.account); // group by ledgers if(this.account_by_name[this.account].group_or_ledger==="Group" @@ -254,7 +255,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({ out = [opening].concat(out).concat([totals, closing]); } else { - me.appframe.set_title("General Ledger"); + me.appframe.set_title(wn._("General Ledger")); out = out.concat([totals]); } diff --git a/accounts/page/trial_balance/trial_balance.js b/accounts/page/trial_balance/trial_balance.js index 65212562cb..ec14c51e88 100644 --- a/accounts/page/trial_balance/trial_balance.js +++ b/accounts/page/trial_balance/trial_balance.js @@ -6,7 +6,7 @@ wn.require("app/js/account_tree_grid.js"); wn.pages['trial-balance'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Trial Balance', + title: wn._('Trial Balance'), single_column: true }); var TrialBalance = erpnext.AccountTreeGrid.extend({ @@ -17,8 +17,8 @@ wn.pages['trial-balance'].onload = function(wrapper) { // period closing entry checkbox this.wrapper.bind("make", function() { $('
\ - With period closing entry
') + class="with_period_closing_entry">' + + wn._("With period closing entry") + '
') .appendTo(me.wrapper) .find("input").click(function() { me.refresh(); }); }); diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.js b/accounts/page/voucher_import_tool/voucher_import_tool.js index 5a8538e4dc..67d4aec139 100644 --- a/accounts/page/voucher_import_tool/voucher_import_tool.js +++ b/accounts/page/voucher_import_tool/voucher_import_tool.js @@ -4,29 +4,34 @@ wn.pages['voucher-import-tool'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Voucher Import Tool', + title: wn._('Voucher Import Tool'), single_column: true }); - $(wrapper).find('.layout-main').html('\ -

Import multiple accounting entries via CSV (spreadsheet) file:

\ -

1. Download Template


\ -
\ - \ -

Import multiple vouchers with one debit and one credit entry

\ -
\ -
\ - \ -

Import multiple vouchers with multiple accounts

\ -
\ -
\ -

2. Upload


\ -
\ -

Upload file in CSV format with UTF-8 encoding

\ -
\ -

\ -
\ - '); + $(wrapper).find('.layout-main').html('

' + + wn._('Import multiple accounting entries via CSV (spreadsheet) file:') + + '

1. ' + wn._('Download Template') + '


' + + '
' + + '' + + '

' + + wn._('Import multiple vouchers with one debit and one credit entry') + + '

'+ + '
'+ + '

' + + wn._('Import multiple vouchers with multiple accounts')+ + '

'+ + '
'+ + '
'+ + '

2. ' + wn._('Upload') + '


'+ + '
'+ + '

' + wn._('Upload file in CSV format with UTF-8 encoding') + + '

'+ + '

'+ + '
'+ + ''); wn.upload.make({ parent: $(wrapper).find("#voucher-upload"), diff --git a/accounts/report/accounts_payable/accounts_payable.js b/accounts/report/accounts_payable/accounts_payable.js index 2c6c918e57..86516fc550 100644 --- a/accounts/report/accounts_payable/accounts_payable.js +++ b/accounts/report/accounts_payable/accounts_payable.js @@ -5,14 +5,14 @@ wn.query_reports["Accounts Payable"] = { "filters": [ { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -30,13 +30,13 @@ wn.query_reports["Accounts Payable"] = { }, { "fieldname":"report_date", - "label": "Date", + "label": wn._("Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"ageing_based_on", - "label": "Ageing Based On", + "label": wn._("Ageing Based On"), "fieldtype": "Select", "options": 'Posting Date' + NEWLINE + 'Due Date', "default": "Posting Date" diff --git a/accounts/report/accounts_receivable/accounts_receivable.js b/accounts/report/accounts_receivable/accounts_receivable.js index 5f0b1901c3..65588a661b 100644 --- a/accounts/report/accounts_receivable/accounts_receivable.js +++ b/accounts/report/accounts_receivable/accounts_receivable.js @@ -5,14 +5,14 @@ wn.query_reports["Accounts Receivable"] = { "filters": [ { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -30,13 +30,13 @@ wn.query_reports["Accounts Receivable"] = { }, { "fieldname":"report_date", - "label": "Date", + "label": wn._("Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"ageing_based_on", - "label": "Ageing Based On", + "label": wn._("Ageing Based On"), "fieldtype": "Select", "options": 'Posting Date' + NEWLINE + 'Due Date', "default": "Posting Date" diff --git a/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/accounts/report/bank_clearance_summary/bank_clearance_summary.js index 8e6d0c04fe..fbc973a052 100644 --- a/accounts/report/bank_clearance_summary/bank_clearance_summary.js +++ b/accounts/report/bank_clearance_summary/bank_clearance_summary.js @@ -5,20 +5,20 @@ wn.query_reports["Bank Clearance Summary"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Bank Account", + "label": wn._("Bank Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { diff --git a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js index bf971a7f97..420e087018 100644 --- a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js +++ b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js @@ -5,7 +5,7 @@ wn.query_reports["Bank Reconciliation Statement"] = { "filters": [ { "fieldname":"account", - "label": "Bank Account", + "label": wn._("Bank Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -20,7 +20,7 @@ wn.query_reports["Bank Reconciliation Statement"] = { }, { "fieldname":"report_date", - "label": "Date", + "label": wn._("Date"), "fieldtype": "Date", "default": get_today() }, diff --git a/accounts/report/budget_variance_report/budget_variance_report.js b/accounts/report/budget_variance_report/budget_variance_report.js index 2ed6018268..908963fe14 100644 --- a/accounts/report/budget_variance_report/budget_variance_report.js +++ b/accounts/report/budget_variance_report/budget_variance_report.js @@ -5,21 +5,21 @@ wn.query_reports["Budget Variance Report"] = { "filters": [ { fieldname: "fiscal_year", - label: "Fiscal Year", + label: wn._("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: "Period", + label: wn._("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "company", - label: "Company", + label: wn._("Company"), fieldtype: "Link", options: "Company", default: wn.defaults.get_default("company") diff --git a/accounts/report/gross_profit/gross_profit.js b/accounts/report/gross_profit/gross_profit.js index aea0b8a4e4..ee95f72974 100644 --- a/accounts/report/gross_profit/gross_profit.js +++ b/accounts/report/gross_profit/gross_profit.js @@ -5,20 +5,20 @@ wn.query_reports["Gross Profit"] = { "filters": [ { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_user_default("company") }, { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date") }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_end_date") }, diff --git a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js index 457c9a8000..19970b7df1 100644 --- a/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js +++ b/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js @@ -5,26 +5,26 @@ wn.query_reports["Item-wise Purchase Register"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname": "item_code", - "label": "Item", + "label": wn._("Item"), "fieldtype": "Link", "options": "Item", }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -42,7 +42,7 @@ wn.query_reports["Item-wise Purchase Register"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/report/item_wise_sales_register/item_wise_sales_register.js b/accounts/report/item_wise_sales_register/item_wise_sales_register.js index c131fbde64..068c33dc6e 100644 --- a/accounts/report/item_wise_sales_register/item_wise_sales_register.js +++ b/accounts/report/item_wise_sales_register/item_wise_sales_register.js @@ -5,20 +5,20 @@ wn.query_reports["Item-wise Sales Register"] = wn.query_reports["Sales Register" "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -36,7 +36,7 @@ wn.query_reports["Item-wise Sales Register"] = wn.query_reports["Sales Register" }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js index 8d8c746467..e619a43d0f 100644 --- a/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js +++ b/accounts/report/payment_collection_with_ageing/payment_collection_with_ageing.js @@ -5,20 +5,20 @@ wn.query_reports["Payment Collection With Ageing"] = { "filters": [ { "fieldname": "from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Customer Account", + "label": wn._("Customer Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -36,7 +36,7 @@ wn.query_reports["Payment Collection With Ageing"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js index 7b80bdeaed..101df80a8c 100644 --- a/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js +++ b/accounts/report/payment_made_with_ageing/payment_made_with_ageing.js @@ -5,19 +5,19 @@ wn.query_reports["Payment Made With Ageing"] = { "filters": [ { fieldname: "from_date", - label: "From Date", + label: wn._("From Date"), fieldtype: "Date", default: wn.defaults.get_user_default("year_start_date"), }, { fieldname:"to_date", - label: "To Date", + label: wn._("To Date"), fieldtype: "Date", default: get_today() }, { fieldname:"account", - label: "Supplier Account", + label: wn._("Supplier Account"), fieldtype: "Link", options: "Account", get_query: function() { @@ -34,7 +34,7 @@ wn.query_reports["Payment Made With Ageing"] = { }, { fieldname:"company", - label: "Company", + label: wn._("Company"), fieldtype: "Link", options: "Company", default: wn.defaults.get_default("company") diff --git a/accounts/report/purchase_register/purchase_register.js b/accounts/report/purchase_register/purchase_register.js index 5944b1a059..0bd713fd08 100644 --- a/accounts/report/purchase_register/purchase_register.js +++ b/accounts/report/purchase_register/purchase_register.js @@ -5,20 +5,20 @@ wn.query_reports["Purchase Register"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -36,7 +36,7 @@ wn.query_reports["Purchase Register"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/accounts/report/sales_register/sales_register.js b/accounts/report/sales_register/sales_register.js index 43c841f132..ab3fcd7a35 100644 --- a/accounts/report/sales_register/sales_register.js +++ b/accounts/report/sales_register/sales_register.js @@ -5,20 +5,20 @@ wn.query_reports["Sales Register"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.defaults.get_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": "Account", + "label": wn._("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -36,7 +36,7 @@ wn.query_reports["Sales Register"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/buying/doctype/purchase_order/purchase_order.js b/buying/doctype/purchase_order/purchase_order.js index f32f11a2a6..c1342232bb 100644 --- a/buying/doctype/purchase_order/purchase_order.js +++ b/buying/doctype/purchase_order/purchase_order.js @@ -24,19 +24,19 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( doc.per_billed); - cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript['Send SMS']); if(flt(doc.per_received, 2) < 100) - cur_frm.add_custom_button('Make Purchase Receipt', this.make_purchase_receipt); + cur_frm.add_custom_button(wn._('Make Purchase Receipt'), this.make_purchase_receipt); if(flt(doc.per_billed, 2) < 100) - cur_frm.add_custom_button('Make Invoice', this.make_purchase_invoice); + cur_frm.add_custom_button(wn._('Make Invoice'), this.make_purchase_invoice); if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) - cur_frm.add_custom_button('Stop', cur_frm.cscript['Stop Purchase Order']); + cur_frm.add_custom_button(wn._('Stop'), cur_frm.cscript['Stop Purchase Order']); } else if(doc.docstatus===0) { cur_frm.cscript.add_from_mappers(); } if(doc.docstatus == 1 && doc.status == 'Stopped') - cur_frm.add_custom_button('Unstop Purchase Order', + cur_frm.add_custom_button(wn._('Unstop Purchase Order'), cur_frm.cscript['Unstop Purchase Order']); }, @@ -137,7 +137,7 @@ cur_frm.cscript.get_last_purchase_rate = function(doc, cdt, cdn){ cur_frm.cscript['Stop Purchase Order'] = function() { var doc = cur_frm.doc; - var check = confirm("Do you really want to STOP " + doc.name); + var check = confirm(wn._("Do you really want to STOP ") + doc.name); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { @@ -148,7 +148,7 @@ cur_frm.cscript['Stop Purchase Order'] = function() { cur_frm.cscript['Unstop Purchase Order'] = function() { var doc = cur_frm.doc; - var check = confirm("Do you really want to UNSTOP " + doc.name); + var check = confirm(wn._("Do you really want to UNSTOP ") + doc.name); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { diff --git a/buying/doctype/supplier/supplier.js b/buying/doctype/supplier/supplier.js index ebe4e0e513..1512dec92e 100644 --- a/buying/doctype/supplier/supplier.js +++ b/buying/doctype/supplier/supplier.js @@ -68,7 +68,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 supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc" }, as_dict: 1, - no_results_message: 'No addresses created', + no_results_message: wn._('No addresses created'), render_row: cur_frm.cscript.render_address_row, }); // note: render_address_row is defined in contact_control.js @@ -86,7 +86,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 supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc" }, as_dict: 1, - no_results_message: 'No contacts created', + no_results_message: wn._('No contacts created'), render_row: cur_frm.cscript.render_contact_row, }); // note: render_contact_row is defined in contact_control.js diff --git a/buying/doctype/supplier_quotation/supplier_quotation.js b/buying/doctype/supplier_quotation/supplier_quotation.js index 3fba931f99..4e01782801 100644 --- a/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/buying/doctype/supplier_quotation/supplier_quotation.js @@ -16,7 +16,7 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext this._super(); if (this.frm.doc.docstatus === 1) { - cur_frm.add_custom_button("Make Purchase Order", this.make_purchase_order); + cur_frm.add_custom_button(wn._("Make Purchase Order"), this.make_purchase_order); } else if (this.frm.doc.docstatus===0) { cur_frm.add_custom_button(wn._('From Material Request'), diff --git a/buying/page/buying_home/buying_home.js b/buying/page/buying_home/buying_home.js index b6de994e96..3af91a025e 100644 --- a/buying/page/buying_home/buying_home.js +++ b/buying/page/buying_home/buying_home.js @@ -58,7 +58,7 @@ wn.module_page["Buying"] = [ "label": wn._("Buying Settings"), "route": "Form/Buying Settings", "doctype":"Buying Settings", - "description": "Settings for Buying Module" + "description": wn._("Settings for Buying Module") }, { "label": wn._("Purchase Taxes and Charges Master"), diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js index c163052a6a..6a8fc1ae0f 100644 --- a/buying/page/purchase_analytics/purchase_analytics.js +++ b/buying/page/purchase_analytics/purchase_analytics.js @@ -4,7 +4,7 @@ wn.pages['purchase-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Purchase Analytics', + title: wn._('Purchase Analytics'), single_column: true }); @@ -18,7 +18,7 @@ wn.pages['purchase-analytics'].onload = function(wrapper) { erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ init: function(wrapper) { this._super({ - title: "Purchase Analytics", + title: wn._("Purchase Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -31,7 +31,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.tree_grids = { "Supplier Type": { - label: "Supplier Type / Supplier", + label: wn._("Supplier Type / Supplier"), show: true, item_key: "supplier", parent_field: "parent_supplier_type", @@ -44,7 +44,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ } }, "Supplier": { - label: "Supplier", + label: wn._("Supplier"), show: false, item_key: "supplier", formatter: function(item) { @@ -74,7 +74,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.tree_grid = this.tree_grids[this.tree_type]; var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, {id: "name", name: this.tree_grid.label, field: "name", width: 300, formatter: this.tree_formatter}, @@ -86,23 +86,23 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: "Tree Type", options:["Supplier Type", "Supplier", + {fieldtype:"Select", label: wn._("Tree Type"), options:["Supplier Type", "Supplier", "Item Group", "Item"], filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Based On", options:["Purchase Invoice", + {fieldtype:"Select", label: wn._("Based On"), options:["Purchase Invoice", "Purchase Order", "Purchase Receipt"]}, - {fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"]}, - {fieldtype:"Select", label: "Company", link:"Company", + {fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"]}, + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { var me = this; @@ -130,18 +130,18 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ }) wn.report_dump.data["Supplier Type"] = [{ - name: "All Supplier Types", + name: wn._("All Supplier Types"), id: "All Supplier Types", }].concat(wn.report_dump.data["Supplier Type"]); wn.report_dump.data["Supplier"].push({ - name: "Not Set", + name: wn._("Not Set"), parent_supplier_type: "All Supplier Types", id: "Not Set", }); wn.report_dump.data["Item"].push({ - name: "Not Set", + name: wn._("Not Set"), parent_item_group: "All Item Groups", id: "Not Set", }); diff --git a/home/page/activity/activity.js b/home/page/activity/activity.js index 8d451939cc..edfe50f363 100644 --- a/home/page/activity/activity.js +++ b/home/page/activity/activity.js @@ -4,7 +4,7 @@ wn.pages['activity'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: "Activity", + title: wn._("Activity"), single_column: true }) wrapper.appframe.add_module_icon("Activity"); @@ -21,7 +21,7 @@ wn.pages['activity'].onload = function(wrapper) { // Build Report Button if(wn.boot.profile.can_get_report.indexOf("Feed")!=-1) { - wrapper.appframe.add_button('Build Report', function() { + wrapper.appframe.add_button(wn._('Build Report'), function() { wn.set_route('Report', "Feed"); }, 'icon-th') } diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js index 094eeb558e..d5e361eb76 100644 --- a/home/page/latest_updates/latest_updates.js +++ b/home/page/latest_updates/latest_updates.js @@ -4,7 +4,7 @@ wn.pages['latest-updates'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Latest Updates', + title: wn._('Latest Updates'), single_column: true }); @@ -16,9 +16,9 @@ wn.pages['latest-updates'].onload = function(wrapper) { method:"home.page.latest_updates.latest_updates.get", callback: function(r) { parent.empty(); - $("

Report issues at\ - GitHub Issues

\ -

Commit Log

") + $("

"+wn._("Report issues at")+ + ""+wn._("GitHub Issues")+"

\ +

"+wn._("Commit Log")+"

") .appendTo(parent); var $tbody = $('
') diff --git a/hr/doctype/appraisal/appraisal.js b/hr/doctype/appraisal/appraisal.js index f94a288fd5..8c5df8e297 100644 --- a/hr/doctype/appraisal/appraisal.js +++ b/hr/doctype/appraisal/appraisal.js @@ -45,7 +45,7 @@ cur_frm.cscript.score = function(doc,cdt,cdn){ var d = locals[cdt][cdn]; if (d.score){ if (flt(d.score) > 5) { - msgprint("Score must be less than or equal to 5"); + msgprint(wn._("Score must be less than or equal to 5")); d.score = 0; refresh_field('score', d.name, 'appraisal_details'); } diff --git a/hr/doctype/employee/employee.js b/hr/doctype/employee/employee.js index 615e2761b8..3814dd9c11 100644 --- a/hr/doctype/employee/employee.js +++ b/hr/doctype/employee/employee.js @@ -21,7 +21,7 @@ erpnext.hr.EmployeeController = wn.ui.form.Controller.extend({ var me = this; erpnext.hide_naming_series(); if(!this.frm.doc.__islocal) { - cur_frm.add_custom_button('Make Salary Structure', function() { + cur_frm.add_custom_button(wn._('Make Salary Structure'), function() { me.make_salary_structure(this); }); } }, diff --git a/hr/doctype/expense_claim/expense_claim.js b/hr/doctype/expense_claim/expense_claim.js index f7895b10eb..e19cac7751 100644 --- a/hr/doctype/expense_claim/expense_claim.js +++ b/hr/doctype/expense_claim/expense_claim.js @@ -93,28 +93,28 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){ cur_frm.savesubmit(); if(doc.docstatus==1 && wn.model.can_create("Journal Voucher")) - cur_frm.add_custom_button("Make Bank Voucher", cur_frm.cscript.make_bank_voucher); + cur_frm.add_custom_button(wn._("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher); } } cur_frm.cscript.set_help = function(doc) { cur_frm.set_intro(""); if(doc.__islocal && !in_list(user_roles, "HR User")) { - cur_frm.set_intro("Fill the form and save it") + cur_frm.set_intro(wn._("Fill the form and save it")) } else { if(doc.docstatus==0 && doc.approval_status=="Draft") { if(user==doc.exp_approver) { - cur_frm.set_intro("You are the Expense Approver for this record. \ - Please Update the 'Status' and Save"); + cur_frm.set_intro(wn._("You are the Expense Approver for this record. \ + Please Update the 'Status' and Save")); } else { - cur_frm.set_intro("Expense Claim is pending approval. \ - Only the Expense Approver can update status."); + cur_frm.set_intro(wn._("Expense Claim is pending approval. \ + Only the Expense Approver can update status.")); } } else { if(doc.approval_status=="Approved") { - cur_frm.set_intro("Expense Claim has been approved."); + cur_frm.set_intro(wn._("Expense Claim has been approved.")); } else if(doc.approval_status=="Rejected") { - cur_frm.set_intro("Expense Claim has been rejected."); + cur_frm.set_intro(wn._("Expense Claim has been rejected.")); } } } diff --git a/hr/doctype/job_applicant/job_applicant.js b/hr/doctype/job_applicant/job_applicant.js index f82da11f07..ccfbbc25b9 100644 --- a/hr/doctype/job_applicant/job_applicant.js +++ b/hr/doctype/job_applicant/job_applicant.js @@ -7,8 +7,8 @@ cur_frm.cscript = { onload: function(doc, dt, dn) { if(in_list(user_roles,'System Manager')) { cur_frm.footer.help_area.innerHTML = '
\ -

Jobs Email Settings
\ - Automatically extract Job Applicants from a mail box e.g. "jobs@example.com"

'; +

'+wn._("Jobs Email Settings")+'
\ + '+wn._('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"

'; } }, refresh: function(doc) { diff --git a/hr/doctype/leave_application/leave_application.js b/hr/doctype/leave_application/leave_application.js index 5969f4dc4f..7b32cff691 100755 --- a/hr/doctype/leave_application/leave_application.js +++ b/hr/doctype/leave_application/leave_application.js @@ -31,14 +31,14 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } cur_frm.set_intro(""); if(doc.__islocal && !in_list(user_roles, "HR User")) { - cur_frm.set_intro("Fill the form and save it") + cur_frm.set_intro(wn._("Fill the form and save it")) } else { if(doc.docstatus==0 && doc.status=="Open") { if(user==doc.leave_approver) { - cur_frm.set_intro("You are the Leave Approver for this record. Please Update the 'Status' and Save"); + cur_frm.set_intro(wn._("You are the Leave Approver for this record. Please Update the 'Status' and Save")); cur_frm.toggle_enable("status", true); } else { - cur_frm.set_intro("This Leave Application is pending approval. Only the Leave Apporver can update status.") + cur_frm.set_intro(wn._("This Leave Application is pending approval. Only the Leave Apporver can update status.")) cur_frm.toggle_enable("status", false); if(!doc.__islocal) { if(cur_frm.frm_head.appframe.buttons.Submit) @@ -47,12 +47,12 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } } else { if(doc.status=="Approved") { - cur_frm.set_intro("Leave application has been approved."); + cur_frm.set_intro(wn._("Leave application has been approved.")); if(cur_frm.doc.docstatus==0) { - cur_frm.set_intro("Please submit to update Leave Balance."); + cur_frm.set_intro(wn._("Please submit to update Leave Balance.")); } } else if(doc.status=="Rejected") { - cur_frm.set_intro("Leave application has been rejected."); + cur_frm.set_intro(wn._("Leave application has been rejected.")); } } } @@ -86,7 +86,7 @@ cur_frm.cscript.from_date = function(doc, dt, dn) { cur_frm.cscript.to_date = function(doc, dt, dn) { if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){ - msgprint("To Date should be same as From Date for Half Day leave"); + msgprint(wn._("To Date should be same as From Date for Half Day leave")); set_multiple(dt,dn,{to_date:doc.from_date}); } cur_frm.cscript.calculate_total_days(doc, dt, dn); diff --git a/hr/doctype/leave_control_panel/leave_control_panel.js b/hr/doctype/leave_control_panel/leave_control_panel.js index a53f031f4c..7a840ba78d 100644 --- a/hr/doctype/leave_control_panel/leave_control_panel.js +++ b/hr/doctype/leave_control_panel/leave_control_panel.js @@ -15,7 +15,7 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) { function(r, rt) { var doc = locals[cdt][cdn]; if (r.message) { - alert("To date cannot be before from date"); + alert(wn._("To date cannot be before from date")); doc.to_date = ''; refresh_field('to_date'); } diff --git a/hr/doctype/salary_manager/salary_manager.js b/hr/doctype/salary_manager/salary_manager.js index 178ab3ef6b..b27d41c418 100644 --- a/hr/doctype/salary_manager/salary_manager.js +++ b/hr/doctype/salary_manager/salary_manager.js @@ -5,7 +5,7 @@ var display_activity_log = function(msg) { if(!pscript.ss_html) pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div'); pscript.ss_html.innerHTML = - '
Activity Log:
'+msg+'
'; + '
'+wn._("Activity Log:")+'
'+msg+'
'; } //Create salary slip @@ -23,7 +23,7 @@ cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) { //Submit salary slip //----------------------- cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) { - var check = confirm("Do you really want to Submit all Salary Slip for month : " + doc.month+" and fiscal year : "+doc.fiscal_year); + var check = confirm(wn._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ wn._(" and fiscal year : ")+doc.fiscal_year); if(check){ var callback = function(r, rt){ if (r.message) @@ -49,7 +49,7 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) { var jv = wn.model.make_new_doc_and_get_name('Journal Voucher'); jv = locals['Journal Voucher'][jv]; jv.voucher_type = 'Bank Voucher'; - jv.user_remark = 'Payment of salary for the month: ' + doc.month + 'and fiscal year: ' + doc.fiscal_year; + jv.user_remark = wn._('Payment of salary for the month: ') + doc.month + wn._('and fiscal year: ') + doc.fiscal_year; jv.fiscal_year = doc.fiscal_year; jv.company = doc.company; jv.posting_date = dateutil.obj_to_str(new Date()); diff --git a/hr/doctype/salary_structure/salary_structure.js b/hr/doctype/salary_structure/salary_structure.js index 81cb63d352..15b3512935 100644 --- a/hr/doctype/salary_structure/salary_structure.js +++ b/hr/doctype/salary_structure/salary_structure.js @@ -12,7 +12,7 @@ cur_frm.cscript.onload = function(doc, dt, dn){ cur_frm.cscript.refresh = function(doc, dt, dn){ if((!doc.__islocal) && (doc.is_active == 'Yes')){ - cur_frm.add_custom_button('Make Salary Slip', cur_frm.cscript['Make Salary Slip']); + cur_frm.add_custom_button(wn._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']); } cur_frm.toggle_enable('employee', doc.__islocal); diff --git a/hr/doctype/upload_attendance/upload_attendance.js b/hr/doctype/upload_attendance/upload_attendance.js index 71e266928d..06a78c6735 100644 --- a/hr/doctype/upload_attendance/upload_attendance.js +++ b/hr/doctype/upload_attendance/upload_attendance.js @@ -17,7 +17,7 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({ get_template:function() { if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) { - msgprint("Attendance From Date and Attendance To Date is mandatory"); + msgprint(wn._("Attendance From Date and Attendance To Date is mandatory")); return; } window.location.href = repl(wn.request.url + @@ -56,10 +56,10 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({ return v; }); - r.messages = ["

Import Failed!

"] + r.messages = ["

"+wn._("Import Failed!")+"

"] .concat(r.messages) } else { - r.messages = ["

Import Successful!

"]. + r.messages = ["

"+wn._("Import Successful!")+"

"]. concat(r.message.messages) } diff --git a/hr/report/employee_birthday/employee_birthday.js b/hr/report/employee_birthday/employee_birthday.js index 3fd849266f..8fce812abf 100644 --- a/hr/report/employee_birthday/employee_birthday.js +++ b/hr/report/employee_birthday/employee_birthday.js @@ -5,7 +5,7 @@ wn.query_reports["Employee Birthday"] = { "filters": [ { "fieldname":"month", - "label": "Month", + "label": wn._("Month"), "fieldtype": "Select", "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,7 +13,7 @@ wn.query_reports["Employee Birthday"] = { }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_user_default("company") diff --git a/hr/report/employee_leave_balance/employee_leave_balance.js b/hr/report/employee_leave_balance/employee_leave_balance.js index 1bf252d2a7..7af65b641f 100644 --- a/hr/report/employee_leave_balance/employee_leave_balance.js +++ b/hr/report/employee_leave_balance/employee_leave_balance.js @@ -5,14 +5,14 @@ wn.query_reports["Employee Leave Balance"] = { "filters": [ { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": wn.defaults.get_user_default("fiscal_year") }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_user_default("company") diff --git a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js index 678e7af713..fc14b6dd8e 100644 --- a/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js +++ b/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js @@ -5,7 +5,7 @@ wn.query_reports["Monthly Attendance Sheet"] = { "filters": [ { "fieldname":"month", - "label": "Month", + "label": wn._("Month"), "fieldtype": "Select", "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,20 +13,20 @@ wn.query_reports["Monthly Attendance Sheet"] = { }, { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": sys_defaults.fiscal_year, }, { "fieldname":"employee", - "label": "Employee", + "label": wn._("Employee"), "fieldtype": "Link", "options": "Employee" }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/hr/report/monthly_salary_register/monthly_salary_register.js b/hr/report/monthly_salary_register/monthly_salary_register.js index eb33d08cd0..45d7ff9bad 100644 --- a/hr/report/monthly_salary_register/monthly_salary_register.js +++ b/hr/report/monthly_salary_register/monthly_salary_register.js @@ -5,7 +5,7 @@ wn.query_reports["Monthly Salary Register"] = { "filters": [ { "fieldname":"month", - "label": "Month", + "label": wn._("Month"), "fieldtype": "Select", "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,20 +13,20 @@ wn.query_reports["Monthly Salary Register"] = { }, { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": sys_defaults.fiscal_year, }, { "fieldname":"employee", - "label": "Employee", + "label": wn._("Employee"), "fieldtype": "Link", "options": "Employee" }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/manufacturing/doctype/bom/bom.js b/manufacturing/doctype/bom/bom.js index badb108048..020325867a 100644 --- a/manufacturing/doctype/bom/bom.js +++ b/manufacturing/doctype/bom/bom.js @@ -6,7 +6,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){ cur_frm.toggle_enable("item", doc.__islocal); if (!doc.__islocal && doc.docstatus<2) { - cur_frm.add_custom_button("Update Cost", cur_frm.cscript.update_cost); + cur_frm.add_custom_button(wn._("Update Cost"), cur_frm.cscript.update_cost); } cur_frm.cscript.with_operations(doc); @@ -123,7 +123,7 @@ cur_frm.cscript.qty = function(doc, cdt, cdn) { cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if (d.bom_no) { - msgprint("You can not change rate if BOM mentioned agianst any item"); + msgprint(wn._("You can not change rate if BOM mentioned agianst any item")); get_bom_material_detail(doc, cdt, cdn); } else { calculate_rm_cost(doc); diff --git a/manufacturing/doctype/production_order/production_order.js b/manufacturing/doctype/production_order/production_order.js index f680776a56..7c4325dc37 100644 --- a/manufacturing/doctype/production_order/production_order.js +++ b/manufacturing/doctype/production_order/production_order.js @@ -13,7 +13,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { cfn_set_fields(doc, dt, dn); if(doc.docstatus===0 && !doc.__islocal) { - cur_frm.set_intro("Submit this Production Order for further processing."); + cur_frm.set_intro(wn._("Submit this Production Order for further processing.")); } else if(doc.docstatus===1) { var percent = flt(doc.produced_qty) / flt(doc.qty) * 100; cur_frm.dashboard.add_progress(cint(percent) + "% " + wn._("Complete"), percent); @@ -27,13 +27,13 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { var cfn_set_fields = function(doc, dt, dn) { if (doc.docstatus == 1) { if (doc.status != 'Stopped' && doc.status != 'Completed') - cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Production Order']); + cur_frm.add_custom_button(wn._('Stop!'), cur_frm.cscript['Stop Production Order']); else if (doc.status == 'Stopped') - cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Production Order']); + cur_frm.add_custom_button(wn._('Unstop'), cur_frm.cscript['Unstop Production Order']); if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){ - cur_frm.add_custom_button('Transfer Raw Materials', cur_frm.cscript['Transfer Raw Materials']); - cur_frm.add_custom_button('Update Finished Goods', cur_frm.cscript['Update Finished Goods']); + cur_frm.add_custom_button(wn._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']); + cur_frm.add_custom_button(wn._('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']); } } } @@ -47,7 +47,7 @@ cur_frm.cscript.production_item = function(doc) { cur_frm.cscript['Stop Production Order'] = function() { var doc = cur_frm.doc; - var check = confirm("Do you really want to stop production order: " + doc.name); + var check = confirm(wn._("Do you really want to stop production order: " + doc.name)); if (check) { return $c_obj(make_doclist(doc.doctype, doc.name), 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();}); } @@ -55,7 +55,7 @@ cur_frm.cscript['Stop Production Order'] = function() { cur_frm.cscript['Unstop Production Order'] = function() { var doc = cur_frm.doc; - var check = confirm("Do really want to unstop production order: " + doc.name); + var check = confirm(wn._("Do really want to unstop production order: " + doc.name)); if (check) return $c_obj(make_doclist(doc.doctype, doc.name), 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();}); } @@ -105,5 +105,5 @@ cur_frm.set_query("bom_no", function(doc) { query:"controllers.queries.bom", filters: {item: cstr(doc.production_item)} } - } else msgprint(" Please enter Production Item first"); + } else msgprint(wn._("Please enter Production Item first")); }); \ No newline at end of file diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/manufacturing/doctype/production_planning_tool/production_planning_tool.js index daa701352b..22bf6caef4 100644 --- a/manufacturing/doctype/production_planning_tool/production_planning_tool.js +++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.js @@ -44,7 +44,7 @@ cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function( query:"controllers.queries.bom", filters:{'item': cstr(d.item_code)} } - } else msgprint(" Please enter Item first"); + } else msgprint(wn._("Please enter Item first")); } cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) { diff --git a/portal/templates/includes/cart.js b/portal/templates/includes/cart.js index bd3f56533c..a894b32e6b 100644 --- a/portal/templates/includes/cart.js +++ b/portal/templates/includes/cart.js @@ -13,11 +13,11 @@ $(document).ready(function() { $(".progress").remove(); if(r.exc) { if(r.exc.indexOf("WebsitePriceListMissingError")!==-1) { - erpnext.cart.show_error("Oops!", "Price List not configured."); + erpnext.cart.show_error("Oops!", wn._("Price List not configured.")); } else if(r["403"]) { - erpnext.cart.show_error("Hey!", "You need to be logged in to view your cart."); + erpnext.cart.show_error("Hey!", wn._("You need to be logged in to view your cart.")); } else { - erpnext.cart.show_error("Oops!", "Something went wrong."); + erpnext.cart.show_error("Oops!", wn._("Something went wrong.")); } } else { erpnext.cart.set_cart_count(); @@ -78,7 +78,7 @@ $.extend(erpnext.cart, { var no_items = $.map(doclist, function(d) { return d.item_code || null;}).length===0; if(no_items) { - erpnext.cart.show_error("Empty :-(", "Go ahead and add something to your cart."); + erpnext.cart.show_error("Empty :-(", wn._("Go ahead and add something to your cart.")); $("#cart-addresses").toggle(false); return; } @@ -117,7 +117,7 @@ $.extend(erpnext.cart, { }); if(!(addresses && addresses.length)) { - $cart_shipping_address.html('
Hey! Go ahead and add an address
'); + $cart_shipping_address.html('
'+wn._("Hey! Go ahead and add an address")+'
'); } else { erpnext.cart.render_address($cart_shipping_address, addresses, doclist[0].shipping_address_name); erpnext.cart.render_address($cart_billing_address, addresses, doclist[0].customer_address); @@ -283,7 +283,7 @@ $.extend(erpnext.cart, { $("#cart-error") .empty() - .html(msg || "Something went wrong!") + .html(msg || wn._("Something went wrong!")) .toggle(true); } else { window.location.href = "order?name=" + encodeURIComponent(r.message); diff --git a/projects/doctype/project/project.js b/projects/doctype/project/project.js index 74cfa45198..3dfe897383 100644 --- a/projects/doctype/project/project.js +++ b/projects/doctype/project/project.js @@ -4,11 +4,11 @@ // show tasks cur_frm.cscript.refresh = function(doc) { if(!doc.__islocal) { - cur_frm.add_custom_button("Gantt Chart", function() { + cur_frm.add_custom_button(wn._("Gantt Chart"), function() { wn.route_options = {"project": doc.name} wn.set_route("Gantt", "Task"); }, "icon-tasks"); - cur_frm.add_custom_button("Tasks", function() { + cur_frm.add_custom_button(wn._("Tasks"), function() { wn.route_options = {"project": doc.name} wn.set_route("List", "Task"); }, "icon-list"); diff --git a/projects/doctype/task/task_calendar.js b/projects/doctype/task/task_calendar.js index 77728553e0..29d1c9940b 100644 --- a/projects/doctype/task/task_calendar.js +++ b/projects/doctype/task/task_calendar.js @@ -6,7 +6,7 @@ wn.views.calendar["Task"] = { "start": "exp_start_date", "end": "exp_end_date", "id": "name", - "title": "subject", + "title": wn._("subject"), "allDay": "allDay" }, gantt: true, @@ -15,7 +15,7 @@ wn.views.calendar["Task"] = { "fieldtype": "Link", "fieldname": "project", "options": "Project", - "label": "Project" + "label": wn._("Project") } ], get_events_method: "projects.doctype.task.task.get_events" diff --git a/projects/doctype/time_log/time_log_calendar.js b/projects/doctype/time_log/time_log_calendar.js index a4f22db329..12cfcba562 100644 --- a/projects/doctype/time_log/time_log_calendar.js +++ b/projects/doctype/time_log/time_log_calendar.js @@ -6,7 +6,7 @@ wn.views.calendar["Time Log"] = { "start": "from_time", "end": "to_time", "id": "name", - "title": "title", + "title": w._("title"), "allDay": "allDay" }, get_events_method: "projects.doctype.time_log.time_log.get_events" diff --git a/projects/doctype/time_log_batch/time_log_batch.js b/projects/doctype/time_log_batch/time_log_batch.js index 96f7c2229d..c338c401a1 100644 --- a/projects/doctype/time_log_batch/time_log_batch.js +++ b/projects/doctype/time_log_batch/time_log_batch.js @@ -25,7 +25,7 @@ $.extend(cur_frm.cscript, { }[doc.status]); if(doc.status=="Submitted") { - cur_frm.add_custom_button("Make Sales Invoice", function() { cur_frm.cscript.make_invoice() }, + cur_frm.add_custom_button(wn._("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() }, "icon-file-alt"); } }, diff --git a/projects/report/daily_time_log_summary/daily_time_log_summary.js b/projects/report/daily_time_log_summary/daily_time_log_summary.js index 6bb1117ba6..70e3cca450 100644 --- a/projects/report/daily_time_log_summary/daily_time_log_summary.js +++ b/projects/report/daily_time_log_summary/daily_time_log_summary.js @@ -5,13 +5,13 @@ wn.query_reports["Daily Time Log Summary"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": wn.datetime.get_today() }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": wn.datetime.get_today() }, diff --git a/public/js/account_tree_grid.js b/public/js/account_tree_grid.js index c779cfa6d9..28db1d7946 100644 --- a/public/js/account_tree_grid.js +++ b/public/js/account_tree_grid.js @@ -36,39 +36,39 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({ }, setup_columns: function() { this.columns = [ - {id: "name", name: "Account", field: "name", width: 300, cssClass: "cell-title", + {id: "name", name: wn._("Account"), field: "name", width: 300, cssClass: "cell-title", formatter: this.tree_formatter}, - {id: "opening_debit", name: "Opening (Dr)", field: "opening_debit", width: 100, + {id: "opening_debit", name: wn._("Opening (Dr)"), field: "opening_debit", width: 100, formatter: this.currency_formatter}, - {id: "opening_credit", name: "Opening (Cr)", field: "opening_credit", width: 100, + {id: "opening_credit", name: wn._("Opening (Cr)"), field: "opening_credit", width: 100, formatter: this.currency_formatter}, - {id: "debit", name: "Debit", field: "debit", width: 100, + {id: "debit", name: wn._("Debit"), field: "debit", width: 100, formatter: this.currency_formatter}, - {id: "credit", name: "Credit", field: "credit", width: 100, + {id: "credit", name: wn._("Credit"), field: "credit", width: 100, formatter: this.currency_formatter}, - {id: "closing_debit", name: "Closing (Dr)", field: "closing_debit", width: 100, + {id: "closing_debit", name: wn._("Closing (Dr)"), field: "closing_debit", width: 100, formatter: this.currency_formatter}, - {id: "closing_credit", name: "Closing (Cr)", field: "closing_credit", width: 100, + {id: "closing_credit", name: wn._("Closing (Cr)"), field: "closing_credit", width: 100, formatter: this.currency_formatter} ]; }, filters: [ - {fieldtype: "Select", label: "Company", link:"Company", default_value: "Select Company...", + {fieldtype: "Select", label: wn._("Company"), link:"Company", default_value: "Select Company...", filter: function(val, item, opts, me) { if (item.company == val || val == opts.default_value) { return me.apply_zero_filter(val, item, opts, me); } return false; }}, - {fieldtype: "Select", label: "Fiscal Year", link:"Fiscal Year", + {fieldtype: "Select", label: wn._("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype: "Date", label: "From Date"}, - {fieldtype: "Label", label: "To"}, - {fieldtype: "Date", label: "To Date"}, - {fieldtype: "Button", label: "Refresh", icon:"icon-refresh icon-white", + {fieldtype: "Date", label: wn._("From Date")}, + {fieldtype: "Label", label: wn._("To")}, + {fieldtype: "Date", label: wn._("To Date")}, + {fieldtype: "Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype: "Button", label: "Reset Filters"}, + {fieldtype: "Button", label: wn._("Reset Filters")}, ], setup_filters: function() { this._super(); @@ -193,7 +193,7 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({ set_fiscal_year: function() { if (this.opening_date > this.closing_date) { - msgprint("Opening Date should be before Closing Date"); + msgprint(wn._("Opening Date should be before Closing Date")); return; } @@ -207,7 +207,7 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({ }); if (!this.fiscal_year) { - msgprint("Opening Date and Closing Date should be within same Fiscal Year"); + msgprint(wn._("Opening Date and Closing Date should be within same Fiscal Year")); return; } }, diff --git a/public/js/conf.js b/public/js/conf.js index 993d2ab800..bc49f711a8 100644 --- a/public/js/conf.js +++ b/public/js/conf.js @@ -24,14 +24,14 @@ $(document).bind('toolbar_setup', function() { wn.provide('wn.ui.misc'); wn.ui.misc.about = function() { if(!wn.ui.misc.about_dialog) { - var d = new wn.ui.Dialog({title:'About ERPNext'}) + var d = new wn.ui.Dialog({title: wn._('About ERPNext')}) $(d.body).html(repl("
\ -

ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\ +

"+wn._("ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\ to provide an integrated tool to manage most processes in a small organization.\ - For more information about Web Notes, or to buy hosting servies, go to \ - https://erpnext.com.

\ -

To report an issue, go to GitHub Issues

\ + For more information about Web Notes, or to buy hosting servies, go to ")+ + "https://erpnext.com.

\ +

"+wn._("To report an issue, go to ")+"GitHub Issues

\
\

License: GNU General Public License Version 3

\
", wn.app)); diff --git a/public/js/controllers/stock_controller.js b/public/js/controllers/stock_controller.js index de18fe0b57..01a73a25f5 100644 --- a/public/js/controllers/stock_controller.js +++ b/public/js/controllers/stock_controller.js @@ -7,7 +7,7 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({ show_stock_ledger: function() { var me = this; if(this.frm.doc.docstatus===1) { - this.frm.add_custom_button("Stock Ledger", function() { + this.frm.add_custom_button(wn._("Stock Ledger"), function() { wn.route_options = { voucher_no: me.frm.doc.name, from_date: me.frm.doc.posting_date, @@ -22,7 +22,7 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({ show_general_ledger: function() { var me = this; if(this.frm.doc.docstatus===1 && cint(wn.defaults.get_default("auto_accounting_for_stock"))) { - cur_frm.add_custom_button('Accounting Ledger', function() { + cur_frm.add_custom_button(wn._('Accounting Ledger'), function() { wn.route_options = { "voucher_no": me.frm.doc.name, "from_date": me.frm.doc.posting_date, diff --git a/public/js/feature_setup.js b/public/js/feature_setup.js index 31f81be342..96dea90ead 100644 --- a/public/js/feature_setup.js +++ b/public/js/feature_setup.js @@ -198,7 +198,7 @@ $(document).bind('form_refresh', function() { } else if(cur_frm.fields_dict[fort]) { cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false); } else { - msgprint('Grid "'+fort+'" does not exists'); + msgprint(wn._('Grid "')+fort+wn._('" does not exists')); } } } diff --git a/public/js/purchase_trends_filters.js b/public/js/purchase_trends_filters.js index 5a13066a24..62d7fd2650 100644 --- a/public/js/purchase_trends_filters.js +++ b/public/js/purchase_trends_filters.js @@ -5,35 +5,35 @@ var get_filters = function(){ return [ { "fieldname":"period", - "label": "Period", + "label": wn._("Period"), "fieldtype": "Select", "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), "default": "Monthly" }, { "fieldname":"based_on", - "label": "Based On", + "label": wn._("Based On"), "fieldtype": "Select", "options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"), "default": "Item" }, { "fieldname":"group_by", - "label": "Group By", + "label": wn._("Group By"), "fieldtype": "Select", "options": ["Item", "Supplier"].join("\n"), "default": "" }, { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options":'Fiscal Year', "default": sys_defaults.fiscal_year }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/public/js/sales_trends_filters.js b/public/js/sales_trends_filters.js index 63f6e63e5a..29bb779b4a 100644 --- a/public/js/sales_trends_filters.js +++ b/public/js/sales_trends_filters.js @@ -5,35 +5,35 @@ var get_filters = function(){ return[ { "fieldname":"period", - "label": "Period", + "label": wn._("Period"), "fieldtype": "Select", "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), "default": "Monthly" }, { "fieldname":"based_on", - "label": "Based On", + "label": wn._("Based On"), "fieldtype": "Select", "options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"), "default": "Item" }, { "fieldname":"group_by", - "label": "Group By", + "label": wn._("Group By"), "fieldtype": "Select", "options": ["Item", "Customer"].join("\n"), "default": "" }, { "fieldname":"fiscal_year", - "label": "Fiscal Year", + "label": wn._("Fiscal Year"), "fieldtype": "Link", "options":'Fiscal Year', "default": sys_defaults.fiscal_year }, { "fieldname":"company", - "label": "Company", + "label": wn._("Company"), "fieldtype": "Link", "options": "Company", "default": wn.defaults.get_default("company") diff --git a/public/js/startup.js b/public/js/startup.js index 5a81d730a3..ecb23dae78 100644 --- a/public/js/startup.js +++ b/public/js/startup.js @@ -6,7 +6,7 @@ var current_module; wn.provide('erpnext.startup'); erpnext.startup.start = function() { - console.log('Starting up...'); + console.log(wn._('Starting up...')); $('#startup_div').html('Starting up...').toggle(true); erpnext.toolbar.setup(); @@ -20,16 +20,16 @@ erpnext.startup.show_expiry_banner = function() { var today = dateutil.str_to_obj(wn.boot.server_date); var expires_on = dateutil.str_to_obj(wn.boot.expires_on); var diff = dateutil.get_diff(expires_on, today); - var payment_link = "\ - Click here to buy subscription."; + var payment_link = ""+ + wn._("Click here to buy subscription.")+""; var msg = ""; if (0 <= diff && diff <= 10) { var expiry_string = diff==0 ? "today" : repl("in %(diff)s day(s)", { diff: diff }); - msg = repl('Your ERPNext subscription will expire %(expiry_string)s. %(payment_link)s', + msg = repl(wn._('Your ERPNext subscription will')+'expire %(expiry_string)s. %(payment_link)s', { expiry_string: expiry_string, payment_link: payment_link }); } else if (diff < 0) { - msg = repl('This ERPNext subscription has expired. %(payment_link)s', {payment_link: payment_link}); + msg = repl(wn._('This ERPNext subscription')+''+wn._('has expired')+'. %(payment_link)s'), {payment_link: payment_link}); } if(msg) wn.ui.toolbar.show_banner(msg); diff --git a/public/js/stock_analytics.js b/public/js/stock_analytics.js index 5b58113046..8cb6161636 100644 --- a/public/js/stock_analytics.js +++ b/public/js/stock_analytics.js @@ -6,7 +6,7 @@ wn.require("app/js/stock_grid_report.js"); erpnext.StockAnalytics = erpnext.StockGridReport.extend({ init: function(wrapper, opts) { var args = { - title: "Stock Analytics", + title: wn._("Stock Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -36,13 +36,13 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({ }, setup_columns: function() { var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "name", name: "Item", field: "name", width: 300, + {id: "name", name: wn._("Item"), field: "name", width: 300, formatter: this.tree_formatter}, - {id: "brand", name: "Brand", field: "brand", width: 100}, - {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, - {id: "opening", name: "Opening", field: "opening", hidden: true, + {id: "brand", name: wn._("Brand"), field: "brand", width: 100}, + {id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100}, + {id: "opening", name: wn._("Opening"), field: "opening", hidden: true, formatter: this.currency_formatter} ]; @@ -50,23 +50,23 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"], + {fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"], filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Brand", link:"Brand", + {fieldtype:"Select", label: wn._("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: "Warehouse", link:"Warehouse", + {fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", default_value: "Select Warehouse..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { var me = this; diff --git a/public/js/transaction.js b/public/js/transaction.js index d52b742228..b1201907c1 100644 --- a/public/js/transaction.js +++ b/public/js/transaction.js @@ -326,7 +326,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ validate_on_previous_row: function(tax) { // validate if a valid row id is mentioned in case of // On Previous Row Amount and On Previous Row Total - if((["On Previous Row Amount", "On Previous Row Total"].indexOf(tax.charge_type) != -1) && + if(([wn._("On Previous Row Amount"), wn._("On Previous Row Total")].indexOf(tax.charge_type) != -1) && (!tax.row_id || cint(tax.row_id) >= tax.idx)) { var msg = repl(wn._("Row") + " # %(idx)s [%(doctype)s]: " + wn._("Please specify a valid") + " %(row_id_label)s", { diff --git a/public/js/utils.js b/public/js/utils.js index ddeca269b0..2e5eea515b 100644 --- a/public/js/utils.js +++ b/public/js/utils.js @@ -41,19 +41,19 @@ $.extend(erpnext, { if(!grid_row.fields_dict.serial_no || grid_row.fields_dict.serial_no.get_status()!=="Write") return; - var $btn = $('') + var $btn = $('') .appendTo($("
") .css({"margin-bottom": "10px", "margin-top": "-10px"}) .appendTo(grid_row.fields_dict.serial_no.$wrapper)); $btn.on("click", function() { var d = new wn.ui.Dialog({ - title: "Add Serial No", + title: wn._("Add Serial No"), fields: [ { "fieldtype": "Link", "options": "Serial No", - "label": "Serial No", + "label": wn._("Serial No"), "get_query": { item_code: grid_row.doc.item_code, warehouse: grid_row.doc.warehouse @@ -61,7 +61,7 @@ $.extend(erpnext, { }, { "fieldtype": "Button", - "label": "Add" + "label": wn._("Add") } ] }); diff --git a/selling/doctype/customer/customer.js b/selling/doctype/customer/customer.js index a703eed53d..0828adf008 100644 --- a/selling/doctype/customer/customer.js +++ b/selling/doctype/customer/customer.js @@ -77,7 +77,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 customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc" }, as_dict: 1, - no_results_message: 'No addresses created', + no_results_message: wn._('No addresses created'), render_row: cur_frm.cscript.render_address_row, }); // note: render_address_row is defined in contact_control.js diff --git a/selling/doctype/lead/lead.js b/selling/doctype/lead/lead.js index 0bd23e95a3..9f6412cfd1 100644 --- a/selling/doctype/lead/lead.js +++ b/selling/doctype/lead/lead.js @@ -24,8 +24,8 @@ erpnext.LeadController = wn.ui.form.Controller.extend({ if(in_list(user_roles,'System Manager')) { cur_frm.footer.help_area.innerHTML = '
\ -

Sales Email Settings
\ - Automatically extract Leads from a mail box e.g. "sales@example.com"

'; +

'+wn._('Sales Email Settings')+'
\ + '+wn._('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"

'; } }, @@ -36,9 +36,9 @@ erpnext.LeadController = wn.ui.form.Controller.extend({ this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer; if(!this.frm.doc.__islocal && !this.frm.__is_customer) { - this.frm.add_custom_button("Create Customer", this.create_customer); - this.frm.add_custom_button("Create Opportunity", this.create_opportunity); - this.frm.add_custom_button("Send SMS", this.frm.cscript.send_sms); + this.frm.add_custom_button(wn._("Create Customer"), this.create_customer); + this.frm.add_custom_button(wn._("Create Opportunity"), this.create_opportunity); + this.frm.add_custom_button(wn._("Send SMS"), this.frm.cscript.send_sms); } cur_frm.communication_view = new wn.views.CommunicationList({ @@ -68,7 +68,7 @@ erpnext.LeadController = wn.ui.form.Controller.extend({ order by is_primary_address, is_shipping_address desc' }, as_dict: 1, - no_results_message: 'No addresses created', + no_results_message: wn._('No addresses created'), render_row: this.render_address_row, }); // note: render_address_row is defined in contact_control.js diff --git a/selling/doctype/opportunity/opportunity.js b/selling/doctype/opportunity/opportunity.js index d2b866cfbb..e65ef50951 100644 --- a/selling/doctype/opportunity/opportunity.js +++ b/selling/doctype/opportunity/opportunity.js @@ -103,12 +103,19 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){ erpnext.hide_naming_series(); cur_frm.clear_custom_buttons(); +<<<<<<< HEAD + if(doc.docstatus === 1 && doc.status!=="Opportunity Lost") { + cur_frm.add_custom_button( wn._('Create Quotation'), cur_frm.cscript.create_quotation); + cur_frm.add_custom_button(wn._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); +======= if(doc.docstatus === 1 && doc.status!=="Lost") { cur_frm.add_custom_button('Create Quotation', cur_frm.cscript.create_quotation); if(doc.status!=="Quotation") { cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']); } cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); +>>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b } cur_frm.toggle_display("contact_info", doc.customer || doc.lead); @@ -174,11 +181,11 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) { cur_frm.cscript['Declare Opportunity Lost'] = function(){ var dialog = new wn.ui.Dialog({ - title: "Set as Lost", + title: wn._("Set as Lost"), fields: [ - {"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason", + {"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason", "reqd": 1 }, - {"fieldtype": "Button", "label": "Update", "fieldname": "update"}, + {"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"}, ] }); @@ -191,7 +198,7 @@ cur_frm.cscript['Declare Opportunity Lost'] = function(){ args: args.reason, callback: function(r) { if(r.exc) { - msgprint("There were errors."); + msgprint(wn._("There were errors.")); return; } dialog.hide(); diff --git a/selling/doctype/quotation/quotation.js b/selling/doctype/quotation/quotation.js index 4c27d523bc..776167229d 100644 --- a/selling/doctype/quotation/quotation.js +++ b/selling/doctype/quotation/quotation.js @@ -25,12 +25,19 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ refresh: function(doc, dt, dn) { this._super(doc, dt, dn); +<<<<<<< HEAD + if(doc.docstatus == 1 && doc.status!=='Order Lost') { + cur_frm.add_custom_button(wn._('Make Sales Order'), cur_frm.cscript['Make Sales Order']); + if(doc.status!=="Order Confirmed") { + cur_frm.add_custom_button(wn._('Set as Lost'), cur_frm.cscript['Declare Order Lost']); +======= if(doc.docstatus == 1 && doc.status!=='Lost') { cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']); if(doc.status!=="Ordered") { cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']); +>>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b } - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); } if (this.frm.doc.docstatus===0) { @@ -122,9 +129,9 @@ cur_frm.cscript['Declare Order Lost'] = function(){ var dialog = new wn.ui.Dialog({ title: "Set as Lost", fields: [ - {"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason", + {"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason", "reqd": 1 }, - {"fieldtype": "Button", "label": "Update", "fieldname": "update"}, + {"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"}, ] }); @@ -137,7 +144,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){ args: args.reason, callback: function(r) { if(r.exc) { - msgprint("There were errors."); + msgprint(wn._("There were errors.")); return; } dialog.hide(); diff --git a/selling/doctype/sales_bom/sales_bom.js b/selling/doctype/sales_bom/sales_bom.js index 80e66b824d..871420abbe 100644 --- a/selling/doctype/sales_bom/sales_bom.js +++ b/selling/doctype/sales_bom/sales_bom.js @@ -4,7 +4,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.toggle_enable('new_item_code', doc.__islocal); if(!doc.__islocal) { - cur_frm.add_custom_button("Check for Duplicates", function() { + cur_frm.add_custom_button(wn._("Check for Duplicates"), function() { return cur_frm.call_server('check_duplicate', 1) }, 'icon-search') } @@ -15,8 +15,8 @@ cur_frm.fields_dict.new_item_code.get_query = function() { query: "selling.doctype.sales_bom.sales_bom.get_new_item_code" } } -cur_frm.fields_dict.new_item_code.query_description = 'Select Item where "Is Stock Item" is "No" \ - and "Is Sales Item" is "Yes" and there is no other Sales BOM'; +cur_frm.fields_dict.new_item_code.query_description = wn._('Select Item where "Is Stock Item" is "No"')+ +wn._('and "Is Sales Item" is "Yes" and there is no other Sales BOM'); cur_frm.cscript.item_code = function(doc, dt, dn) { var d = locals[dt][dn]; diff --git a/selling/page/sales_analytics/sales_analytics.js b/selling/page/sales_analytics/sales_analytics.js index 0159ae021c..daa78b40d0 100644 --- a/selling/page/sales_analytics/sales_analytics.js +++ b/selling/page/sales_analytics/sales_analytics.js @@ -4,7 +4,7 @@ wn.pages['sales-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Sales Analytics', + title: wn._('Sales Analytics'), single_column: true }); new erpnext.SalesAnalytics(wrapper); @@ -17,7 +17,7 @@ wn.pages['sales-analytics'].onload = function(wrapper) { erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ init: function(wrapper) { this._super({ - title: "Sales Analytics", + title: wn._("Sales Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -30,14 +30,14 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ this.tree_grids = { "Customer Group": { - label: "Customer Group / Customer", + label: wn._("Customer Group / Customer"), show: true, item_key: "customer", parent_field: "parent_customer_group", formatter: function(item) { return item.name; } }, "Customer": { - label: "Customer", + label: wn._("Customer"), show: false, item_key: "customer", formatter: function(item) { @@ -45,7 +45,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ } }, "Item Group": { - label: "Item", + label: wn._("Item"), show: true, parent_field: "parent_item_group", item_key: "item_code", @@ -54,7 +54,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ } }, "Item": { - label: "Item", + label: wn._("Item"), show: false, item_key: "item_code", formatter: function(item) { @@ -62,7 +62,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ } }, "Territory": { - label: "Territory / Customer", + label: wn._("Territory / Customer"), show: true, item_key: "customer", parent_field: "parent_territory", @@ -88,23 +88,23 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: "Tree Type", options:["Customer Group", "Customer", + {fieldtype:"Select", label: wn._("Tree Type"), options:["Customer Group", "Customer", "Item Group", "Item", "Territory"], filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Based On", options:["Sales Invoice", + {fieldtype:"Select", label: wn._("Based On"), options:["Sales Invoice", "Sales Order", "Delivery Note"]}, - {fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"]}, - {fieldtype:"Select", label: "Company", link:"Company", + {fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"]}, + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { var me = this; diff --git a/selling/page/sales_browser/sales_browser.js b/selling/page/sales_browser/sales_browser.js index 53df1887b6..470fb68869 100644 --- a/selling/page/sales_browser/sales_browser.js +++ b/selling/page/sales_browser/sales_browser.js @@ -15,8 +15,9 @@ pscript['onload_Sales Browser'] = function(wrapper){ $(wrapper) .find(".layout-side-section") - .html('
Click on a link to get options to expand \ - get options Add / Edit / Delete.
') + .html('
'+ + wn._('Click on a link to get options to expand get options ') + + wn._('Add') + ' / ' + wn._('Edit') + ' / '+ wn._('Delete') + '.
') wrapper.make_tree = function() { var ctype = wn.get_route()[1] || 'Territory'; @@ -87,22 +88,22 @@ erpnext.SalesChart = Class.extend({ var node_links = []; if (wn.model.can_read(this.ctype)) { - node_links.push('Edit'); + node_links.push(''+wn._('Edit')+''); } if(data.expandable) { if (wn.boot.profile.can_create.indexOf(this.ctype) !== -1 || wn.boot.profile.in_create.indexOf(this.ctype) !== -1) { - node_links.push('Add Child'); + node_links.push('' + wn._('Add Child') + ''); } } if (wn.model.can_write(this.ctype)) { - node_links.push('Rename'); + node_links.push('' + wn._('Rename') + ''); }; if (wn.model.can_delete(this.ctype)) { - node_links.push('Delete'); + node_links.push('' + wn._('Delete') + ''); }; link.toolbar.append(node_links.join(" | ")); @@ -114,18 +115,18 @@ erpnext.SalesChart = Class.extend({ {fieldtype:'Data', fieldname: 'name_field', label:'New ' + me.ctype + ' Name', reqd:true}, {fieldtype:'Select', fieldname:'is_group', label:'Group Node', options:'No\nYes', - description: "Further nodes can be only created under 'Group' type nodes"}, + description: wn._("Further nodes can be only created under 'Group' type nodes")}, {fieldtype:'Button', fieldname:'create_new', label:'Create New' } ] if(me.ctype == "Sales Person") { fields.splice(-1, 0, {fieldtype:'Link', fieldname:'employee', label:'Employee', - options:'Employee', description: "Please enter Employee Id of this sales parson"}); + options:'Employee', description: wn._("Please enter Employee Id of this sales parson")}); } // the dialog var d = new wn.ui.Dialog({ - title:'New ' + me.ctype, + title: wn._('New ') + wn._(me.ctype), fields: fields }) diff --git a/selling/page/selling_home/selling_home.js b/selling/page/selling_home/selling_home.js index 06877e8578..ad264c94ea 100644 --- a/selling/page/selling_home/selling_home.js +++ b/selling/page/selling_home/selling_home.js @@ -63,7 +63,7 @@ wn.module_page["Selling"] = [ "label": wn._("Selling Settings"), "route": "Form/Selling Settings", "doctype":"Selling Settings", - "description": "Settings for Selling Module" + "description": wn._("Settings for Selling Module") }, { "route":"Form/Shopping Cart Settings", diff --git a/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js b/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js index d527b344b8..78c38286c2 100644 --- a/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js +++ b/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js @@ -5,7 +5,7 @@ wn.query_reports["Customers Not Buying Since Long Time"] = { "filters": [ { "fieldname":"days_since_last_order", - "label": "Days Since Last Order", + "label": wn._("Days Since Last Order"), "fieldtype": "Int", "default": 60 } diff --git a/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js b/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js index 5f2b89cbbd..d41adb6dde 100644 --- a/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js +++ b/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js @@ -5,21 +5,21 @@ wn.query_reports["Sales Person Target Variance Item Group-Wise"] = { "filters": [ { fieldname: "fiscal_year", - label: "Fiscal Year", + label: wn._("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: "Period", + label: wn._("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "target_on", - label: "Target On", + label: wn._("Target On"), fieldtype: "Select", options: "Quantity\nAmount", default: "Quantity" diff --git a/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js b/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js index 6ddb5f97c9..1f62084f47 100644 --- a/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js +++ b/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js @@ -5,57 +5,57 @@ wn.query_reports["Sales Person-wise Transaction Summary"] = { "filters": [ { fieldname: "sales_person", - label: "Sales Person", + label: wn._("Sales Person"), fieldtype: "Link", options: "Sales Person" }, { fieldname: "doc_type", - label: "Document Type", + label: wn._("Document Type"), fieldtype: "Select", options: "Sales Order\nDelivery Note\nSales Invoice", default: "Sales Order" }, { fieldname: "from_date", - label: "From Date", + label: wn._("From Date"), fieldtype: "Date", default: wn.defaults.get_user_default("year_start_date"), }, { fieldname:"to_date", - label: "To Date", + label: wn._("To Date"), fieldtype: "Date", default: get_today() }, { fieldname:"company", - label: "Company", + label: wn._("Company"), fieldtype: "Link", options: "Company", default: wn.defaults.get_default("company") }, { fieldname:"item_group", - label: "Item Group", + label: wn._("Item Group"), fieldtype: "Link", options: "Item Group", }, { fieldname:"brand", - label: "Brand", + label: wn._("Brand"), fieldtype: "Link", options: "Brand", }, { fieldname:"customer", - label: "Customer", + label: wn._("Customer"), fieldtype: "Link", options: "Customer", }, { fieldname:"territory", - label: "Territory", + label: wn._("Territory"), fieldtype: "Link", options: "Territory", }, diff --git a/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js b/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js index 882cdb6e83..ce2bc9f16c 100644 --- a/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js +++ b/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js @@ -5,21 +5,21 @@ wn.query_reports["Territory Target Variance Item Group-Wise"] = { "filters": [ { fieldname: "fiscal_year", - label: "Fiscal Year", + label: wn._("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: "Period", + label: wn._("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "target_on", - label: "Target On", + label: wn._("Target On"), fieldtype: "Select", options: "Quantity\nAmount", default: "Quantity" diff --git a/selling/sales_common.js b/selling/sales_common.js index 9eba320bc7..89b60b72db 100644 --- a/selling/sales_common.js +++ b/selling/sales_common.js @@ -71,7 +71,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ this.frm.set_query("batch_no", this.fname, function(doc, cdt, cdn) { var item = wn.model.get_doc(cdt, cdn); if(!item.item_code) { - wn.throw("Please enter Item Code to get batch no"); + wn.throw(wn._("Please enter Item Code to get batch no")); } else { filters = { 'item_code': item.item_code, @@ -625,12 +625,12 @@ var set_sales_bom_help = function(doc) { $(cur_frm.fields_dict.packing_list.row.wrapper).toggle(true); if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) { - help_msg = "
\ - For 'Sales BOM' items, warehouse, serial no and batch no \ + help_msg = "
" + + wn._("For 'Sales BOM' items, warehouse, serial no and batch no \ will be considered from the 'Packing List' table. \ If warehouse and batch no are same for all packing items for any 'Sales BOM' item, \ - those values can be entered in the main item table, values will be copied to 'Packing List' table. \ -
"; + those values can be entered in the main item table, values will be copied to 'Packing List' table.")+ + "
"; wn.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg; } } else { diff --git a/setup/doctype/company/company.js b/setup/doctype/company/company.js index d023f8df49..0c864fa80a 100644 --- a/setup/doctype/company/company.js +++ b/setup/doctype/company/company.js @@ -61,7 +61,8 @@ cur_frm.cscript.has_special_chars = function(t) { cur_frm.cscript.company_name = function(doc){ if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){ - msgprint("Special Characters ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? are not allowed for\nCompany Name " + doc.company_name +"") + msgprint((""+wn._("Special Characters")+" ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? "+ + wn._("are not allowed for ")+"\n"+wn._("Company Name")+" "+ doc.company_name +"")) doc.company_name = ''; refresh_field('company_name'); } @@ -69,7 +70,8 @@ cur_frm.cscript.company_name = function(doc){ cur_frm.cscript.abbr = function(doc){ if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){ - msgprint("Special Characters ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? are not allowed for\nAbbr " + doc.abbr +"") + msgprint(""+wn._("Special Characters ")+"! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?" + + wn._("are not allowed for")+ "\nAbbr " + doc.abbr +"") doc.abbr = ''; refresh_field('abbr'); } diff --git a/setup/doctype/customer_group/customer_group.js b/setup/doctype/customer_group/customer_group.js index 2953de542d..9541cf8e10 100644 --- a/setup/doctype/customer_group/customer_group.js +++ b/setup/doctype/customer_group/customer_group.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root customer group if(!doc.parent_customer_group) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root customer group and cannot be edited."); + cur_frm.set_intro(wn._("This is a root customer group and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/setup/doctype/email_digest/email_digest.js b/setup/doctype/email_digest/email_digest.js index 552109231f..d009080e98 100644 --- a/setup/doctype/email_digest/email_digest.js +++ b/setup/doctype/email_digest/email_digest.js @@ -3,10 +3,10 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { doc = locals[dt][dn]; - var save_msg = "You must Save the form before proceeding"; - var err_msg = "There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists." + var save_msg = wn._("You must ")+ ""+wn._("Save ")+""+wn._("the form before proceeding"); + var err_msg = wn._("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.") - cur_frm.add_custom_button('View Now', function() { + cur_frm.add_custom_button(wn._('View Now'), function() { doc = locals[dt][dn]; if(doc.__unsaved != 1) { return $c_obj(make_doclist(dt, dn), 'get_digest_msg', '', function(r, rt) { @@ -16,7 +16,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } else { //console.log(arguments); var d = new wn.ui.Dialog({ - title: 'Email Digest: ' + dn, + title: wn._('Email Digest: ') + dn, width: 800 }); @@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { msgprint(save_msg); } }, 1); - cur_frm.add_custom_button('Send Now', function() { + cur_frm.add_custom_button(wn._('Send Now'), function() { doc = locals[dt][dn]; if(doc.__unsaved != 1) { return $c_obj(make_doclist(dt, dn), 'send', '', function(r, rt) { @@ -38,7 +38,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { console.log(r.exc); } else { //console.log(arguments); - msgprint('Message Sent'); + msgprint(wn._('Message Sent')); } }); } else { @@ -56,7 +56,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) { // Open a dialog and display checkboxes against email addresses doc = locals[dt][dn]; var d = new wn.ui.Dialog({ - title: 'Add/Remove Recipients', + title: wn._('Add/Remove Recipients'), width: 400 }); var dialog_div = $a(d.body, 'div', 'dialog-div', '', ''); diff --git a/setup/doctype/item_group/item_group.js b/setup/doctype/item_group/item_group.js index 0c18db001c..6dbb0d273b 100644 --- a/setup/doctype/item_group/item_group.js +++ b/setup/doctype/item_group/item_group.js @@ -4,7 +4,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.cscript.set_root_readonly(doc); - cur_frm.add_custom_button("Item Group Tree", function() { + cur_frm.add_custom_button(wn._("Item Group Tree"), function() { wn.set_route("Sales Browser", "Item Group"); }) @@ -19,7 +19,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root item group if(!doc.parent_item_group) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root item group and cannot be edited."); + cur_frm.set_intro(wn._("This is a root item group and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/setup/doctype/sales_partner/sales_partner.js b/setup/doctype/sales_partner/sales_partner.js index 86b7712142..351aa3d0f6 100644 --- a/setup/doctype/sales_partner/sales_partner.js +++ b/setup/doctype/sales_partner/sales_partner.js @@ -39,7 +39,7 @@ cur_frm.cscript.make_address = function() { return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc" }, as_dict: 1, - no_results_message: 'No addresses created', + no_results_message: wn._('No addresses created'), render_row: function(wrapper, data) { $(wrapper).css('padding','5px 0px'); var link = $ln(wrapper,cstr(data.name), function() { loaddoc("Address", this.dn); }, {fontWeight:'bold'}); @@ -69,7 +69,7 @@ cur_frm.cscript.make_contact = function() { return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc" }, as_dict: 1, - no_results_message: 'No contacts created', + no_results_message: wn._('No contacts created'), render_row: function(wrapper, data) { $(wrapper).css('padding', '5px 0px'); var link = $ln(wrapper, cstr(data.name), function() { loaddoc("Contact", this.dn); }, {fontWeight:'bold'}); diff --git a/setup/doctype/sales_person/sales_person.js b/setup/doctype/sales_person/sales_person.js index 34f267e825..ec21ead6be 100644 --- a/setup/doctype/sales_person/sales_person.js +++ b/setup/doctype/sales_person/sales_person.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root if(!doc.parent_sales_person) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root sales person and cannot be edited."); + cur_frm.set_intro(wn._("This is a root sales person and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/setup/doctype/supplier_type/supplier_type.js b/setup/doctype/supplier_type/supplier_type.js index b65f67c21c..5ebf6d51e2 100644 --- a/setup/doctype/supplier_type/supplier_type.js +++ b/setup/doctype/supplier_type/supplier_type.js @@ -2,5 +2,5 @@ // License: GNU General Public License v3. See license.txt cur_frm.cscript.refresh = function(doc) { - cur_frm.set_intro(doc.__islocal ? "" : "There is nothing to edit.") + cur_frm.set_intro(doc.__islocal ? "" : wn._("There is nothing to edit.")) } \ No newline at end of file diff --git a/setup/doctype/territory/territory.js b/setup/doctype/territory/territory.js index 7561816185..de708b6d05 100644 --- a/setup/doctype/territory/territory.js +++ b/setup/doctype/territory/territory.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root territory if(!doc.parent_territory) { cur_frm.perm = [[1,0,0], [1,0,0]]; - cur_frm.set_intro("This is a root territory and cannot be edited."); + cur_frm.set_intro(wn._("This is a root territory and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js index f39618685d..0127a2a3f0 100644 --- a/setup/page/setup/setup.js +++ b/setup/page/setup/setup.js @@ -5,12 +5,12 @@ wn.pages['Setup'].onload = function(wrapper) { if(msg_dialog && msg_dialog.display) msg_dialog.hide(); wn.ui.make_app_page({ parent: wrapper, - title: 'Setup', + title: wn._('Setup'), single_column: true }); wrapper.appframe.add_module_icon("Setup"); - wrapper.appframe.add_button("Refresh", function() { + wrapper.appframe.add_button(wn._("Refresh"), function() { wn.pages.Setup.make(wrapper); }, "icon-refresh"); @@ -110,7 +110,7 @@ wn.pages.Setup.make = function(wrapper) { }) } else if(item.single) { - $(' Edit') + $(''+wn._('Edit')+'') .appendTo($links) $links.find(".view-link") @@ -119,11 +119,11 @@ wn.pages.Setup.make = function(wrapper) { wn.set_route("Form", $(this).attr("data-doctype")); }) } else if(item.type !== "Link"){ - $(' New \ + $(''+wn._('New')+' \ | \ - View \ + '+wn._('View')+' \ | \ - Import') + '+wn._('Import')+'') .appendTo($links) $links.find(".view-link") @@ -180,11 +180,11 @@ wn.pages.Setup.make = function(wrapper) { if(r.message) { body.empty(); if(wn.boot.expires_on) { - $(body).prepend("
Account expires on " + $(body).prepend("
"+wn.("Account expires on") + wn.datetime.global_date_format(wn.boot.expires_on) + "
"); } - $completed = $('

Setup Completed

\ + $completed = $('

'+wn._("Setup Completed")+'

\
') .appendTo(body); diff --git a/stock/doctype/delivery_note/delivery_note.js b/stock/doctype/delivery_note/delivery_note.js index 0ca1d34ed2..210b3926fc 100644 --- a/stock/doctype/delivery_note/delivery_note.js +++ b/stock/doctype/delivery_note/delivery_note.js @@ -26,20 +26,20 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend( }); if(!from_sales_invoice) - cur_frm.add_custom_button('Make Invoice', this.make_sales_invoice); + cur_frm.add_custom_button(wn._('Make Invoice'), this.make_sales_invoice); } if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) - cur_frm.add_custom_button('Make Installation Note', this.make_installation_note); + cur_frm.add_custom_button(wn._('Make Installation Note'), this.make_installation_note); if (doc.docstatus==1) { - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); this.show_stock_ledger(); this.show_general_ledger(); } if(doc.docstatus==0 && !doc.__islocal) { - cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']); + cur_frm.add_custom_button(wn._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']); } set_print_hide(doc, dt, dn); diff --git a/stock/doctype/item/item.js b/stock/doctype/item/item.js index 50212fa424..d8ee45f42f 100644 --- a/stock/doctype/item/item.js +++ b/stock/doctype/item/item.js @@ -124,7 +124,7 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) { // in the "alternate_description" field cur_frm.cscript.add_image = function(doc, dt, dn) { if(!doc.image) { - msgprint('Please select an "Image" first'); + msgprint(wn._('Please select an "Image" first')); return; } @@ -140,7 +140,7 @@ cur_frm.cscript.weight_to_validate = function(doc,cdt,cdn){ if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom) { - alert('Weight is mentioned,\nPlease mention "Weight UOM" too'); + alert(wn._('Weight is mentioned,\nPlease mention "Weight UOM" too')); validated=0; } } diff --git a/stock/doctype/material_request/material_request.js b/stock/doctype/material_request/material_request.js index 99e8afb0a1..9fc852f87b 100644 --- a/stock/doctype/material_request/material_request.js +++ b/stock/doctype/material_request/material_request.js @@ -27,21 +27,21 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten if(doc.docstatus == 1 && doc.status != 'Stopped') { if(doc.material_request_type === "Purchase") - cur_frm.add_custom_button("Make Supplier Quotation", + cur_frm.add_custom_button(wn._("Make Supplier Quotation"), this.make_supplier_quotation); if(doc.material_request_type === "Transfer" && doc.status === "Submitted") - cur_frm.add_custom_button("Transfer Material", this.make_stock_entry); + cur_frm.add_custom_button(wn._("Transfer Material"), this.make_stock_entry); if(flt(doc.per_ordered, 2) < 100) { if(doc.material_request_type === "Purchase") - cur_frm.add_custom_button('Make Purchase Order', + cur_frm.add_custom_button(wn._('Make Purchase Order'), this.make_purchase_order); - cur_frm.add_custom_button('Stop Material Request', + cur_frm.add_custom_button(wn._('Stop Material Request'), cur_frm.cscript['Stop Material Request']); } - cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); + cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms); } @@ -62,7 +62,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten } if(doc.docstatus == 1 && doc.status == 'Stopped') - cur_frm.add_custom_button('Unstop Material Request', + cur_frm.add_custom_button(wn._('Unstop Material Request'), cur_frm.cscript['Unstop Material Request']); }, @@ -154,12 +154,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("Warning: Material Requested Qty is less than Minimum Order Qty"); + alert(wn._("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("Do you really want to STOP this Material Request?"); + var check = confirm(wn._("Do you really want to STOP this Material Request?")); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { @@ -170,7 +170,7 @@ cur_frm.cscript['Stop Material Request'] = function() { cur_frm.cscript['Unstop Material Request'] = function(){ var doc = cur_frm.doc; - var check = confirm("Do you really want to UNSTOP this Material Request?"); + var check = confirm(wn._("Do you really want to UNSTOP this Material Request?")); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) { diff --git a/stock/doctype/packing_slip/packing_slip.js b/stock/doctype/packing_slip/packing_slip.js index eba20c5579..f0a0ba57fc 100644 --- a/stock/doctype/packing_slip/packing_slip.js +++ b/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("Case No. cannot be 0") + msgprint(wn._("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("'To Case No.' cannot be less than 'From Case No.'"); + msgprint(wn._("'To Case No.' cannot be less than 'From Case No.'")); validated = false; } } @@ -72,14 +72,14 @@ cur_frm.cscript.validate_duplicate_items = function(doc, ps_detail) { for(var i=0; i= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { diff --git a/stock/page/stock_level/stock_level.js b/stock/page/stock_level/stock_level.js index df7c8c5d4d..a6cc6a8209 100644 --- a/stock/page/stock_level/stock_level.js +++ b/stock/page/stock_level/stock_level.js @@ -4,7 +4,7 @@ wn.pages['stock-level'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Stock Level', + title: wn._('Stock Level'), single_column: true }); @@ -22,7 +22,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ var me = this; this._super({ - title: "Stock Level", + title: wn._("Stock Level"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -37,70 +37,70 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ Projected Qty = Actual Qty + Planned Qty + Requested Qty \ + Ordered Qty - Reserved Qty \
    \ -
  • 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.
  • \ -
\ +
  • "+wn._("Actual Qty: Quantity available in the warehouse.") +"
  • "+ + "
  • "+wn._("Planned Qty: Quantity, for which, Production Order has been raised,")+ + wn._("but is pending to be manufactured.")+ "
  • " + + "
  • "+wn._("Requested Qty: Quantity requested for purchase, but not ordered.") + "
  • " + + "
  • " + wn._("Ordered Qty: Quantity ordered for purchase, but not received.")+ "
  • " + + "
  • " + wn._("Reserved Qty: Quantity ordered for sale, but not delivered.") + "
  • " + + " \ "); }); }, setup_columns: function() { this.columns = [ - {id: "item_code", name: "Item Code", field: "item_code", width: 160, + {id: "item_code", name: wn._("Item Code"), field: "item_code", width: 160, link_formatter: { filter_input: "item_code", open_btn: true, doctype: '"Item"', }}, - {id: "item_name", name: "Item Name", field: "item_name", width: 100, + {id: "item_name", name: wn._("Item Name"), field: "item_name", width: 100, formatter: this.text_formatter}, - {id: "description", name: "Description", field: "description", width: 200, + {id: "description", name: wn._("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "brand", name: "Brand", field: "brand", width: 100, + {id: "brand", name: wn._("Brand"), field: "brand", width: 100, link_formatter: {filter_input: "brand"}}, - {id: "warehouse", name: "Warehouse", field: "warehouse", width: 100, + {id: "warehouse", name: wn._("Warehouse"), field: "warehouse", width: 100, link_formatter: {filter_input: "warehouse"}}, - {id: "uom", name: "UOM", field: "uom", width: 60}, - {id: "actual_qty", name: "Actual Qty", + {id: "uom", name: wn._("UOM"), field: "uom", width: 60}, + {id: "actual_qty", name: wn._("Actual Qty"), field: "actual_qty", width: 80, formatter: this.currency_formatter}, - {id: "planned_qty", name: "Planned Qty", + {id: "planned_qty", name: wn._("Planned Qty"), field: "planned_qty", width: 80, formatter: this.currency_formatter}, - {id: "requested_qty", name: "Requested Qty", + {id: "requested_qty", name: wn._("Requested Qty"), field: "requested_qty", width: 80, formatter: this.currency_formatter}, - {id: "ordered_qty", name: "Ordered Qty", + {id: "ordered_qty", name: wn._("Ordered Qty"), field: "ordered_qty", width: 80, formatter: this.currency_formatter}, - {id: "reserved_qty", name: "Reserved Qty", + {id: "reserved_qty", name: wn._("Reserved Qty"), field: "reserved_qty", width: 80, formatter: this.currency_formatter}, - {id: "projected_qty", name: "Projected Qty", + {id: "projected_qty", name: wn._("Projected Qty"), field: "projected_qty", width: 80, formatter: this.currency_formatter}, - {id: "re_order_level", name: "Re-Order Level", + {id: "re_order_level", name: wn._("Re-Order Level"), field: "re_order_level", width: 80, formatter: this.currency_formatter}, - {id: "re_order_qty", name: "Re-Order Qty", + {id: "re_order_qty", name: wn._("Re-Order Qty"), field: "re_order_qty", width: 80, formatter: this.currency_formatter}, ]; }, filters: [ - {fieldtype:"Link", label: "Item Code", link:"Item", default_value: "Select Item...", + {fieldtype:"Link", label: wn._("Item Code"), link:"Item", default_value: "Select Item...", filter: function(val, item, opts) { return item.item_code == val || !val; }}, - {fieldtype:"Select", label: "Warehouse", link:"Warehouse", + {fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse", default_value: "Select Warehouse...", filter: function(val, item, opts) { return item.warehouse == val || val == opts.default_value; }}, - {fieldtype:"Select", label: "Brand", link:"Brand", + {fieldtype:"Select", label: wn._("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val; }}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { diff --git a/stock/report/batch_wise_balance_history/batch_wise_balance_history.js b/stock/report/batch_wise_balance_history/batch_wise_balance_history.js index a9d6477754..2b174872b2 100644 --- a/stock/report/batch_wise_balance_history/batch_wise_balance_history.js +++ b/stock/report/batch_wise_balance_history/batch_wise_balance_history.js @@ -5,14 +5,14 @@ wn.query_reports["Batch-Wise Balance History"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "width": "80", "default": sys_defaults.year_start_date, }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "width": "80", "default": wn.datetime.get_today() diff --git a/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js b/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js index 410feabf75..c22672865c 100644 --- a/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js +++ b/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js @@ -5,13 +5,13 @@ wn.query_reports["Itemwise Recommended Reorder Level"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "default": sys_defaults.year_start_date }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "default": get_today() } diff --git a/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js b/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js index 942b4651bf..1b0523cc12 100644 --- a/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js +++ b/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js @@ -5,14 +5,14 @@ wn.query_reports["Warehouse-Wise Stock Balance"] = { "filters": [ { "fieldname":"from_date", - "label": "From Date", + "label": wn._("From Date"), "fieldtype": "Date", "width": "80", "default": sys_defaults.year_start_date, }, { "fieldname":"to_date", - "label": "To Date", + "label": wn._("To Date"), "fieldtype": "Date", "width": "80", "default": wn.datetime.get_today() diff --git a/support/doctype/customer_issue/customer_issue.js b/support/doctype/customer_issue/customer_issue.js index 5b670d452c..d161a78a78 100644 --- a/support/doctype/customer_issue/customer_issue.js +++ b/support/doctype/customer_issue/customer_issue.js @@ -6,7 +6,7 @@ wn.provide("erpnext.support"); erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({ refresh: function() { if((cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) { - cur_frm.add_custom_button('Make Maintenance Visit', this.make_maintenance_visit) + cur_frm.add_custom_button(wn._('Make Maintenance Visit'), this.make_maintenance_visit) } }, diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.js b/support/doctype/maintenance_schedule/maintenance_schedule.js index 6b693435ab..bdcdd3d935 100644 --- a/support/doctype/maintenance_schedule/maintenance_schedule.js +++ b/support/doctype/maintenance_schedule/maintenance_schedule.js @@ -91,7 +91,7 @@ cur_frm.cscript.periodicity = function(doc, cdt, cdn){ return get_server_fields('get_no_of_visits',docstring(arg),'item_maintenance_detail',doc, cdt, cdn, 1); } else{ - msgprint("Please enter Start Date and End Date"); + msgprint(wn._("Please enter Start Date and End Date")); } } @@ -103,7 +103,7 @@ cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) { } ); } else { - alert("Please save the document before generating maintenance schedule"); + alert(wn._("Please save the document before generating maintenance schedule")); } } diff --git a/support/doctype/newsletter/newsletter.js b/support/doctype/newsletter/newsletter.js index 05311963cb..b532b299bb 100644 --- a/support/doctype/newsletter/newsletter.js +++ b/support/doctype/newsletter/newsletter.js @@ -16,7 +16,7 @@ cur_frm.cscript.refresh = function(doc) { erpnext.hide_naming_series(); if(!doc.__islocal && !cint(doc.email_sent) && !doc.__unsaved && inList(wn.boot.profile.can_write, doc.doctype)) { - cur_frm.add_custom_button('Send', function() { + cur_frm.add_custom_button(wn._('Send'), function() { return $c_obj(make_doclist(doc.doctype, doc.name), 'send_emails', '', function(r) { cur_frm.refresh(); }); diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js index c61d9732f8..bcd36581f3 100644 --- a/support/doctype/support_ticket/support_ticket.js +++ b/support/doctype/support_ticket/support_ticket.js @@ -23,8 +23,8 @@ $.extend(cur_frm.cscript, new erpnext.support.SupportTicket({frm: cur_frm})); $.extend(cur_frm.cscript, { onload: function(doc, dt, dn) { if(in_list(user_roles,'System Manager')) { - cur_frm.footer.help_area.innerHTML = '

    Email Settings
    \ - Integrate incoming support emails to Support Ticket

    '; + cur_frm.footer.help_area.innerHTML = '

    '+wn._("Email Settings")+'
    \ + '+wn._("Integrate incoming support emails to Support Ticket")+'

    '; } }, diff --git a/support/page/support_analytics/support_analytics.js b/support/page/support_analytics/support_analytics.js index 7e449178a6..ecc0749624 100644 --- a/support/page/support_analytics/support_analytics.js +++ b/support/page/support_analytics/support_analytics.js @@ -4,7 +4,7 @@ wn.pages['support-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Support Analytics', + title: wn._('Support Analytics'), single_column: true }); @@ -18,7 +18,7 @@ wn.pages['support-analytics'].onload = function(wrapper) { erpnext.SupportAnalytics = wn.views.GridReportWithPlot.extend({ init: function(wrapper) { this._super({ - title: "Support Analtyics", + title: wn._("Support Analtyics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -27,22 +27,22 @@ erpnext.SupportAnalytics = wn.views.GridReportWithPlot.extend({ }, filters: [ - {fieldtype:"Select", label: "Fiscal Year", link:"Fiscal Year", + {fieldtype:"Select", label: wn._("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_columns: function() { var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "status", name: "Status", field: "status", width: 100}, + {id: "status", name: wn._("Status"), field: "status", width: 100}, ]; this.make_date_range_columns(); this.columns = std_columns.concat(this.columns); diff --git a/utilities/demo/demo-login.js b/utilities/demo/demo-login.js index 509057b9ef..03fe6b96b9 100644 --- a/utilities/demo/demo-login.js +++ b/utilities/demo/demo-login.js @@ -14,9 +14,9 @@ $(document).ready(function() { callback: function(r) { $(me).prop("disabled", false); if(r.exc) { - alert("Error, please contact support@erpnext.com"); + alert(wn._("Error, please contact support@erpnext.com")); } else { - console.log("Logged In"); + console.log(wn._("Logged In")); window.location.href = "app.html"; } }