From b52618c142bd4661b63a3e66776fff7658b00e13 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Mon, 14 Apr 2014 16:25:30 +0530 Subject: [PATCH] frappe._ to __ --- erpnext/accounts/doctype/account/account.js | 12 +-- .../bank_reconciliation.js | 2 +- .../doctype/cost_center/cost_center.js | 12 +-- .../doctype/fiscal_year/fiscal_year.js | 4 +- .../journal_voucher/journal_voucher.js | 4 +- .../payment_to_invoice_matching_tool.js | 6 +- .../purchase_invoice/purchase_invoice.js | 10 +-- .../purchase_taxes_and_charges_master.js | 24 +++--- erpnext/accounts/doctype/sales_invoice/pos.js | 4 +- .../doctype/sales_invoice/sales_invoice.js | 12 +-- .../sales_taxes_and_charges_master.js | 14 ++-- .../page/accounts_browser/accounts_browser.js | 62 +++++++-------- .../financial_analytics.js | 28 +++---- .../page/trial_balance/trial_balance.js | 4 +- .../accounts_payable/accounts_payable.js | 8 +- .../accounts_receivable.js | 8 +- .../bank_clearance_summary.js | 6 +- .../bank_reconciliation_statement.js | 4 +- .../budget_variance_report.js | 6 +- .../report/general_ledger/general_ledger.js | 14 ++-- .../report/gross_profit/gross_profit.js | 6 +- .../item_wise_purchase_register.js | 10 +-- .../item_wise_sales_register.js | 8 +- .../payment_period_based_on_invoice_date.js | 10 +-- .../purchase_register/purchase_register.js | 8 +- .../report/sales_register/sales_register.js | 8 +- .../purchase_common/purchase_common.js | 4 +- .../doctype/purchase_order/purchase_order.js | 22 +++--- erpnext/buying/doctype/supplier/supplier.js | 8 +- .../supplier_quotation/supplier_quotation.js | 4 +- .../purchase_analytics/purchase_analytics.js | 36 ++++----- erpnext/home/page/activity/activity.js | 6 +- erpnext/hr/doctype/appraisal/appraisal.js | 2 +- erpnext/hr/doctype/employee/employee.js | 6 +- .../hr/doctype/expense_claim/expense_claim.js | 12 +-- .../hr/doctype/job_applicant/job_applicant.js | 4 +- .../leave_application/leave_application.js | 14 ++-- .../leave_control_panel.js | 2 +- .../doctype/salary_manager/salary_manager.js | 10 +-- .../salary_structure/salary_structure.js | 2 +- .../upload_attendance/upload_attendance.js | 6 +- .../employee_birthday/employee_birthday.js | 4 +- .../employee_leave_balance.js | 4 +- .../monthly_attendance_sheet.js | 8 +- .../monthly_salary_register.js | 8 +- erpnext/manufacturing/doctype/bom/bom.js | 4 +- .../production_order/production_order.js | 20 ++--- .../production_planning_tool.js | 2 +- erpnext/projects/doctype/project/project.js | 4 +- .../projects/doctype/task/task_calendar.js | 4 +- .../doctype/time_log/time_log_list.js | 8 +- .../doctype/time_log_batch/time_log_batch.js | 10 +-- .../daily_time_log_summary.js | 4 +- erpnext/public/js/account_tree_grid.js | 32 ++++---- erpnext/public/js/conf.js | 6 +- .../public/js/controllers/stock_controller.js | 4 +- erpnext/public/js/feature_setup.js | 2 +- erpnext/public/js/purchase_trends_filters.js | 10 +-- erpnext/public/js/queries.js | 12 +-- erpnext/public/js/sales_trends_filters.js | 10 +-- erpnext/public/js/startup.js | 2 +- erpnext/public/js/stock_analytics.js | 30 +++---- erpnext/public/js/transaction.js | 32 ++++---- erpnext/public/js/utils.js | 8 +- erpnext/selling/doctype/customer/customer.js | 10 +-- .../installation_note/installation_note.js | 2 +- erpnext/selling/doctype/lead/lead.js | 12 +-- .../doctype/opportunity/opportunity.js | 14 ++-- .../selling/doctype/quotation/quotation.js | 16 ++-- .../selling/doctype/sales_bom/sales_bom.js | 6 +- .../doctype/sales_order/sales_order.js | 28 +++---- .../page/sales_analytics/sales_analytics.js | 34 ++++---- .../page/sales_browser/sales_browser.js | 10 +-- .../customer_acquisition_and_loyalty.js | 6 +- .../customers_not_buying_since_long_time.js | 2 +- ..._person_target_variance_item_group_wise.js | 6 +- .../sales_person_wise_transaction_summary.js | 18 ++--- ...rritory_target_variance_item_group_wise.js | 6 +- erpnext/selling/sales_common.js | 18 ++--- .../doctype/backup_manager/backup_manager.js | 12 +-- erpnext/setup/doctype/company/company.js | 10 +-- erpnext/setup/doctype/currency/currency.js | 2 +- .../currency_exchange/currency_exchange.js | 2 +- .../doctype/customer_group/customer_group.js | 2 +- .../doctype/email_digest/email_digest.js | 14 ++-- .../setup/doctype/item_group/item_group.js | 4 +- .../jobs_email_settings.js | 4 +- .../sales_email_settings.js | 4 +- .../doctype/sales_partner/sales_partner.js | 4 +- .../doctype/sales_person/sales_person.js | 2 +- .../doctype/supplier_type/supplier_type.js | 2 +- erpnext/setup/doctype/territory/territory.js | 2 +- .../setup/page/setup_wizard/setup_wizard.js | 78 +++++++++---------- .../doctype/delivery_note/delivery_note.js | 10 +-- erpnext/stock/doctype/item/item.js | 6 +- .../landed_cost_wizard/landed_cost_wizard.js | 6 +- .../material_request/material_request.js | 34 ++++---- .../doctype/packing_slip/packing_slip.js | 16 ++-- .../purchase_receipt/purchase_receipt.js | 16 ++-- .../stock/doctype/stock_entry/stock_entry.js | 16 ++-- .../stock_reconciliation.js | 34 ++++---- .../stock/page/stock_ageing/stock_ageing.js | 30 +++---- .../page/stock_analytics/stock_analytics.js | 2 +- .../stock/page/stock_balance/stock_balance.js | 46 +++++------ .../stock/page/stock_ledger/stock_ledger.js | 42 +++++----- erpnext/stock/page/stock_level/stock_level.js | 54 ++++++------- .../batch_wise_balance_history.js | 4 +- .../itemwise_recommended_reorder_level.js | 4 +- .../stock/report/stock_ageing/stock_ageing.js | 10 +-- .../stock/report/stock_ledger/stock_ledger.js | 14 ++-- .../stock_projected_qty.js | 8 +- .../supplier_wise_sales_analytics.js | 6 +- .../warehouse_wise_stock_balance.js | 4 +- .../doctype/customer_issue/customer_issue.js | 2 +- .../maintenance_schedule.js | 8 +- .../maintenance_visit/maintenance_visit.js | 6 +- .../support/doctype/newsletter/newsletter.js | 2 +- .../doctype/support_ticket/support_ticket.js | 4 +- .../support_analytics/support_analytics.js | 22 +++--- .../doctype/rename_tool/rename_tool.js | 2 +- .../doctype/sms_control/sms_control.js | 2 +- 121 files changed, 700 insertions(+), 700 deletions(-) diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js index 76a1e56fe9..2a805cfca3 100644 --- a/erpnext/accounts/doctype/account/account.js +++ b/erpnext/accounts/doctype/account/account.js @@ -3,7 +3,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { if(doc.__islocal) { - msgprint(frappe._("Please create new account from Chart of Accounts.")); + msgprint(__("Please create new account from Chart of Accounts.")); throw "cannot create"; } @@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { // read-only for root accounts if(!doc.parent_account) { cur_frm.set_read_only(); - cur_frm.set_intro(frappe._("This is a root account and cannot be edited.")); + cur_frm.set_intro(__("This is a root account and cannot be edited.")); } else { // credit days and type if customer or supplier cur_frm.set_intro(null); @@ -64,17 +64,17 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) { } cur_frm.cscript.add_toolbar_buttons = function(doc) { - cur_frm.appframe.add_button(frappe._('Chart of Accounts'), + cur_frm.appframe.add_button(__('Chart of Accounts'), function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap') if (cstr(doc.group_or_ledger) == 'Group') { - cur_frm.add_custom_button(frappe._('Convert to Ledger'), + cur_frm.add_custom_button(__('Convert to Ledger'), function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet') } else if (cstr(doc.group_or_ledger) == 'Ledger') { - cur_frm.add_custom_button(frappe._('Convert to Group'), + cur_frm.add_custom_button(__('Convert to Group'), function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet') - cur_frm.appframe.add_button(frappe._('View Ledger'), function() { + cur_frm.appframe.add_button(__('View Ledger'), function() { frappe.route_options = { "account": doc.name, "from_date": sys_defaults.year_start_date, diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js index aea996aab6..089f61e821 100644 --- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js +++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js @@ -4,5 +4,5 @@ cur_frm.add_fetch("bank_account", "company", "company"); cur_frm.cscript.onload = function(doc, cdt, cdn){ cur_frm.set_intro(' ' + - frappe._("Update clearance date of Journal Entries marked as 'Bank Vouchers'")) + __("Update clearance date of Journal Entries marked as 'Bank Vouchers'")) } \ No newline at end of file diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js index 0cd3a700a4..c846c83150 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center.js +++ b/erpnext/accounts/doctype/cost_center/cost_center.js @@ -40,8 +40,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 += '

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

'; + intro_txt += '

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

'; } cur_frm.cscript.hide_unhide_group_ledger(doc); @@ -49,22 +49,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.appframe.add_button(frappe._('Chart of Cost Centers'), + cur_frm.appframe.add_button(__('Chart of Cost Centers'), function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap') } cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) { if(!doc.company){ - msgprint(frappe._('Please enter company name first')); + msgprint(__('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(frappe._('Convert to Ledger'), + cur_frm.add_custom_button(__('Convert to Ledger'), function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet') } else if (cstr(doc.group_or_ledger) == 'Ledger') { - cur_frm.add_custom_button(frappe._('Convert to Group'), + cur_frm.add_custom_button(__('Convert to Group'), function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet') } } diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js index 6aa5ae8883..c83e1c891e 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js @@ -8,8 +8,8 @@ $.extend(cur_frm.cscript, { this.frm.toggle_enable('year_end_date', doc.__islocal) if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) { - this.frm.add_custom_button(frappe._("Set as Default"), this.frm.cscript.set_as_default); - this.frm.set_intro(frappe._("To set this Fiscal Year as Default, click on 'Set as Default'")); + this.frm.add_custom_button(__("Set as Default"), this.frm.cscript.set_as_default); + this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'")); } else this.frm.set_intro(""); }, set_as_default: function() { diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js index b1aa70bcee..1a39ada6c3 100644 --- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js +++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js @@ -114,7 +114,7 @@ cur_frm.cscript.refresh = function(doc) { erpnext.hide_naming_series(); cur_frm.cscript.voucher_type(doc); if(doc.docstatus==1) { - cur_frm.appframe.add_button(frappe._('View Ledger'), function() { + cur_frm.appframe.add_button(__('View Ledger'), function() { frappe.route_options = { "voucher_no": doc.name, "from_date": doc.posting_date, @@ -186,7 +186,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 = frappe._("Journal Voucher"); + cur_frm.pformat.print_heading = __("Journal Voucher"); } cur_frm.cscript.voucher_type = function(doc, cdt, cdn) { diff --git a/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js index f9027450db..79da744af2 100644 --- a/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js +++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js @@ -10,15 +10,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(frappe._("Select the Invoice against which you want to allocate payments.")); + cur_frm.set_intro(__("Select the Invoice against which you want to allocate payments.")); } else { - cur_frm.set_intro(frappe._("Set allocated amount against each Payment Entry and click 'Allocate'.")); + cur_frm.set_intro(__("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(frappe._("Please select Account first")); + if (!doc.account) msgprint(__("Please select Account first")); else { return { doctype: doc.voucher_type, diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index a45af20ae6..49f43f0bc6 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/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(frappe._('Make Payment Entry'), this.make_bank_voucher); + this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher); if(doc.docstatus==1) { - cur_frm.appframe.add_button(frappe._('View Ledger'), function() { + cur_frm.appframe.add_button(__('View Ledger'), function() { frappe.route_options = { "voucher_no": doc.name, "from_date": doc.posting_date, @@ -43,7 +43,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ } if(doc.docstatus===0) { - cur_frm.add_custom_button(frappe._('From Purchase Order'), + cur_frm.add_custom_button(__('From Purchase Order'), function() { frappe.model.map_current_doc({ method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice", @@ -58,7 +58,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({ }) }); - cur_frm.add_custom_button(frappe._('From Purchase Receipt'), + cur_frm.add_custom_button(__('From Purchase Receipt'), function() { frappe.model.map_current_doc({ method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice", @@ -228,5 +228,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 = frappe._("Purchase Invoice"); + cur_frm.pformat.print_heading = __("Purchase Invoice"); } \ No newline at end of file diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js b/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js index bc0a912bd6..1e53ac54a0 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.js @@ -78,11 +78,11 @@ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.category && d.add_deduct_tax) { - msgprint(frappe._("Please select Category first")); + msgprint(__("Please select Category first")); d.add_deduct_tax = ''; } else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') { - msgprint(frappe._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'")); + msgprint(__("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'")); d.add_deduct_tax = ''; } } @@ -91,15 +91,15 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.category && d.charge_type) { - msgprint(frappe._("Please select Category first")); + msgprint(__("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')) { - msgprint(frappe._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); + msgprint(__("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')) { - msgprint(frappe._("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")); + msgprint(__("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 = ''; } @@ -116,16 +116,16 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.row_id) { - msgprint(frappe._("Please select Charge Type first")); + msgprint(__("Please select Charge Type first")); d.row_id = ''; } else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) { - msgprint(frappe._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'")); + msgprint(__("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){ - msgprint(frappe._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); + msgprint(__("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); d.row_id = ''; } } @@ -156,7 +156,7 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.rate) { - msgprint(frappe._("Please select Charge Type first")); + msgprint(__("Please select Charge Type first")); d.rate = ''; } validated = false; @@ -167,14 +167,14 @@ cur_frm.cscript.tax_amount = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.tax_amount) { - msgprint(frappe._("Please select Charge Type first")); + msgprint(__("Please select Charge Type first")); d.tax_amount = ''; } else if(d.charge_type && d.tax_amount) { - msgprint(frappe._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); + msgprint(__("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); d.tax_amount = ''; } validated = false; refresh_field('tax_amount', d.name, 'other_charges'); -} \ No newline at end of file +} diff --git a/erpnext/accounts/doctype/sales_invoice/pos.js b/erpnext/accounts/doctype/sales_invoice/pos.js index ff996cc107..a0da5e65ae 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.js +++ b/erpnext/accounts/doctype/sales_invoice/pos.js @@ -523,7 +523,7 @@ erpnext.POS = Class.extend({ me.add_to_cart(r.message[0][0].name); } else - msgprint(frappe._("Invalid Barcode")); + msgprint(__("Invalid Barcode")); me.refresh(); } @@ -564,7 +564,7 @@ erpnext.POS = Class.extend({ var mode_of_payment = []; if (no_of_items == 0) - msgprint(frappe._("Payment cannot be made for empty cart")); + msgprint(__("Payment cannot be made for empty cart")); else { frappe.call({ method: 'erpnext.accounts.doctype.sales_invoice.pos.get_mode_of_payment', diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index a87677604e..eeb2425b0b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -63,7 +63,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.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone'); + cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone'); if(cint(doc.update_stock)!=1) { // show Make Delivery Note button only if Sales Invoice is not created from Delivery Note @@ -74,11 +74,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte }); if(!from_delivery_note) - cur_frm.appframe.add_primary_action(frappe._('Make Delivery'), cur_frm.cscript['Make Delivery Note']) + cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note']) } if(doc.outstanding_amount!=0) - cur_frm.appframe.add_primary_action(frappe._('Make Payment Entry'), cur_frm.cscript.make_bank_voucher); + cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher); } // Show buttons only when pos view is active @@ -89,7 +89,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte }, sales_order_btn: function() { - this.$sales_order_btn = cur_frm.appframe.add_primary_action(frappe._('From Sales Order'), + this.$sales_order_btn = cur_frm.appframe.add_primary_action(__('From Sales Order'), function() { frappe.model.map_current_doc({ method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice", @@ -106,7 +106,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte }, delivery_note_btn: function() { - this.$delivery_note_btn = cur_frm.appframe.add_primary_action(frappe._('From Delivery Note'), + this.$delivery_note_btn = cur_frm.appframe.add_primary_action(__('From Delivery Note'), function() { frappe.model.map_current_doc({ method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice", @@ -134,7 +134,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte if(cint(this.frm.doc.is_pos)) { if(!this.frm.doc.company) { this.frm.set_value("is_pos", 0); - msgprint(frappe._("Please specify Company to proceed")); + msgprint(__("Please specify Company to proceed")); } else { var me = this; return this.frm.call({ diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js index f4b425b84b..d465ff13a4 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_master/sales_taxes_and_charges_master.js @@ -100,7 +100,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')) { - msgprint(frappe._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); + msgprint(__("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row")); d.charge_type = ''; } validated = false; @@ -113,16 +113,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) { - msgprint(frappe._("Please select Charge Type first")); + msgprint(__("Please select Charge Type first")); d.row_id = ''; } else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) { - msgprint(frappe._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'")); + msgprint(__("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){ - msgprint(frappe._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); + msgprint(__("You cannot Enter Row no. greater than or equal to current row no. for this Charge type")); d.row_id = ''; } } @@ -152,7 +152,7 @@ cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = f cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if(!d.charge_type && d.rate) { - msgprint(frappe._("Please select Charge Type first")); + msgprint(__("Please select Charge Type first")); d.rate = ''; } validated = false; @@ -162,11 +162,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) { - msgprint(frappe._("Please select Charge Type first")); + msgprint(__("Please select Charge Type first")); d.tax_amount = ''; } else if(d.charge_type && d.tax_amount) { - msgprint(frappe._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate")); + msgprint(__("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/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js index e68e43c807..68ecb2b186 100644 --- a/erpnext/accounts/page/accounts_browser/accounts_browser.js +++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js @@ -20,30 +20,30 @@ pscript['onload_Accounts Browser'] = function(wrapper){ .css({"margin-bottom": "15px", "min-height": "200px"}) .appendTo(main), help_area = $('
'+ - '

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

'+ + '

'+__('Quick Help')+'

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

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

').appendTo(main); + '

'+__('Please setup your chart of accounts before you start Accounting Entries')+'

').appendTo(main); if (frappe.boot.user.can_create.indexOf("Company") !== -1) { - wrapper.appframe.add_button(frappe._('New Company'), function() { newdoc('Company'); }, + wrapper.appframe.add_button(__('New Company'), function() { newdoc('Company'); }, 'icon-plus'); } @@ -184,21 +184,21 @@ erpnext.AccountsChart = Class.extend({ // the dialog var d = new frappe.ui.Dialog({ - title:frappe._('New Account'), + title:__('New Account'), fields: [ - {fieldtype:'Data', fieldname:'account_name', label:frappe._('New Account Name'), reqd:true, - description: frappe._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+ - frappe._("they are created automatically from the Customer and Supplier master")}, - {fieldtype:'Select', fieldname:'group_or_ledger', label:frappe._('Group or Ledger'), - options:'Group\nLedger', description: frappe._('Further accounts can be made under Groups,')+ - frappe._('but entries can be made against Ledger')}, - {fieldtype:'Select', fieldname:'account_type', label:frappe._('Account Type'), + {fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true, + description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+ + __("they are created automatically from the Customer and Supplier master")}, + {fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'), + options:'Group\nLedger', description: __('Further accounts can be made under Groups,')+ + __('but entries can be made against Ledger')}, + {fieldtype:'Select', fieldname:'account_type', label:__('Account Type'), options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable', 'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account', 'Income Account', 'Tax', 'Chargeable'].join('\n'), - description: frappe._("Optional. This setting will be used to filter in various transactions.") }, - {fieldtype:'Float', fieldname:'tax_rate', label:frappe._('Tax Rate')}, - {fieldtype:'Button', fieldname:'create_new', label:frappe._('Create New') } + description: __("Optional. This setting will be used to filter in various transactions.") }, + {fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate')}, + {fieldtype:'Button', fieldname:'create_new', label:__('Create New') } ] }) @@ -261,13 +261,13 @@ erpnext.AccountsChart = Class.extend({ var me = this; // the dialog var d = new frappe.ui.Dialog({ - title:frappe._('New Cost Center'), + title:__('New Cost Center'), fields: [ - {fieldtype:'Data', fieldname:'cost_center_name', label:frappe._('New Cost Center Name'), reqd:true}, - {fieldtype:'Select', fieldname:'group_or_ledger', label:frappe._('Group or Ledger'), - options:'Group\nLedger', description:frappe._('Further accounts can be made under Groups,')+ - frappe._('but entries can be made against Ledger')}, - {fieldtype:'Button', fieldname:'create_new', label:frappe._('Create New') } + {fieldtype:'Data', fieldname:'cost_center_name', label:__('New Cost Center Name'), reqd:true}, + {fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'), + options:'Group\nLedger', description:__('Further accounts can be made under Groups,')+ + __('but entries can be made against Ledger')}, + {fieldtype:'Button', fieldname:'create_new', label:__('Create New') } ] }); diff --git a/erpnext/accounts/page/financial_analytics/financial_analytics.js b/erpnext/accounts/page/financial_analytics/financial_analytics.js index 27ca19dcbf..9e4d19e87e 100644 --- a/erpnext/accounts/page/financial_analytics/financial_analytics.js +++ b/erpnext/accounts/page/financial_analytics/financial_analytics.js @@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/account_tree_grid.js"); frappe.pages['financial-analytics'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Financial Analytics'), + title: __('Financial Analytics'), single_column: true }); erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics'); @@ -17,7 +17,7 @@ frappe.pages['financial-analytics'].onload = function(wrapper) { erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({ filters: [ { - fieldtype:"Select", label: frappe._("PL or BS"), + fieldtype:"Select", label: __("PL or BS"), options:["Profit and Loss", "Balance Sheet"], filter: function(val, item, opts, me) { if(item._show) return true; @@ -31,31 +31,31 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({ } }, { - fieldtype:"Select", label: frappe._("Company"), + fieldtype:"Select", label: __("Company"), link:"Company", default_value: "Select Company...", filter: function(val, item, opts) { return item.company == val || val == opts.default_value || item._show; } }, - {fieldtype:"Select", label: frappe._("Fiscal Year"), link:"Fiscal Year", + {fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype:"Date", label: frappe._("From Date")}, - {fieldtype:"Label", label: frappe._("To")}, - {fieldtype:"Date", label: frappe._("To Date")}, - {fieldtype:"Select", label: frappe._("Range"), + {fieldtype:"Date", label: __("From Date")}, + {fieldtype:"Label", label: __("To")}, + {fieldtype:"Date", label: __("To Date")}, + {fieldtype:"Select", label: __("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"}, - {fieldtype:"Button", label: frappe._("Reset Filters")} + {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"}, + {fieldtype:"Button", label: __("Reset Filters")} ], setup_columns: function() { var std_columns = [ - {id: "check", name: frappe._("Plot"), field: "check", width: 30, + {id: "check", name: __("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "name", name: frappe._("Account"), field: "name", width: 300, + {id: "name", name: __("Account"), field: "name", width: 300, formatter: this.tree_formatter}, - {id: "opening_dr", name: frappe._("Opening (Dr)"), field: "opening_dr", + {id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr", hidden: true, formatter: this.currency_formatter, balance_type: "Dr"}, - {id: "opening_cr", name: frappe._("Opening (Cr)"), field: "opening_cr", + {id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr", hidden: true, formatter: this.currency_formatter, balance_type: "Cr"}, ]; diff --git a/erpnext/accounts/page/trial_balance/trial_balance.js b/erpnext/accounts/page/trial_balance/trial_balance.js index 80a4aa8d6c..95818093f6 100644 --- a/erpnext/accounts/page/trial_balance/trial_balance.js +++ b/erpnext/accounts/page/trial_balance/trial_balance.js @@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/account_tree_grid.js"); frappe.pages['trial-balance'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Trial Balance'), + title: __('Trial Balance'), single_column: true }); var TrialBalance = erpnext.AccountTreeGrid.extend({ @@ -18,7 +18,7 @@ frappe.pages['trial-balance'].onload = function(wrapper) { this.wrapper.bind("make", function() { $('
' + - frappe._("With period closing entry") + '
') + __("With period closing entry") + '') .appendTo(me.wrapper) .find("input").click(function() { me.refresh(); }); }); diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.js b/erpnext/accounts/report/accounts_payable/accounts_payable.js index f85e179bb6..18765f5fff 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.js +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.js @@ -5,14 +5,14 @@ frappe.query_reports["Accounts Payable"] = { "filters": [ { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") }, { "fieldname":"account", - "label": frappe._("Account"), + "label": __("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -29,13 +29,13 @@ frappe.query_reports["Accounts Payable"] = { }, { "fieldname":"report_date", - "label": frappe._("Date"), + "label": __("Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"ageing_based_on", - "label": frappe._("Ageing Based On"), + "label": __("Ageing Based On"), "fieldtype": "Select", "options": 'Posting Date' + NEWLINE + 'Due Date', "default": "Posting Date" diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js index c08c7ff88a..2c0f735f6c 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.js +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.js @@ -5,14 +5,14 @@ frappe.query_reports["Accounts Receivable"] = { "filters": [ { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") }, { "fieldname":"account", - "label": frappe._("Account"), + "label": __("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -29,13 +29,13 @@ frappe.query_reports["Accounts Receivable"] = { }, { "fieldname":"report_date", - "label": frappe._("Date"), + "label": __("Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"ageing_based_on", - "label": frappe._("Ageing Based On"), + "label": __("Ageing Based On"), "fieldtype": "Select", "options": 'Posting Date' + NEWLINE + 'Due Date', "default": "Posting Date" diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js index 4813f91976..61fe9bbf1f 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.js @@ -5,20 +5,20 @@ frappe.query_reports["Bank Clearance Summary"] = { "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": frappe._("Bank Account"), + "label": __("Bank Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js index baacfe58c6..3d3b2f5599 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.js @@ -5,7 +5,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = { "filters": [ { "fieldname":"account", - "label": frappe._("Bank Account"), + "label": __("Bank Account"), "fieldtype": "Link", "options": "Account", "reqd": 1, @@ -21,7 +21,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = { }, { "fieldname":"report_date", - "label": frappe._("Date"), + "label": __("Date"), "fieldtype": "Date", "default": get_today(), "reqd": 1 diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js index 6a9bba285e..fdd076c3a8 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.js +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.js @@ -5,21 +5,21 @@ frappe.query_reports["Budget Variance Report"] = { "filters": [ { fieldname: "fiscal_year", - label: frappe._("Fiscal Year"), + label: __("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: frappe._("Period"), + label: __("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "company", - label: frappe._("Company"), + label: __("Company"), fieldtype: "Link", options: "Company", default: frappe.defaults.get_user_default("company") diff --git a/erpnext/accounts/report/general_ledger/general_ledger.js b/erpnext/accounts/report/general_ledger/general_ledger.js index 48b1f85c97..b4f283e08a 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.js +++ b/erpnext/accounts/report/general_ledger/general_ledger.js @@ -5,7 +5,7 @@ frappe.query_reports["General Ledger"] = { "filters": [ { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company"), @@ -13,7 +13,7 @@ frappe.query_reports["General Ledger"] = { }, { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), "reqd": 1, @@ -21,7 +21,7 @@ frappe.query_reports["General Ledger"] = { }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": frappe.datetime.get_today(), "reqd": 1, @@ -32,7 +32,7 @@ frappe.query_reports["General Ledger"] = { }, { "fieldname":"account", - "label": frappe._("Account"), + "label": __("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -47,18 +47,18 @@ frappe.query_reports["General Ledger"] = { }, { "fieldname":"voucher_no", - "label": frappe._("Voucher No"), + "label": __("Voucher No"), "fieldtype": "Data", }, { "fieldname":"group_by_voucher", - "label": frappe._("Group by Voucher"), + "label": __("Group by Voucher"), "fieldtype": "Check", "default": 1 }, { "fieldname":"group_by_account", - "label": frappe._("Group by Account"), + "label": __("Group by Account"), "fieldtype": "Check", } ] diff --git a/erpnext/accounts/report/gross_profit/gross_profit.js b/erpnext/accounts/report/gross_profit/gross_profit.js index f13561677a..926530e448 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.js +++ b/erpnext/accounts/report/gross_profit/gross_profit.js @@ -5,20 +5,20 @@ frappe.query_reports["Gross Profit"] = { "filters": [ { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") }, { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.defaults.get_user_default("year_start_date") }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": frappe.defaults.get_user_default("year_end_date") }, diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js index 9c2f5fbeb1..e2e0287be8 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js @@ -5,26 +5,26 @@ frappe.query_reports["Item-wise Purchase Register"] = { "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname": "item_code", - "label": frappe._("Item"), + "label": __("Item"), "fieldtype": "Link", "options": "Item", }, { "fieldname":"account", - "label": frappe._("Account"), + "label": __("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -41,7 +41,7 @@ frappe.query_reports["Item-wise Purchase Register"] = { }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js index af6c22434a..09ce2fbb0d 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js @@ -5,20 +5,20 @@ frappe.query_reports["Item-wise Sales Register"] = frappe.query_reports["Sales R "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.defaults.get_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": frappe._("Account"), + "label": __("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -35,7 +35,7 @@ frappe.query_reports["Item-wise Sales Register"] = frappe.query_reports["Sales R }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js index 768b8e2f9e..d9a05c9574 100644 --- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js +++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.js @@ -5,26 +5,26 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = { "filters": [ { fieldname: "from_date", - label: frappe._("From Date"), + label: __("From Date"), fieldtype: "Date", default: frappe.defaults.get_user_default("year_start_date"), }, { fieldname:"to_date", - label: frappe._("To Date"), + label: __("To Date"), fieldtype: "Date", default: get_today() }, { fieldname:"payment_type", - label: frappe._("Payment Type"), + label: __("Payment Type"), fieldtype: "Select", options: "Incoming\nOutgoing", default: "Incoming" }, { fieldname:"account", - label: frappe._("Account"), + label: __("Account"), fieldtype: "Link", options: "Account", get_query: function() { @@ -39,7 +39,7 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = { }, { fieldname:"company", - label: frappe._("Company"), + label: __("Company"), fieldtype: "Link", options: "Company", default: frappe.defaults.get_user_default("company") diff --git a/erpnext/accounts/report/purchase_register/purchase_register.js b/erpnext/accounts/report/purchase_register/purchase_register.js index 93d1b8af25..b55358430f 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.js +++ b/erpnext/accounts/report/purchase_register/purchase_register.js @@ -5,20 +5,20 @@ frappe.query_reports["Purchase Register"] = { "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.defaults.get_user_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": frappe._("Account"), + "label": __("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -35,7 +35,7 @@ frappe.query_reports["Purchase Register"] = { }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/accounts/report/sales_register/sales_register.js b/erpnext/accounts/report/sales_register/sales_register.js index cef7299195..976e7533ac 100644 --- a/erpnext/accounts/report/sales_register/sales_register.js +++ b/erpnext/accounts/report/sales_register/sales_register.js @@ -5,20 +5,20 @@ frappe.query_reports["Sales Register"] = { "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.defaults.get_default("year_start_date"), "width": "80" }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": get_today() }, { "fieldname":"account", - "label": frappe._("Account"), + "label": __("Account"), "fieldtype": "Link", "options": "Account", "get_query": function() { @@ -35,7 +35,7 @@ frappe.query_reports["Sales Register"] = { }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js index e18b3ef4e0..fbc6d5d6b3 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.js +++ b/erpnext/buying/doctype/purchase_common/purchase_common.js @@ -300,7 +300,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ $.each(fields_list, function(i, fname) { var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname]; if(docfield) { - var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, ""); + var label = __(docfield.label || "").replace(/\([^\)]*\)/g, ""); field_label_map[fname] = label.trim() + " (" + currency + ")"; } }); @@ -347,7 +347,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({ $.each(fields_list, function(i, fname) { var docfield = frappe.meta.docfield_map[grid_doctype][fname]; if(docfield) { - var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, ""); + var label = __(docfield.label || "").replace(/\([^\)]*\)/g, ""); field_label_map[grid_doctype + "-" + fname] = label.trim() + " (" + currency + ")"; } diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 1dfb78e00d..57d14b68f6 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -18,25 +18,25 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( this.frm.dashboard.reset(); if(doc.docstatus == 1 && doc.status != 'Stopped'){ - cur_frm.dashboard.add_progress(cint(doc.per_received) + frappe._("% Received"), + cur_frm.dashboard.add_progress(cint(doc.per_received) + __("% Received"), doc.per_received); - cur_frm.dashboard.add_progress(cint(doc.per_billed) + frappe._("% Billed"), + cur_frm.dashboard.add_progress(cint(doc.per_billed) + __("% Billed"), doc.per_billed); cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms); if(flt(doc.per_received, 2) < 100) - cur_frm.add_custom_button(frappe._('Make Purchase Receipt'), this.make_purchase_receipt); + cur_frm.add_custom_button(__('Make Purchase Receipt'), this.make_purchase_receipt); if(flt(doc.per_billed, 2) < 100) - cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_purchase_invoice); + cur_frm.add_custom_button(__('Make Invoice'), this.make_purchase_invoice); if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) - cur_frm.add_custom_button(frappe._('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation"); + cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation"); } else if(doc.docstatus===0) { cur_frm.cscript.add_from_mappers(); } if(doc.docstatus == 1 && doc.status == 'Stopped') - cur_frm.add_custom_button(frappe._('Unstop Purchase Order'), + cur_frm.add_custom_button(__('Unstop Purchase Order'), cur_frm.cscript['Unstop Purchase Order'], "icon-check"); }, @@ -55,7 +55,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( }, add_from_mappers: function() { - cur_frm.add_custom_button(frappe._('From Material Request'), + cur_frm.add_custom_button(__('From Material Request'), function() { frappe.model.map_current_doc({ method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order", @@ -71,7 +71,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( } ); - cur_frm.add_custom_button(frappe._('From Supplier Quotation'), + cur_frm.add_custom_button(__('From Supplier Quotation'), function() { frappe.model.map_current_doc({ method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order", @@ -85,7 +85,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( } ); - cur_frm.add_custom_button(frappe._('For Supplier'), + cur_frm.add_custom_button(__('For Supplier'), function() { frappe.model.map_current_doc({ method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier", @@ -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(frappe._("Do you really want to STOP ") + doc.name); + var check = confirm(__("Do you really want to STOP ") + doc.name); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs':doc}, 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(frappe._("Do you really want to UNSTOP ") + doc.name); + var check = confirm(__("Do you really want to UNSTOP ") + doc.name); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted', 'docs':doc}, function(r,rt) { diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js index 05288c3882..d6bff6d9b8 100644 --- a/erpnext/buying/doctype/supplier/supplier.js +++ b/erpnext/buying/doctype/supplier/supplier.js @@ -45,9 +45,9 @@ cur_frm.cscript.make_dashboard = function(doc) { callback: function(r) { if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) { cur_frm.dashboard.set_headline( - frappe._("Total Billing This Year: ") + "" + __("Total Billing This Year: ") + "" + format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company)) - + ' / ' + frappe._("Unpaid") + ": " + + ' / ' + __("Unpaid") + ": " + format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company)) + ''); } @@ -67,7 +67,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: frappe._('No addresses created'), + no_results_message: __('No addresses created'), render_row: cur_frm.cscript.render_address_row, }); // note: render_address_row is defined in contact_control.js @@ -85,7 +85,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: frappe._('No contacts created'), + no_results_message: __('No contacts created'), render_row: cur_frm.cscript.render_contact_row, }); // note: render_contact_row is defined in contact_control.js diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js index b7802e8746..d43fab072a 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js @@ -16,10 +16,10 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext this._super(); if (this.frm.doc.docstatus === 1) { - cur_frm.add_custom_button(frappe._("Make Purchase Order"), this.make_purchase_order); + cur_frm.add_custom_button(__("Make Purchase Order"), this.make_purchase_order); } else if (this.frm.doc.docstatus===0) { - cur_frm.add_custom_button(frappe._('From Material Request'), + cur_frm.add_custom_button(__('From Material Request'), function() { frappe.model.map_current_doc({ method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation", diff --git a/erpnext/buying/page/purchase_analytics/purchase_analytics.js b/erpnext/buying/page/purchase_analytics/purchase_analytics.js index 328345b89d..614b40d387 100644 --- a/erpnext/buying/page/purchase_analytics/purchase_analytics.js +++ b/erpnext/buying/page/purchase_analytics/purchase_analytics.js @@ -4,7 +4,7 @@ frappe.pages['purchase-analytics'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Purchase Analytics'), + title: __('Purchase Analytics'), single_column: true }); @@ -18,7 +18,7 @@ frappe.pages['purchase-analytics'].onload = function(wrapper) { erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({ init: function(wrapper) { this._super({ - title: frappe._("Purchase Analytics"), + title: __("Purchase Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -31,7 +31,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({ this.tree_grids = { "Supplier Type": { - label: frappe._("Supplier Type / Supplier"), + label: __("Supplier Type / Supplier"), show: true, item_key: "supplier", parent_field: "parent_supplier_type", @@ -44,7 +44,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({ } }, "Supplier": { - label: frappe._("Supplier"), + label: __("Supplier"), show: false, item_key: "supplier", formatter: function(item) { @@ -74,7 +74,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({ this.tree_grid = this.tree_grids[this.tree_type]; var std_columns = [ - {id: "check", name: frappe._("Plot"), field: "check", width: 30, + {id: "check", name: __("Plot"), field: "check", width: 30, formatter: this.check_formatter}, {id: "name", name: this.tree_grid.label, field: "name", width: 300, formatter: this.tree_formatter}, @@ -86,23 +86,23 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: frappe._("Tree Type"), options:["Supplier Type", "Supplier", + {fieldtype:"Select", label: __("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: frappe._("Based On"), options:["Purchase Invoice", + {fieldtype:"Select", label: __("Based On"), options:["Purchase Invoice", "Purchase Order", "Purchase Receipt"]}, - {fieldtype:"Select", label: frappe._("Value or Qty"), options:["Value", "Quantity"]}, - {fieldtype:"Select", label: frappe._("Company"), link:"Company", + {fieldtype:"Select", label: __("Value or Qty"), options:["Value", "Quantity"]}, + {fieldtype:"Select", label: __("Company"), link:"Company", default_value: "Select Company..."}, - {fieldtype:"Date", label: frappe._("From Date")}, - {fieldtype:"Label", label: frappe._("To")}, - {fieldtype:"Date", label: frappe._("To Date")}, - {fieldtype:"Select", label: frappe._("Range"), + {fieldtype:"Date", label: __("From Date")}, + {fieldtype:"Label", label: __("To")}, + {fieldtype:"Date", label: __("To Date")}, + {fieldtype:"Select", label: __("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"}, - {fieldtype:"Button", label: frappe._("Reset Filters")} + {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"}, + {fieldtype:"Button", label: __("Reset Filters")} ], setup_filters: function() { var me = this; @@ -130,18 +130,18 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({ }) frappe.report_dump.data["Supplier Type"] = [{ - name: frappe._("All Supplier Types"), + name: __("All Supplier Types"), id: "All Supplier Types", }].concat(frappe.report_dump.data["Supplier Type"]); frappe.report_dump.data["Supplier"].push({ - name: frappe._("Not Set"), + name: __("Not Set"), parent_supplier_type: "All Supplier Types", id: "Not Set", }); frappe.report_dump.data["Item"].push({ - name: frappe._("Not Set"), + name: __("Not Set"), parent_item_group: "All Item Groups", id: "Not Set", }); diff --git a/erpnext/home/page/activity/activity.js b/erpnext/home/page/activity/activity.js index fe0d70b83e..2494885ad9 100644 --- a/erpnext/home/page/activity/activity.js +++ b/erpnext/home/page/activity/activity.js @@ -4,7 +4,7 @@ frappe.pages['activity'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._("Activity"), + title: __("Activity"), single_column: true }) wrapper.appframe.add_module_icon("Activity"); @@ -24,7 +24,7 @@ frappe.pages['activity'].onload = function(wrapper) { // Build Report Button if(frappe.boot.user.can_get_report.indexOf("Feed")!=-1) { - wrapper.appframe.add_primary_action(frappe._('Build Report'), function() { + wrapper.appframe.add_primary_action(__('Build Report'), function() { frappe.set_route('Report', "Feed"); }, 'icon-th') } @@ -47,7 +47,7 @@ erpnext.ActivityFeed = Class.extend({ // feedtype if(!data.feed_type) { - data.feed_type = frappe._(data.doc_type); + data.feed_type = __(data.doc_type); data.add_class = "label-info"; data.onclick = repl('onclick="window.location.href=\'#!List/%(feed_type)s\';"', data) } diff --git a/erpnext/hr/doctype/appraisal/appraisal.js b/erpnext/hr/doctype/appraisal/appraisal.js index a87607c03f..3cd7adb0c7 100644 --- a/erpnext/hr/doctype/appraisal/appraisal.js +++ b/erpnext/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(frappe._("Score must be less than or equal to 5")); + msgprint(__("Score must be less than or equal to 5")); d.score = 0; refresh_field('score', d.name, 'appraisal_details'); } diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js index 72f540437f..7dccf14d70 100644 --- a/erpnext/hr/doctype/employee/employee.js +++ b/erpnext/hr/doctype/employee/employee.js @@ -21,7 +21,7 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({ var me = this; erpnext.hide_naming_series(); if(!this.frm.doc.__islocal) { - cur_frm.add_custom_button(frappe._('Make Salary Structure'), function() { + cur_frm.add_custom_button(__('Make Salary Structure'), function() { me.make_salary_structure(this); }); } }, @@ -61,8 +61,8 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({ var me = this; this.validate_salary_structure(btn, function(r) { if(r.message) { - msgprint(frappe._("Employee") + ' "' + me.frm.doc.name + '": ' - + frappe._("An active Salary Structure already exists. \ + msgprint(__("Employee") + ' "' + me.frm.doc.name + '": ' + + __("An active Salary Structure already exists. \ If you want to create new one, please ensure that no active \ Salary Structure exists for this Employee. \ Go to the active Salary Structure and set \"Is Active\" = \"No\"")); diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.js b/erpnext/hr/doctype/expense_claim/expense_claim.js index a399d5f0aa..fbc5994b42 100644 --- a/erpnext/hr/doctype/expense_claim/expense_claim.js +++ b/erpnext/hr/doctype/expense_claim/expense_claim.js @@ -92,26 +92,26 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){ cur_frm.savesubmit(); if(doc.docstatus==1 && frappe.model.can_create("Journal Voucher")) - cur_frm.add_custom_button(frappe._("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher); + cur_frm.add_custom_button(__("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(frappe._("Fill the form and save it")) + cur_frm.set_intro(__("Fill the form and save it")) } else { if(doc.docstatus==0 && doc.approval_status=="Draft") { if(user==doc.exp_approver) { - cur_frm.set_intro(frappe._("You are the Expense Approver for this record. Please Update the 'Status' and Save")); + cur_frm.set_intro(__("You are the Expense Approver for this record. Please Update the 'Status' and Save")); } else { - cur_frm.set_intro(frappe._("Expense Claim is pending approval. Only the Expense Approver can update status.")); + cur_frm.set_intro(__("Expense Claim is pending approval. Only the Expense Approver can update status.")); } } else { if(doc.approval_status=="Approved") { - cur_frm.set_intro(frappe._("Expense Claim has been approved.")); + cur_frm.set_intro(__("Expense Claim has been approved.")); } else if(doc.approval_status=="Rejected") { - cur_frm.set_intro(frappe._("Expense Claim has been rejected.")); + cur_frm.set_intro(__("Expense Claim has been rejected.")); } } } diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.js b/erpnext/hr/doctype/job_applicant/job_applicant.js index 6186535fdc..759b9d77ae 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant.js +++ b/erpnext/hr/doctype/job_applicant/job_applicant.js @@ -6,8 +6,8 @@ cur_frm.cscript = { onload: function(doc, dt, dn) { if(in_list(user_roles,'System Manager')) { - cur_frm.footer.help_area.innerHTML = '

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

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

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

'; } }, refresh: function(doc) { diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js index 2a6223af44..695ae5515c 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.js +++ b/erpnext/hr/doctype/leave_application/leave_application.js @@ -31,14 +31,14 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } cur_frm.set_intro(""); if(doc.__islocal && !in_list(user_roles, "HR User")) { - cur_frm.set_intro(frappe._("Fill the form and save it")) + cur_frm.set_intro(__("Fill the form and save it")) } else { if(doc.docstatus==0 && doc.status=="Open") { if(user==doc.leave_approver) { - cur_frm.set_intro(frappe._("You are the Leave Approver for this record. Please Update the 'Status' and Save")); + cur_frm.set_intro(__("You are the Leave Approver for this record. Please Update the 'Status' and Save")); cur_frm.toggle_enable("status", true); } else { - cur_frm.set_intro(frappe._("This Leave Application is pending approval. Only the Leave Apporver can update status.")) + cur_frm.set_intro(__("This Leave Application is pending approval. Only the Leave Apporver can update status.")) cur_frm.toggle_enable("status", false); if(!doc.__islocal) { cur_frm.frm_head.appframe.set_title_right(""); @@ -46,12 +46,12 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } } else { if(doc.status=="Approved") { - cur_frm.set_intro(frappe._("Leave application has been approved.")); + cur_frm.set_intro(__("Leave application has been approved.")); if(cur_frm.doc.docstatus==0) { - cur_frm.set_intro(frappe._("Please submit to update Leave Balance.")); + cur_frm.set_intro(__("Please submit to update Leave Balance.")); } } else if(doc.status=="Rejected") { - cur_frm.set_intro(frappe._("Leave application has been rejected.")); + cur_frm.set_intro(__("Leave application has been rejected.")); } } } @@ -85,7 +85,7 @@ cur_frm.cscript.from_date = function(doc, dt, dn) { cur_frm.cscript.to_date = function(doc, dt, dn) { if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){ - msgprint(frappe._("To Date should be same as From Date for Half Day leave")); + msgprint(__("To Date should be same as From Date for Half Day leave")); set_multiple(dt,dn,{to_date:doc.from_date}); } cur_frm.cscript.calculate_total_days(doc, dt, dn); diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js index 16ede6782d..4497b63430 100644 --- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js +++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js @@ -13,7 +13,7 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) { function(r, rt) { var doc = locals[cdt][cdn]; if (r.message) { - msgprint(frappe._("To date cannot be before from date")); + msgprint(__("To date cannot be before from date")); doc.to_date = ''; refresh_field('to_date'); } diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.js b/erpnext/hr/doctype/salary_manager/salary_manager.js index 3745ee5a94..55ab920657 100644 --- a/erpnext/hr/doctype/salary_manager/salary_manager.js +++ b/erpnext/hr/doctype/salary_manager/salary_manager.js @@ -5,7 +5,7 @@ var display_activity_log = function(msg) { if(!pscript.ss_html) pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div'); pscript.ss_html.innerHTML = - '
'+frappe._("Activity Log:")+'
'+msg+'
'; + '
'+__("Activity Log:")+'
'+msg+'
'; } //Create salary slip @@ -19,7 +19,7 @@ cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) { } cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) { - var check = confirm(frappe._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ frappe._(" and fiscal year : ")+doc.fiscal_year); + var check = confirm(__("Do you really want to Submit all Salary Slip for month : ") + doc.month+ __(" and fiscal year : ")+doc.fiscal_year); if(check){ var callback = function(r, rt){ if (r.message) @@ -33,7 +33,7 @@ cur_frm.cscript.make_bank_voucher = function(doc,cdt,cdn){ if(doc.company && doc.month && doc.fiscal_year){ cur_frm.cscript.make_jv(doc, cdt, cdn); } else { - msgprint(frappe._("Company, Month and Fiscal Year is mandatory")); + msgprint(__("Company, Month and Fiscal Year is mandatory")); } } @@ -42,8 +42,8 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) { var jv = frappe.model.make_new_doc_and_get_name('Journal Voucher'); jv = locals['Journal Voucher'][jv]; jv.voucher_type = 'Bank Voucher'; - jv.user_remark = frappe._('Payment of salary for the month: ') + doc.month + - frappe._(' and fiscal year: ') + doc.fiscal_year; + jv.user_remark = __('Payment of salary for the month: ') + doc.month + + __(' and fiscal year: ') + doc.fiscal_year; jv.fiscal_year = doc.fiscal_year; jv.company = doc.company; jv.posting_date = dateutil.obj_to_str(new Date()); diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js index 0cfb6c4437..e4235eac22 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure.js +++ b/erpnext/hr/doctype/salary_structure/salary_structure.js @@ -12,7 +12,7 @@ cur_frm.cscript.onload = function(doc, dt, dn){ cur_frm.cscript.refresh = function(doc, dt, dn){ if((!doc.__islocal) && (doc.is_active == 'Yes')){ - cur_frm.add_custom_button(frappe._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']); + cur_frm.add_custom_button(__('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']); } cur_frm.toggle_enable('employee', doc.__islocal); diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.js b/erpnext/hr/doctype/upload_attendance/upload_attendance.js index 404ba52f44..7606289f22 100644 --- a/erpnext/hr/doctype/upload_attendance/upload_attendance.js +++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.js @@ -17,7 +17,7 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({ get_template:function() { if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) { - msgprint(frappe._("Attendance From Date and Attendance To Date is mandatory")); + msgprint(__("Attendance From Date and Attendance To Date is mandatory")); return; } window.location.href = repl(frappe.request.url + @@ -56,10 +56,10 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({ return v; }); - r.messages = ["

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

"] + r.messages = ["

"+__("Import Failed!")+"

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

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

"]. + r.messages = ["

"+__("Import Successful!")+"

"]. concat(r.message.messages) } diff --git a/erpnext/hr/report/employee_birthday/employee_birthday.js b/erpnext/hr/report/employee_birthday/employee_birthday.js index 9af3f3973f..d8eb337245 100644 --- a/erpnext/hr/report/employee_birthday/employee_birthday.js +++ b/erpnext/hr/report/employee_birthday/employee_birthday.js @@ -5,7 +5,7 @@ frappe.query_reports["Employee Birthday"] = { "filters": [ { "fieldname":"month", - "label": frappe._("Month"), + "label": __("Month"), "fieldtype": "Select", "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,7 +13,7 @@ frappe.query_reports["Employee Birthday"] = { }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js index ff0bdf437e..6030219739 100644 --- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js +++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.js @@ -5,14 +5,14 @@ frappe.query_reports["Employee Leave Balance"] = { "filters": [ { "fieldname":"fiscal_year", - "label": frappe._("Fiscal Year"), + "label": __("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": frappe.defaults.get_user_default("fiscal_year") }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js index f6a29fb3ea..efb85e6b8d 100644 --- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js +++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.js @@ -5,7 +5,7 @@ frappe.query_reports["Monthly Attendance Sheet"] = { "filters": [ { "fieldname":"month", - "label": frappe._("Month"), + "label": __("Month"), "fieldtype": "Select", "options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,20 +13,20 @@ frappe.query_reports["Monthly Attendance Sheet"] = { }, { "fieldname":"fiscal_year", - "label": frappe._("Fiscal Year"), + "label": __("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": sys_defaults.fiscal_year, }, { "fieldname":"employee", - "label": frappe._("Employee"), + "label": __("Employee"), "fieldtype": "Link", "options": "Employee" }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.js b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.js index cd9acccaeb..e570fd4751 100644 --- a/erpnext/hr/report/monthly_salary_register/monthly_salary_register.js +++ b/erpnext/hr/report/monthly_salary_register/monthly_salary_register.js @@ -5,7 +5,7 @@ frappe.query_reports["Monthly Salary Register"] = { "filters": [ { "fieldname":"month", - "label": frappe._("Month"), + "label": __("Month"), "fieldtype": "Select", "options": "\nJan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec", "default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", @@ -13,20 +13,20 @@ frappe.query_reports["Monthly Salary Register"] = { }, { "fieldname":"fiscal_year", - "label": frappe._("Fiscal Year"), + "label": __("Fiscal Year"), "fieldtype": "Link", "options": "Fiscal Year", "default": sys_defaults.fiscal_year, }, { "fieldname":"employee", - "label": frappe._("Employee"), + "label": __("Employee"), "fieldtype": "Link", "options": "Employee" }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/manufacturing/doctype/bom/bom.js b/erpnext/manufacturing/doctype/bom/bom.js index d0e9cc71f3..ac023f360d 100644 --- a/erpnext/manufacturing/doctype/bom/bom.js +++ b/erpnext/manufacturing/doctype/bom/bom.js @@ -6,7 +6,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){ cur_frm.toggle_enable("item", doc.__islocal); if (!doc.__islocal && doc.docstatus<2) { - cur_frm.add_custom_button(frappe._("Update Cost"), cur_frm.cscript.update_cost); + cur_frm.add_custom_button(__("Update Cost"), cur_frm.cscript.update_cost); } cur_frm.cscript.with_operations(doc); @@ -123,7 +123,7 @@ cur_frm.cscript.qty = function(doc, cdt, cdn) { cur_frm.cscript.rate = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if (d.bom_no) { - msgprint(frappe._("You can not change rate if BOM mentioned agianst any item")); + msgprint(__("You can not change rate if BOM mentioned agianst any item")); get_bom_material_detail(doc, cdt, cdn); } else { calculate_rm_cost(doc); diff --git a/erpnext/manufacturing/doctype/production_order/production_order.js b/erpnext/manufacturing/doctype/production_order/production_order.js index 59017319b9..0b014baf44 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.js +++ b/erpnext/manufacturing/doctype/production_order/production_order.js @@ -17,13 +17,13 @@ $.extend(cur_frm.cscript, { cfn_set_fields(doc, dt, dn); if (doc.docstatus === 0 && !doc.__islocal) { - this.frm.set_intro(frappe._("Submit this Production Order for further processing.")); + this.frm.set_intro(__("Submit this Production Order for further processing.")); } else if (doc.docstatus === 1) { var percent = flt(doc.produced_qty) / flt(doc.qty) * 100; - this.frm.dashboard.add_progress(cint(percent) + "% " + frappe._("Complete"), percent); + this.frm.dashboard.add_progress(cint(percent) + "% " + __("Complete"), percent); if(doc.status === "Stopped") { - this.frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop"); + this.frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop"); } } }, @@ -55,20 +55,20 @@ $.extend(cur_frm.cscript, { var cfn_set_fields = function(doc, dt, dn) { if (doc.docstatus == 1) { if (doc.status != 'Stopped' && doc.status != 'Completed') - cur_frm.add_custom_button(frappe._('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation"); + cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation"); else if (doc.status == 'Stopped') - cur_frm.add_custom_button(frappe._('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check"); + cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check"); if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){ - cur_frm.add_custom_button(frappe._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']); - cur_frm.add_custom_button(frappe._('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']); + cur_frm.add_custom_button(__('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']); + cur_frm.add_custom_button(__('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']); } } } cur_frm.cscript['Stop Production Order'] = function() { var doc = cur_frm.doc; - var check = confirm(frappe._("Do you really want to stop production order: " + doc.name)); + var check = confirm(__("Do you really want to stop production order: " + doc.name)); if (check) { return $c_obj(doc, 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();}); } @@ -76,7 +76,7 @@ cur_frm.cscript['Stop Production Order'] = function() { cur_frm.cscript['Unstop Production Order'] = function() { var doc = cur_frm.doc; - var check = confirm(frappe._("Do really want to unstop production order: " + doc.name)); + var check = confirm(__("Do really want to unstop production order: " + doc.name)); if (check) return $c_obj(doc, 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();}); } @@ -111,5 +111,5 @@ cur_frm.set_query("bom_no", function(doc) { query: "erpnext.controllers.queries.bom", filters: {item: cstr(doc.production_item)} } - } else msgprint(frappe._("Please enter Production Item first")); + } else msgprint(__("Please enter Production Item first")); }); \ No newline at end of file diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js index fc7abde06c..54aa9a2b57 100644 --- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js +++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.js @@ -44,7 +44,7 @@ cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function( query: "erpnext.controllers.queries.bom", filters:{'item': cstr(d.item_code)} } - } else msgprint(frappe._("Please enter Item first")); + } else msgprint(__("Please enter Item first")); } cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) { diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js index 46de4f004b..5d89986596 100644 --- a/erpnext/projects/doctype/project/project.js +++ b/erpnext/projects/doctype/project/project.js @@ -4,11 +4,11 @@ // show tasks cur_frm.cscript.refresh = function(doc) { if(!doc.__islocal) { - cur_frm.appframe.add_button(frappe._("Gantt Chart"), function() { + cur_frm.appframe.add_button(__("Gantt Chart"), function() { frappe.route_options = {"project": doc.name} frappe.set_route("Gantt", "Task"); }, "icon-tasks"); - cur_frm.add_custom_button(frappe._("Tasks"), function() { + cur_frm.add_custom_button(__("Tasks"), function() { frappe.route_options = {"project": doc.name} frappe.set_route("List", "Task"); }, "icon-list"); diff --git a/erpnext/projects/doctype/task/task_calendar.js b/erpnext/projects/doctype/task/task_calendar.js index 029a48f8d8..a9d3d6b566 100644 --- a/erpnext/projects/doctype/task/task_calendar.js +++ b/erpnext/projects/doctype/task/task_calendar.js @@ -6,7 +6,7 @@ frappe.views.calendar["Task"] = { "start": "exp_start_date", "end": "exp_end_date", "id": "name", - "title": frappe._("subject"), + "title": __("subject"), "allDay": "allDay" }, gantt: true, @@ -15,7 +15,7 @@ frappe.views.calendar["Task"] = { "fieldtype": "Link", "fieldname": "project", "options": "Project", - "label": frappe._("Project") + "label": __("Project") } ], get_events_method: "erpnext.projects.doctype.task.task.get_events" diff --git a/erpnext/projects/doctype/time_log/time_log_list.js b/erpnext/projects/doctype/time_log/time_log_list.js index af7f8ab13a..e56fc64f50 100644 --- a/erpnext/projects/doctype/time_log/time_log_list.js +++ b/erpnext/projects/doctype/time_log/time_log_list.js @@ -6,22 +6,22 @@ frappe.listview_settings['Time Log'] = { add_fields: ["`tabTime Log`.`status`", "`tabTime Log`.`billable`", "`tabTime Log`.`activity_type`"], selectable: true, onload: function(me) { - me.appframe.add_button(frappe._("Make Time Log Batch"), function() { + me.appframe.add_button(__("Make Time Log Batch"), function() { var selected = me.get_checked_items() || []; if(!selected.length) { - msgprint(frappe._("Please select Time Logs.")) + msgprint(__("Please select Time Logs.")) } // select only billable time logs for(var i in selected) { var d = selected[i]; if(!d.billable) { - msgprint(frappe._("Time Log is not billable") + ": " + d.name); + msgprint(__("Time Log is not billable") + ": " + d.name); return; } if(d.status!="Submitted") { - msgprint(frappe._("Time Log Status must be Submitted.")); + msgprint(__("Time Log Status must be Submitted.")); } } diff --git a/erpnext/projects/doctype/time_log_batch/time_log_batch.js b/erpnext/projects/doctype/time_log_batch/time_log_batch.js index 7f3a17e6ef..05e62df29a 100644 --- a/erpnext/projects/doctype/time_log_batch/time_log_batch.js +++ b/erpnext/projects/doctype/time_log_batch/time_log_batch.js @@ -18,14 +18,14 @@ cur_frm.set_query("time_log", "time_log_batch_details", function(doc) { $.extend(cur_frm.cscript, { refresh: function(doc) { cur_frm.set_intro({ - "Draft": frappe._("Select Time Logs and Submit to create a new Sales Invoice."), - "Submitted": frappe._("Click on 'Make Sales Invoice' button to create a new Sales Invoice."), - "Billed": frappe._("This Time Log Batch has been billed."), - "Cancelled": frappe._("This Time Log Batch has been cancelled.") + "Draft": __("Select Time Logs and Submit to create a new Sales Invoice."), + "Submitted": __("Click on 'Make Sales Invoice' button to create a new Sales Invoice."), + "Billed": __("This Time Log Batch has been billed."), + "Cancelled": __("This Time Log Batch has been cancelled.") }[doc.status]); if(doc.status=="Submitted") { - cur_frm.add_custom_button(frappe._("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() }, + cur_frm.add_custom_button(__("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() }, "icon-file-alt"); } }, diff --git a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.js b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.js index 11bd736f4e..16fb4d8728 100644 --- a/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.js +++ b/erpnext/projects/report/daily_time_log_summary/daily_time_log_summary.js @@ -5,13 +5,13 @@ frappe.query_reports["Daily Time Log Summary"] = { "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.datetime.get_today() }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": frappe.datetime.get_today() }, diff --git a/erpnext/public/js/account_tree_grid.js b/erpnext/public/js/account_tree_grid.js index ab5ce26c14..df39d3ffdd 100644 --- a/erpnext/public/js/account_tree_grid.js +++ b/erpnext/public/js/account_tree_grid.js @@ -37,39 +37,39 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({ }, setup_columns: function() { this.columns = [ - {id: "name", name: frappe._("Account"), field: "name", width: 300, cssClass: "cell-title", + {id: "name", name: __("Account"), field: "name", width: 300, cssClass: "cell-title", formatter: this.tree_formatter}, - {id: "opening_dr", name: frappe._("Opening (Dr)"), field: "opening_dr", width: 100, + {id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr", width: 100, formatter: this.currency_formatter}, - {id: "opening_cr", name: frappe._("Opening (Cr)"), field: "opening_cr", width: 100, + {id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr", width: 100, formatter: this.currency_formatter}, - {id: "debit", name: frappe._("Debit"), field: "debit", width: 100, + {id: "debit", name: __("Debit"), field: "debit", width: 100, formatter: this.currency_formatter}, - {id: "credit", name: frappe._("Credit"), field: "credit", width: 100, + {id: "credit", name: __("Credit"), field: "credit", width: 100, formatter: this.currency_formatter}, - {id: "closing_dr", name: frappe._("Closing (Dr)"), field: "closing_dr", width: 100, + {id: "closing_dr", name: __("Closing (Dr)"), field: "closing_dr", width: 100, formatter: this.currency_formatter}, - {id: "closing_cr", name: frappe._("Closing (Cr)"), field: "closing_cr", width: 100, + {id: "closing_cr", name: __("Closing (Cr)"), field: "closing_cr", width: 100, formatter: this.currency_formatter} ]; }, filters: [ - {fieldtype: "Select", label: frappe._("Company"), link:"Company", default_value: "Select Company...", + {fieldtype: "Select", label: __("Company"), link:"Company", default_value: "Select Company...", filter: function(val, item, opts, me) { if (item.company == val || val == opts.default_value) { return me.apply_zero_filter(val, item, opts, me); } return false; }}, - {fieldtype: "Select", label: frappe._("Fiscal Year"), link:"Fiscal Year", + {fieldtype: "Select", label: __("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype: "Date", label: frappe._("From Date")}, - {fieldtype: "Label", label: frappe._("To")}, - {fieldtype: "Date", label: frappe._("To Date")}, - {fieldtype: "Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white", + {fieldtype: "Date", label: __("From Date")}, + {fieldtype: "Label", label: __("To")}, + {fieldtype: "Date", label: __("To Date")}, + {fieldtype: "Button", label: __("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype: "Button", label: frappe._("Reset Filters")}, + {fieldtype: "Button", label: __("Reset Filters")}, ], setup_filters: function() { this._super(); @@ -207,7 +207,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({ set_fiscal_year: function() { if (this.opening_date > this.closing_date) { - msgprint(frappe._("Opening Date should be before Closing Date")); + msgprint(__("Opening Date should be before Closing Date")); return; } @@ -221,7 +221,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({ }); if (!this.fiscal_year) { - msgprint(frappe._("Opening Date and Closing Date should be within same Fiscal Year")); + msgprint(__("Opening Date and Closing Date should be within same Fiscal Year")); return; } }, diff --git a/erpnext/public/js/conf.js b/erpnext/public/js/conf.js index e976052afb..76a114cd77 100644 --- a/erpnext/public/js/conf.js +++ b/erpnext/public/js/conf.js @@ -23,12 +23,12 @@ $(document).bind('toolbar_setup', function() { frappe.provide('frappe.ui.misc'); frappe.ui.misc.about = function() { if(!frappe.ui.misc.about_dialog) { - var d = new frappe.ui.Dialog({title: frappe._('About')}) + var d = new frappe.ui.Dialog({title: __('About')}) $(d.body).html(repl("
\

ERPNext

\ -

"+frappe._("An open source ERP made for the web.

") + - "

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

\ +

"+__("An open source ERP made for the web.

") + + "

"+__("To report an issue, go to ")+"GitHub Issues

\

http://erpnext.org.

\

License: GNU General Public License Version 3

\
\ diff --git a/erpnext/public/js/controllers/stock_controller.js b/erpnext/public/js/controllers/stock_controller.js index 65b81bb2b9..e50b2af35f 100644 --- a/erpnext/public/js/controllers/stock_controller.js +++ b/erpnext/public/js/controllers/stock_controller.js @@ -7,7 +7,7 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({ show_stock_ledger: function() { var me = this; if(this.frm.doc.docstatus===1) { - this.frm.appframe.add_button(frappe._("Stock Ledger"), function() { + this.frm.appframe.add_button(__("Stock Ledger"), function() { frappe.route_options = { voucher_no: me.frm.doc.name, from_date: me.frm.doc.posting_date, @@ -23,7 +23,7 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({ show_general_ledger: function() { var me = this; if(this.frm.doc.docstatus===1 && cint(frappe.defaults.get_default("auto_accounting_for_stock"))) { - cur_frm.appframe.add_button(frappe._('Accounting Ledger'), function() { + cur_frm.appframe.add_button(__('Accounting Ledger'), function() { frappe.route_options = { voucher_no: me.frm.doc.name, from_date: me.frm.doc.posting_date, diff --git a/erpnext/public/js/feature_setup.js b/erpnext/public/js/feature_setup.js index 84e8c7bced..157de292ae 100644 --- a/erpnext/public/js/feature_setup.js +++ b/erpnext/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(frappe._('Grid "')+fort+frappe._('" does not exists')); + msgprint(__('Grid "')+fort+__('" does not exists')); } } } diff --git a/erpnext/public/js/purchase_trends_filters.js b/erpnext/public/js/purchase_trends_filters.js index fee8b39c62..168b9ad660 100644 --- a/erpnext/public/js/purchase_trends_filters.js +++ b/erpnext/public/js/purchase_trends_filters.js @@ -5,35 +5,35 @@ var get_filters = function(){ return [ { "fieldname":"period", - "label": frappe._("Period"), + "label": __("Period"), "fieldtype": "Select", "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), "default": "Monthly" }, { "fieldname":"based_on", - "label": frappe._("Based On"), + "label": __("Based On"), "fieldtype": "Select", "options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"), "default": "Item" }, { "fieldname":"group_by", - "label": frappe._("Group By"), + "label": __("Group By"), "fieldtype": "Select", "options": ["Item", "Supplier"].join("\n"), "default": "" }, { "fieldname":"fiscal_year", - "label": frappe._("Fiscal Year"), + "label": __("Fiscal Year"), "fieldtype": "Link", "options":'Fiscal Year', "default": sys_defaults.fiscal_year }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/public/js/queries.js b/erpnext/public/js/queries.js index 966b27dd1a..ec38d634c4 100644 --- a/erpnext/public/js/queries.js +++ b/erpnext/public/js/queries.js @@ -38,8 +38,8 @@ $.extend(erpnext.queries, { customer_filter: function(doc) { if(!doc.customer) { - frappe.throw(frappe._("Please specify a") + " " + - frappe._(frappe.meta.get_label(doc.doctype, "customer", doc.name))); + frappe.throw(__("Please specify a") + " " + + __(frappe.meta.get_label(doc.doctype, "customer", doc.name))); } return { filters: { customer: doc.customer } }; @@ -47,8 +47,8 @@ $.extend(erpnext.queries, { supplier_filter: function(doc) { if(!doc.supplier) { - frappe.throw(frappe._("Please specify a") + " " + - frappe._(frappe.meta.get_label(doc.doctype, "supplier", doc.name))); + frappe.throw(__("Please specify a") + " " + + __(frappe.meta.get_label(doc.doctype, "supplier", doc.name))); } return { filters: { supplier: doc.supplier } }; @@ -56,8 +56,8 @@ $.extend(erpnext.queries, { lead_filter: function(doc) { if(!doc.lead) { - frappe.throw(frappe._("Please specify a") + " " + - frappe._(frappe.meta.get_label(doc.doctype, "lead", doc.name))); + frappe.throw(__("Please specify a") + " " + + __(frappe.meta.get_label(doc.doctype, "lead", doc.name))); } return { filters: { lead: doc.lead } }; diff --git a/erpnext/public/js/sales_trends_filters.js b/erpnext/public/js/sales_trends_filters.js index 89e52f18db..a1254c1af0 100644 --- a/erpnext/public/js/sales_trends_filters.js +++ b/erpnext/public/js/sales_trends_filters.js @@ -5,35 +5,35 @@ var get_filters = function(){ return[ { "fieldname":"period", - "label": frappe._("Period"), + "label": __("Period"), "fieldtype": "Select", "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), "default": "Monthly" }, { "fieldname":"based_on", - "label": frappe._("Based On"), + "label": __("Based On"), "fieldtype": "Select", "options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"), "default": "Item" }, { "fieldname":"group_by", - "label": frappe._("Group By"), + "label": __("Group By"), "fieldtype": "Select", "options": ["Item", "Customer"].join("\n"), "default": "" }, { "fieldname":"fiscal_year", - "label": frappe._("Fiscal Year"), + "label": __("Fiscal Year"), "fieldtype": "Link", "options":'Fiscal Year', "default": sys_defaults.fiscal_year }, { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") diff --git a/erpnext/public/js/startup.js b/erpnext/public/js/startup.js index 1c692f8a0e..6ba7173c86 100644 --- a/erpnext/public/js/startup.js +++ b/erpnext/public/js/startup.js @@ -3,5 +3,5 @@ // start $(document).on('startup', function() { - console.log(frappe._('Starting up...')); + console.log(__('Starting up...')); }); diff --git a/erpnext/public/js/stock_analytics.js b/erpnext/public/js/stock_analytics.js index 6e40b4f592..d62a1da883 100644 --- a/erpnext/public/js/stock_analytics.js +++ b/erpnext/public/js/stock_analytics.js @@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/stock_grid_report.js"); erpnext.StockAnalytics = erpnext.StockGridReport.extend({ init: function(wrapper, opts) { var args = { - title: frappe._("Stock Analytics"), + title: __("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: frappe._("Plot"), field: "check", width: 30, + {id: "check", name: __("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "name", name: frappe._("Item"), field: "name", width: 300, + {id: "name", name: __("Item"), field: "name", width: 300, formatter: this.tree_formatter}, - {id: "brand", name: frappe._("Brand"), field: "brand", width: 100}, - {id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100}, - {id: "opening", name: frappe._("Opening"), field: "opening", hidden: true, + {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, formatter: this.currency_formatter} ]; @@ -50,23 +50,23 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: frappe._("Value or Qty"), options:["Value", "Quantity"], + {fieldtype:"Select", label: __("Value or Qty"), options:["Value", "Quantity"], filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: frappe._("Brand"), link:"Brand", + {fieldtype:"Select", label: __("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val || item._show; }, link_formatter: {filter_input: "brand"}}, - {fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse", + {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse", default_value: "Select Warehouse..."}, - {fieldtype:"Date", label: frappe._("From Date")}, - {fieldtype:"Label", label: frappe._("To")}, - {fieldtype:"Date", label: frappe._("To Date")}, - {fieldtype:"Select", label: frappe._("Range"), + {fieldtype:"Date", label: __("From Date")}, + {fieldtype:"Label", label: __("To")}, + {fieldtype:"Date", label: __("To Date")}, + {fieldtype:"Select", label: __("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"}, - {fieldtype:"Button", label: frappe._("Reset Filters")} + {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"}, + {fieldtype:"Button", label: __("Reset Filters")} ], setup_filters: function() { var me = this; diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js index cb868b24f4..f76bbe0c24 100644 --- a/erpnext/public/js/transaction.js +++ b/erpnext/public/js/transaction.js @@ -70,10 +70,10 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ make_pos_btn: function() { if(!this.pos_active) { - var btn_label = frappe._("POS View"), + var btn_label = __("POS View"), icon = "icon-desktop"; } else { - var btn_label = frappe._(this.frm.doctype) + frappe._(" View"), + var btn_label = __(this.frm.doctype) + __(" View"), icon = "icon-file-text"; } var me = this; @@ -89,7 +89,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ this.frm.doc.selling_price_list : this.frm.doc.buying_price_list; if (!price_list) - msgprint(frappe._("Please select Price List")) + msgprint(__("Please select Price List")) else { if((show===true && this.pos_active) || (show===false && !this.pos_active)) return; @@ -354,10 +354,10 @@ 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(([frappe._("On Previous Row Amount"), frappe._("On Previous Row Total")].indexOf(tax.charge_type) != -1) && + if(([__("On Previous Row Amount"), __("On Previous Row Total")].indexOf(tax.charge_type) != -1) && (!tax.row_id || cint(tax.row_id) >= tax.idx)) { - var msg = repl(frappe._("Row") + " # %(idx)s [%(doctype)s]: " + - frappe._("Please specify a valid") + " %(row_id_label)s", { + var msg = repl(__("Row") + " # %(idx)s [%(doctype)s]: " + + __("Please specify a valid") + " %(row_id_label)s", { idx: tax.idx, doctype: tax.doctype, row_id_label: frappe.meta.get_label(tax.doctype, "row_id", tax.name) @@ -370,9 +370,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ if(!this.frm.tax_doclist) this.frm.tax_doclist = this.get_tax_doclist(); var actual_type_error = function() { - var msg = repl(frappe._("For row") + " # %(idx)s [%(doctype)s]: " + + var msg = repl(__("For row") + " # %(idx)s [%(doctype)s]: " + "%(charge_type_label)s = \"%(charge_type)s\" " + - frappe._("cannot be included in Item's rate"), { + __("cannot be included in Item's rate"), { idx: tax.idx, doctype: tax.doctype, charge_type_label: frappe.meta.get_label(tax.doctype, "charge_type", tax.name), @@ -382,9 +382,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ }; var on_previous_row_error = function(row_range) { - var msg = repl(frappe._("For row") + " # %(idx)s [%(doctype)s]: " + - frappe._("to be included in Item's rate, it is required that: ") + - " [" + frappe._("Row") + " # %(row_range)s] " + frappe._("also be included in Item's rate"), { + var msg = repl(__("For row") + " # %(idx)s [%(doctype)s]: " + + __("to be included in Item's rate, it is required that: ") + + " [" + __("Row") + " # %(row_range)s] " + __("also be included in Item's rate"), { idx: tax.idx, doctype: tax.doctype, charge_type_label: frappe.meta.get_label(tax.doctype, "charge_type", tax.name), @@ -454,7 +454,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ tax_accounts.push([tax.name, tax.account_head]); }); - var headings = $.map([frappe._("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })), + var headings = $.map([__("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })), function(head) { return '' + (head || "") + "" }).join("\n"); var distinct_item_names = []; @@ -494,9 +494,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ $.each(["company", "customer"], function(i, fieldname) { if(frappe.meta.has_field(me.frm.doc.doctype, fieldname)) { if (!me.frm.doc[fieldname]) { - msgprint(frappe._("Please specify") + ": " + + msgprint(__("Please specify") + ": " + frappe.meta.get_label(me.frm.doc.doctype, fieldname, me.frm.doc.name) + - ". " + frappe._("It is needed to fetch Item Details.")); + ". " + __("It is needed to fetch Item Details.")); valid = false; } } @@ -520,8 +520,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ if(!this.frm.doc.conversion_rate) { frappe.throw(repl('%(conversion_rate_label)s' + - frappe._(' is mandatory. Maybe Currency Exchange record is not created for ') + - '%(from_currency)s' + frappe._(" to ") + '%(to_currency)s', + __(' is mandatory. Maybe Currency Exchange record is not created for ') + + '%(from_currency)s' + __(" to ") + '%(to_currency)s', { "conversion_rate_label": conversion_rate_label, "from_currency": this.frm.doc.currency, diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 868ea0e2da..71488b2c43 100644 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -44,19 +44,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-left": "15px"}) .appendTo(grid_row.fields_dict.serial_no.$wrapper)); $btn.on("click", function() { var d = new frappe.ui.Dialog({ - title: frappe._("Add Serial No"), + title: __("Add Serial No"), fields: [ { "fieldtype": "Link", "options": "Serial No", - "label": frappe._("Serial No"), + "label": __("Serial No"), "get_query": { item_code: grid_row.doc.item_code, warehouse: grid_row.doc.warehouse @@ -64,7 +64,7 @@ $.extend(erpnext, { }, { "fieldtype": "Button", - "label": frappe._("Add") + "label": __("Add") } ] }); diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js index 308e8f1405..0bbbd3aedd 100644 --- a/erpnext/selling/doctype/customer/customer.js +++ b/erpnext/selling/doctype/customer/customer.js @@ -42,7 +42,7 @@ cur_frm.cscript.setup_dashboard = function(doc) { if(doc.__islocal) return; if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) - cur_frm.dashboard.set_headline(''+ frappe._('Loading...')+ '') + cur_frm.dashboard.set_headline(''+ __('Loading...')+ '') cur_frm.dashboard.add_doctype_badge("Opportunity", "customer"); cur_frm.dashboard.add_doctype_badge("Quotation", "customer"); @@ -59,9 +59,9 @@ cur_frm.cscript.setup_dashboard = function(doc) { callback: function(r) { if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) { cur_frm.dashboard.set_headline( - frappe._("Total Billing This Year: ") + "" + __("Total Billing This Year: ") + "" + format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company)) - + ' / ' + frappe._("Unpaid") + ": " + + ' / ' + __("Unpaid") + ": " + format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company)) + ''); } @@ -80,7 +80,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: frappe._('No addresses created'), + no_results_message: __('No addresses created'), render_row: cur_frm.cscript.render_address_row, }); // note: render_address_row is defined in contact_control.js @@ -98,7 +98,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 customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc" }, as_dict: 1, - no_results_message: frappe._('No contacts created'), + no_results_message: __('No contacts created'), render_row: cur_frm.cscript.render_contact_row, }); // note: render_contact_row is defined in contact_control.js diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js index 911ca32819..34d915c7ae 100644 --- a/erpnext/selling/doctype/installation_note/installation_note.js +++ b/erpnext/selling/doctype/installation_note/installation_note.js @@ -49,7 +49,7 @@ erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({ refresh: function() { if (this.frm.doc.docstatus===0) { - cur_frm.add_custom_button(frappe._('From Delivery Note'), + cur_frm.add_custom_button(__('From Delivery Note'), function() { frappe.model.map_current_doc({ method: "erpnext.stock.doctype.delivery_note.delivery_note.make_installation_note", diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js index 570a5e05d6..c04330d7fd 100644 --- a/erpnext/selling/doctype/lead/lead.js +++ b/erpnext/selling/doctype/lead/lead.js @@ -23,8 +23,8 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({ } if(in_list(user_roles,'System Manager')) { - cur_frm.footer.help_area.innerHTML = '

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

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

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

'; } }, @@ -35,9 +35,9 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({ this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer; if(!this.frm.doc.__islocal && !this.frm.doc.__is_customer) { - this.frm.add_custom_button(frappe._("Create Customer"), this.create_customer); - this.frm.add_custom_button(frappe._("Create Opportunity"), this.create_opportunity); - this.frm.appframe.add_button(frappe._("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone"); + this.frm.add_custom_button(__("Create Customer"), this.create_customer); + this.frm.add_custom_button(__("Create Opportunity"), this.create_opportunity); + this.frm.appframe.add_button(__("Send SMS"), this.frm.cscript.send_sms, "icon-mobile-phone"); } cur_frm.communication_view = new frappe.views.CommunicationList({ @@ -67,7 +67,7 @@ erpnext.LeadController = frappe.ui.form.Controller.extend({ order by is_primary_address, is_shipping_address desc' }, as_dict: 1, - no_results_message: frappe._('No addresses created'), + no_results_message: __('No addresses created'), render_row: this.render_address_row, }); // note: render_address_row is defined in contact_control.js diff --git a/erpnext/selling/doctype/opportunity/opportunity.js b/erpnext/selling/doctype/opportunity/opportunity.js index 1dc4c1ecac..3ae33bba8c 100644 --- a/erpnext/selling/doctype/opportunity/opportunity.js +++ b/erpnext/selling/doctype/opportunity/opportunity.js @@ -85,11 +85,11 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.clear_custom_buttons(); if(doc.docstatus === 1 && doc.status!=="Lost") { - cur_frm.add_custom_button(frappe._('Create Quotation'), cur_frm.cscript.create_quotation); + cur_frm.add_custom_button(__('Create Quotation'), cur_frm.cscript.create_quotation); if(doc.status!=="Quotation") - cur_frm.add_custom_button(frappe._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']); + cur_frm.add_custom_button(__('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']); - cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); + cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); } } @@ -116,11 +116,11 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) { cur_frm.cscript['Declare Opportunity Lost'] = function() { var dialog = new frappe.ui.Dialog({ - title: frappe._("Set as Lost"), + title: __("Set as Lost"), fields: [ - {"fieldtype": "Text", "label": frappe._("Reason for losing"), "fieldname": "reason", + {"fieldtype": "Text", "label": __("Reason for losing"), "fieldname": "reason", "reqd": 1 }, - {"fieldtype": "Button", "label": frappe._("Update"), "fieldname": "update"}, + {"fieldtype": "Button", "label": __("Update"), "fieldname": "update"}, ] }); @@ -133,7 +133,7 @@ cur_frm.cscript['Declare Opportunity Lost'] = function() { args: args.reason, callback: function(r) { if(r.exc) { - msgprint(frappe._("There were errors.")); + msgprint(__("There were errors.")); return; } dialog.hide(); diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index ff0894a263..218c3e12ba 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -26,17 +26,17 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ this._super(doc, dt, dn); if(doc.docstatus == 1 && doc.status!=='Lost') { - cur_frm.add_custom_button(frappe._('Make Sales Order'), + cur_frm.add_custom_button(__('Make Sales Order'), cur_frm.cscript['Make Sales Order']); if(doc.status!=="Ordered") { - cur_frm.add_custom_button(frappe._('Set as Lost'), + cur_frm.add_custom_button(__('Set as Lost'), cur_frm.cscript['Declare Order Lost'], "icon-exclamation"); } - cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); + cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); } if (this.frm.doc.docstatus===0) { - cur_frm.add_custom_button(frappe._('From Opportunity'), + cur_frm.add_custom_button(__('From Opportunity'), function() { frappe.model.map_current_doc({ method: "erpnext.selling.doctype.opportunity.opportunity.make_quotation", @@ -90,7 +90,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ validate_company_and_party: function(party_field) { if(!this.frm.doc.quotation_to) { - msgprint(frappe._("Please select a value for" + " " + + msgprint(__("Please select a value for" + " " + frappe.meta.get_label(this.frm.doc.doctype, "quotation_to", this.frm.doc.name))); return false; } else if (this.frm.doc.quotation_to == "Lead") { @@ -135,9 +135,9 @@ cur_frm.cscript['Declare Order Lost'] = function(){ var dialog = new frappe.ui.Dialog({ title: "Set as Lost", fields: [ - {"fieldtype": "Text", "label": frappe._("Reason for losing"), "fieldname": "reason", + {"fieldtype": "Text", "label": __("Reason for losing"), "fieldname": "reason", "reqd": 1 }, - {"fieldtype": "Button", "label": frappe._("Update"), "fieldname": "update"}, + {"fieldtype": "Button", "label": __("Update"), "fieldname": "update"}, ] }); @@ -150,7 +150,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){ args: args.reason, callback: function(r) { if(r.exc) { - msgprint(frappe._("There were errors.")); + msgprint(__("There were errors.")); return; } dialog.hide(); diff --git a/erpnext/selling/doctype/sales_bom/sales_bom.js b/erpnext/selling/doctype/sales_bom/sales_bom.js index 0033d00466..33a567a5b1 100644 --- a/erpnext/selling/doctype/sales_bom/sales_bom.js +++ b/erpnext/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(frappe._("Check for Duplicates"), function() { + cur_frm.add_custom_button(__("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 = frappe._('Select Item where "Is Stock Item" is "No"')+ -frappe._('and "Is Sales Item" is "Yes" and there is no other Sales BOM'); +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.cscript.item_code = function(doc, dt, dn) { var d = locals[dt][dn]; diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index 9d43065dcf..96b7105f35 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -21,44 +21,44 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend( if(doc.docstatus==1) { if(doc.status != 'Stopped') { - cur_frm.dashboard.add_progress(cint(doc.per_delivered) + frappe._("% Delivered"), + cur_frm.dashboard.add_progress(cint(doc.per_delivered) + __("% Delivered"), doc.per_delivered); - cur_frm.dashboard.add_progress(cint(doc.per_billed) + frappe._("% Billed"), + cur_frm.dashboard.add_progress(cint(doc.per_billed) + __("% Billed"), doc.per_billed); - cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); + cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); // delivery note if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales') - cur_frm.add_custom_button(frappe._('Make Delivery'), this.make_delivery_note); + cur_frm.add_custom_button(__('Make Delivery'), this.make_delivery_note); // maintenance if(flt(doc.per_delivered, 2) < 100 && (doc.order_type !='Sales')) { - cur_frm.add_custom_button(frappe._('Make Maint. Visit'), this.make_maintenance_visit); - cur_frm.add_custom_button(frappe._('Make Maint. Schedule'), + cur_frm.add_custom_button(__('Make Maint. Visit'), this.make_maintenance_visit); + cur_frm.add_custom_button(__('Make Maint. Schedule'), this.make_maintenance_schedule); } // indent if(!doc.order_type || (doc.order_type == 'Sales')) - cur_frm.add_custom_button(frappe._('Make ') + frappe._('Material Request'), + cur_frm.add_custom_button(__('Make ') + __('Material Request'), this.make_material_request); // sales invoice if(flt(doc.per_billed, 2) < 100) - cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_sales_invoice); + cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice); // stop if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100) - cur_frm.add_custom_button(frappe._('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation"); + cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation"); } else { // un-stop - cur_frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop"); - cur_frm.add_custom_button(frappe._('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check"); + cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop"); + cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check"); } } if (this.frm.doc.docstatus===0) { - cur_frm.add_custom_button(frappe._('From Quotation'), + cur_frm.add_custom_button(__('From Quotation'), function() { frappe.model.map_current_doc({ method: "erpnext.selling.doctype.quotation.quotation.make_sales_order", @@ -157,7 +157,7 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) { cur_frm.cscript['Stop Sales Order'] = function() { var doc = cur_frm.doc; - var check = confirm(frappe._("Are you sure you want to STOP ") + doc.name); + var check = confirm(__("Are you sure you want to STOP ") + doc.name); if (check) { return $c('runserverobj', { @@ -172,7 +172,7 @@ cur_frm.cscript['Stop Sales Order'] = function() { cur_frm.cscript['Unstop Sales Order'] = function() { var doc = cur_frm.doc; - var check = confirm(frappe._("Are you sure you want to UNSTOP ") + doc.name); + var check = confirm(__("Are you sure you want to UNSTOP ") + doc.name); if (check) { return $c('runserverobj', { diff --git a/erpnext/selling/page/sales_analytics/sales_analytics.js b/erpnext/selling/page/sales_analytics/sales_analytics.js index 46df93de8d..25c8f80497 100644 --- a/erpnext/selling/page/sales_analytics/sales_analytics.js +++ b/erpnext/selling/page/sales_analytics/sales_analytics.js @@ -4,7 +4,7 @@ frappe.pages['sales-analytics'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Sales Analytics'), + title: __('Sales Analytics'), single_column: true }); new erpnext.SalesAnalytics(wrapper); @@ -17,7 +17,7 @@ frappe.pages['sales-analytics'].onload = function(wrapper) { erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({ init: function(wrapper) { this._super({ - title: frappe._("Sales Analytics"), + title: __("Sales Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -30,14 +30,14 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({ this.tree_grids = { "Customer Group": { - label: frappe._("Customer Group / Customer"), + label: __("Customer Group / Customer"), show: true, item_key: "customer", parent_field: "parent_customer_group", formatter: function(item) { return item.name; } }, "Customer": { - label: frappe._("Customer"), + label: __("Customer"), show: false, item_key: "customer", formatter: function(item) { @@ -45,7 +45,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({ } }, "Item Group": { - label: frappe._("Item"), + label: __("Item"), show: true, parent_field: "parent_item_group", item_key: "item_code", @@ -54,7 +54,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({ } }, "Item": { - label: frappe._("Item"), + label: __("Item"), show: false, item_key: "item_code", formatter: function(item) { @@ -62,7 +62,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({ } }, "Territory": { - label: frappe._("Territory / Customer"), + label: __("Territory / Customer"), show: true, item_key: "customer", parent_field: "parent_territory", @@ -88,23 +88,23 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", fieldname: "tree_type", label: frappe._("Tree Type"), options:["Customer Group", "Customer", + {fieldtype:"Select", fieldname: "tree_type", label: __("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", fieldname: "based_on", label: frappe._("Based On"), options:["Sales Invoice", + {fieldtype:"Select", fieldname: "based_on", label: __("Based On"), options:["Sales Invoice", "Sales Order", "Delivery Note"]}, - {fieldtype:"Select", fieldname: "value_or_qty", label: frappe._("Value or Qty"), options:["Value", "Quantity"]}, - {fieldtype:"Select", fieldname: "company", label: frappe._("Company"), link:"Company", + {fieldtype:"Select", fieldname: "value_or_qty", label: __("Value or Qty"), options:["Value", "Quantity"]}, + {fieldtype:"Select", fieldname: "company", label: __("Company"), link:"Company", default_value: "Select Company..."}, - {fieldtype:"Date", fieldname: "from_date", label: frappe._("From Date")}, - {fieldtype:"Label", fieldname: "to", label: frappe._("To")}, - {fieldtype:"Date", fieldname: "to_date", label: frappe._("To Date")}, - {fieldtype:"Select", fieldname: "range", label: frappe._("Range"), + {fieldtype:"Date", fieldname: "from_date", label: __("From Date")}, + {fieldtype:"Label", fieldname: "to", label: __("To")}, + {fieldtype:"Date", fieldname: "to_date", label: __("To Date")}, + {fieldtype:"Select", fieldname: "range", label: __("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", fieldname: "refresh", label: frappe._("Refresh"), icon:"icon-refresh"}, - {fieldtype:"Button", fieldname: "reset_filters", label: frappe._("Reset Filters"), icon:"icon-filter"} + {fieldtype:"Button", fieldname: "refresh", label: __("Refresh"), icon:"icon-refresh"}, + {fieldtype:"Button", fieldname: "reset_filters", label: __("Reset Filters"), icon:"icon-filter"} ], setup_filters: function() { var me = this; diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js index a7a8770de8..adfbd00d91 100644 --- a/erpnext/selling/page/sales_browser/sales_browser.js +++ b/erpnext/selling/page/sales_browser/sales_browser.js @@ -16,8 +16,8 @@ pscript['onload_Sales Browser'] = function(wrapper){ $(wrapper) .find(".layout-side-section") .html('
'+ - frappe._('Click on a link to get options to expand get options ') + - frappe._('Add') + ' / ' + frappe._('Edit') + ' / '+ frappe._('Delete') + '.
') + __('Click on a link to get options to expand get options ') + + __('Add') + ' / ' + __('Edit') + ' / '+ __('Delete') + '.
') wrapper.make_tree = function() { var ctype = frappe.get_route()[1] || 'Territory'; @@ -114,18 +114,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: frappe._("Further nodes can be only created under 'Group' type nodes")}, + description: __("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: frappe._("Please enter Employee Id of this sales parson")}); + options:'Employee', description: __("Please enter Employee Id of this sales parson")}); } // the dialog var d = new frappe.ui.Dialog({ - title: frappe._('New ') + frappe._(me.ctype), + title: __('New ') + __(me.ctype), fields: fields }) diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js index b9b26d76a5..ce19f519b9 100644 --- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js +++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.js @@ -5,20 +5,20 @@ frappe.query_reports["Customer Acquisition and Loyalty"] = { "filters": [ { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company") }, { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.defaults.get_user_default("year_start_date") }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": frappe.defaults.get_user_default("year_end_date") }, diff --git a/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js b/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js index e0f405f138..729ccc24f5 100644 --- a/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js +++ b/erpnext/selling/report/customers_not_buying_since_long_time/customers_not_buying_since_long_time.js @@ -5,7 +5,7 @@ frappe.query_reports["Customers Not Buying Since Long Time"] = { "filters": [ { "fieldname":"days_since_last_order", - "label": frappe._("Days Since Last Order"), + "label": __("Days Since Last Order"), "fieldtype": "Int", "default": 60 } diff --git a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js index b6d2b7bd19..87cbe105aa 100644 --- a/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js +++ b/erpnext/selling/report/sales_person_target_variance_item_group_wise/sales_person_target_variance_item_group_wise.js @@ -5,21 +5,21 @@ frappe.query_reports["Sales Person Target Variance Item Group-Wise"] = { "filters": [ { fieldname: "fiscal_year", - label: frappe._("Fiscal Year"), + label: __("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: frappe._("Period"), + label: __("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "target_on", - label: frappe._("Target On"), + label: __("Target On"), fieldtype: "Select", options: "Quantity\nAmount", default: "Quantity" diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js index 9681cdc41c..4689299202 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.js @@ -5,57 +5,57 @@ frappe.query_reports["Sales Person-wise Transaction Summary"] = { "filters": [ { fieldname: "sales_person", - label: frappe._("Sales Person"), + label: __("Sales Person"), fieldtype: "Link", options: "Sales Person" }, { fieldname: "doc_type", - label: frappe._("Document Type"), + label: __("Document Type"), fieldtype: "Select", options: "Sales Order\nDelivery Note\nSales Invoice", default: "Sales Order" }, { fieldname: "from_date", - label: frappe._("From Date"), + label: __("From Date"), fieldtype: "Date", default: frappe.defaults.get_user_default("year_start_date"), }, { fieldname:"to_date", - label: frappe._("To Date"), + label: __("To Date"), fieldtype: "Date", default: get_today() }, { fieldname:"company", - label: frappe._("Company"), + label: __("Company"), fieldtype: "Link", options: "Company", default: frappe.defaults.get_user_default("company") }, { fieldname:"item_group", - label: frappe._("Item Group"), + label: __("Item Group"), fieldtype: "Link", options: "Item Group", }, { fieldname:"brand", - label: frappe._("Brand"), + label: __("Brand"), fieldtype: "Link", options: "Brand", }, { fieldname:"customer", - label: frappe._("Customer"), + label: __("Customer"), fieldtype: "Link", options: "Customer", }, { fieldname:"territory", - label: frappe._("Territory"), + label: __("Territory"), fieldtype: "Link", options: "Territory", }, diff --git a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js index 8a521b8ecf..f4abddc939 100644 --- a/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js +++ b/erpnext/selling/report/territory_target_variance_item_group_wise/territory_target_variance_item_group_wise.js @@ -5,21 +5,21 @@ frappe.query_reports["Territory Target Variance Item Group-Wise"] = { "filters": [ { fieldname: "fiscal_year", - label: frappe._("Fiscal Year"), + label: __("Fiscal Year"), fieldtype: "Link", options: "Fiscal Year", default: sys_defaults.fiscal_year }, { fieldname: "period", - label: frappe._("Period"), + label: __("Period"), fieldtype: "Select", options: "Monthly\nQuarterly\nHalf-Yearly\nYearly", default: "Monthly" }, { fieldname: "target_on", - label: frappe._("Target On"), + label: __("Target On"), fieldtype: "Select", options: "Quantity\nAmount", default: "Quantity" diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index e5d6cec207..60b917b5b0 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -72,7 +72,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ this.frm.set_query("batch_no", this.fname, function(doc, cdt, cdn) { var item = frappe.get_doc(cdt, cdn); if(!item.item_code) { - frappe.throw(frappe._("Please enter Item Code to get batch no")); + frappe.throw(__("Please enter Item Code to get batch no")); } else { filters = { 'item_code': item.item_code, @@ -174,10 +174,10 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ frappe.model.round_floats_in(this.frm.doc, ["net_total", "total_commission"]); if(this.frm.doc.net_total < this.frm.doc.total_commission) { - var msg = (frappe._("[Error]") + " " + - frappe._(frappe.meta.get_label(this.frm.doc.doctype, "total_commission", + var msg = (__("[Error]") + " " + + __(frappe.meta.get_label(this.frm.doc.doctype, "total_commission", this.frm.doc.name)) + " > " + - frappe._(frappe.meta.get_label(this.frm.doc.doctype, "net_total", this.frm.doc.name))); + __(frappe.meta.get_label(this.frm.doc.doctype, "net_total", this.frm.doc.name))); msgprint(msg); throw msg; } @@ -421,8 +421,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ calculate_commission: function() { if(this.frm.fields_dict.commission_rate) { if(this.frm.doc.commission_rate > 100) { - var msg = frappe._(frappe.meta.get_label(this.frm.doc.doctype, "commission_rate", this.frm.doc.name)) + - " " + frappe._("cannot be greater than 100"); + var msg = __(frappe.meta.get_label(this.frm.doc.doctype, "commission_rate", this.frm.doc.name)) + + " " + __("cannot be greater than 100"); msgprint(msg); throw msg; } @@ -477,7 +477,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ $.each(fields_list, function(i, fname) { var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname]; if(docfield) { - var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, ""); + var label = __(docfield.label || "").replace(/\([^\)]*\)/g, ""); field_label_map[fname] = label.trim() + " (" + currency + ")"; } }); @@ -521,7 +521,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ $.each(fields_list, function(i, fname) { var docfield = frappe.meta.docfield_map[grid_doctype][fname]; if(docfield) { - var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, ""); + var label = __(docfield.label || "").replace(/\([^\)]*\)/g, ""); field_label_map[grid_doctype + "-" + fname] = label.trim() + " (" + currency + ")"; } @@ -570,7 +570,7 @@ var set_sales_bom_help = function(doc) { if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) { help_msg = "
" + - frappe._("For 'Sales BOM' items, warehouse, serial no and batch no \ + __("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.")+ diff --git a/erpnext/setup/doctype/backup_manager/backup_manager.js b/erpnext/setup/doctype/backup_manager/backup_manager.js index 9fd16dc86b..7782c72b58 100644 --- a/erpnext/setup/doctype/backup_manager/backup_manager.js +++ b/erpnext/setup/doctype/backup_manager/backup_manager.js @@ -7,12 +7,12 @@ $.extend(cur_frm.cscript, { if(!(cint(cur_frm.doc.dropbox_access_allowed) || cint(cur_frm.doc.gdrive_access_allowed))) { - cur_frm.set_intro(frappe._("You can start by selecting backup frequency and \ + cur_frm.set_intro(__("You can start by selecting backup frequency and \ granting access for sync")); } else { var services = { - "dropbox": frappe._("Dropbox"), - "gdrive": frappe._("Google Drive") + "dropbox": __("Dropbox"), + "gdrive": __("Google Drive") } var active_services = []; @@ -25,7 +25,7 @@ $.extend(cur_frm.cscript, { }); if(active_services.length > 0) { - cur_frm.set_intro(frappe._("Backups will be uploaded to") + ": " + + cur_frm.set_intro(__("Backups will be uploaded to") + ": " + frappe.utils.comma_and(active_services)); } else { cur_frm.set_intro(""); @@ -36,8 +36,8 @@ $.extend(cur_frm.cscript, { validate_send_notifications_to: function() { if(!cur_frm.doc.send_notifications_to) { - msgprint(frappe._("Please specify") + ": " + - frappe._(frappe.meta.get_label(cur_frm.doctype, "send_notifications_to"))); + msgprint(__("Please specify") + ": " + + __(frappe.meta.get_label(cur_frm.doctype, "send_notifications_to"))); return false; } diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index d49a43ec47..d421a95328 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -35,7 +35,7 @@ cur_frm.cscript.replace_abbr = function() { }, callback: function(r) { if(r.exc) { - msgprint(frappe._("There were errors.")); + msgprint(__("There were errors.")); return; } else { cur_frm.set_value("abbr", args.new_abbr); @@ -61,8 +61,8 @@ cur_frm.cscript.has_special_chars = function(t) { cur_frm.cscript.company_name = function(doc){ if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){ - msgprint((""+frappe._("Special Characters")+" ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? "+ - frappe._("are not allowed for ")+"\n"+frappe._("Company Name")+" "+ doc.company_name +"")) + msgprint((""+__("Special Characters")+" ! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ? "+ + __("are not allowed for ")+"\n"+__("Company Name")+" "+ doc.company_name +"")) doc.company_name = ''; refresh_field('company_name'); } @@ -70,8 +70,8 @@ cur_frm.cscript.company_name = function(doc){ cur_frm.cscript.abbr = function(doc){ if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){ - msgprint(""+frappe._("Special Characters ")+"! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?" + - frappe._("are not allowed for")+ "\nAbbr " + doc.abbr +"") + msgprint(""+__("Special Characters ")+"! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?" + + __("are not allowed for")+ "\nAbbr " + doc.abbr +"") doc.abbr = ''; refresh_field('abbr'); } diff --git a/erpnext/setup/doctype/currency/currency.js b/erpnext/setup/doctype/currency/currency.js index bdda70ef79..79343e9ae6 100644 --- a/erpnext/setup/doctype/currency/currency.js +++ b/erpnext/setup/doctype/currency/currency.js @@ -4,6 +4,6 @@ cur_frm.cscript.refresh = function(doc) { cur_frm.set_intro(""); if(!cur_frm.doc.enabled) { - cur_frm.set_intro(frappe._("This Currency is disabled. Enable to use in transactions")) + cur_frm.set_intro(__("This Currency is disabled. Enable to use in transactions")) } } \ No newline at end of file diff --git a/erpnext/setup/doctype/currency_exchange/currency_exchange.js b/erpnext/setup/doctype/currency_exchange/currency_exchange.js index b4187efc1f..f6beba559f 100644 --- a/erpnext/setup/doctype/currency_exchange/currency_exchange.js +++ b/erpnext/setup/doctype/currency_exchange/currency_exchange.js @@ -22,7 +22,7 @@ $.extend(cur_frm.cscript, { set_exchange_rate_label: function() { if(cur_frm.doc.from_currency && cur_frm.doc.to_currency) { - var default_label = frappe._(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label); + var default_label = __(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label); cur_frm.fields_dict.exchange_rate.set_label(default_label + repl(" (1 %(from_currency)s = [?] %(to_currency)s)", cur_frm.doc)); } diff --git a/erpnext/setup/doctype/customer_group/customer_group.js b/erpnext/setup/doctype/customer_group/customer_group.js index 13abd8c307..04670720df 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.js +++ b/erpnext/setup/doctype/customer_group/customer_group.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root customer group if(!doc.parent_customer_group) { cur_frm.set_read_only(); - cur_frm.set_intro(frappe._("This is a root customer group and cannot be edited.")); + cur_frm.set_intro(__("This is a root customer group and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/erpnext/setup/doctype/email_digest/email_digest.js b/erpnext/setup/doctype/email_digest/email_digest.js index 51f6231c29..635b539e3d 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.js +++ b/erpnext/setup/doctype/email_digest/email_digest.js @@ -3,10 +3,10 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { doc = locals[dt][dn]; - var save_msg = frappe._("You must ")+ ""+frappe._("Save ")+""+frappe._("the form before proceeding"); - var err_msg = frappe._("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.") + var save_msg = __("You must ")+ ""+__("Save ")+""+__("the form before proceeding"); + var err_msg = __("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.") - cur_frm.add_custom_button(frappe._('View Now'), function() { + cur_frm.add_custom_button(__('View Now'), function() { doc = locals[dt][dn]; if(doc.__unsaved != 1) { return $c_obj(doc, 'get_digest_msg', '', function(r, rt) { @@ -16,7 +16,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { } else { //console.log(arguments); var d = new frappe.ui.Dialog({ - title: frappe._('Email Digest: ') + dn, + title: __('Email Digest: ') + dn, width: 800 }); @@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { msgprint(save_msg); } }, 1); - cur_frm.add_custom_button(frappe._('Send Now'), function() { + cur_frm.add_custom_button(__('Send Now'), function() { doc = locals[dt][dn]; if(doc.__unsaved != 1) { return $c_obj(doc, 'send', '', function(r, rt) { @@ -38,7 +38,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { console.log(r.exc); } else { //console.log(arguments); - msgprint(frappe._('Message Sent')); + msgprint(__('Message Sent')); } }); } else { @@ -56,7 +56,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) { // Open a dialog and display checkboxes against email addresses doc = locals[dt][dn]; var d = new frappe.ui.Dialog({ - title: frappe._('Add/Remove Recipients'), + title: __('Add/Remove Recipients'), width: 400 }); var dialog_div = $a(d.body, 'div', 'dialog-div', '', ''); diff --git a/erpnext/setup/doctype/item_group/item_group.js b/erpnext/setup/doctype/item_group/item_group.js index 5e0e843684..589039e245 100644 --- a/erpnext/setup/doctype/item_group/item_group.js +++ b/erpnext/setup/doctype/item_group/item_group.js @@ -4,7 +4,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.cscript.set_root_readonly(doc); - cur_frm.appframe.add_button(frappe._("Item Group Tree"), function() { + cur_frm.appframe.add_button(__("Item Group Tree"), function() { frappe.set_route("Sales Browser", "Item Group"); }, "icon-sitemap") @@ -19,7 +19,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root item group if(!doc.parent_item_group) { cur_frm.set_read_only(); - cur_frm.set_intro(frappe._("This is a root item group and cannot be edited.")); + cur_frm.set_intro(__("This is a root item group and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.js b/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.js index a8ac0bd28b..cda8fd6f20 100644 --- a/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.js +++ b/erpnext/setup/doctype/jobs_email_settings/jobs_email_settings.js @@ -7,9 +7,9 @@ cur_frm.cscript = { refresh: function(doc) { cur_frm.set_intro(""); if(doc.extract_emails) { - cur_frm.set_intro(frappe._("Active: Will extract emails from ") + doc.email_id); + cur_frm.set_intro(__("Active: Will extract emails from ") + doc.email_id); } else { - cur_frm.set_intro(frappe._("Not Active")); + cur_frm.set_intro(__("Not Active")); } } } \ No newline at end of file diff --git a/erpnext/setup/doctype/sales_email_settings/sales_email_settings.js b/erpnext/setup/doctype/sales_email_settings/sales_email_settings.js index a8ac0bd28b..cda8fd6f20 100644 --- a/erpnext/setup/doctype/sales_email_settings/sales_email_settings.js +++ b/erpnext/setup/doctype/sales_email_settings/sales_email_settings.js @@ -7,9 +7,9 @@ cur_frm.cscript = { refresh: function(doc) { cur_frm.set_intro(""); if(doc.extract_emails) { - cur_frm.set_intro(frappe._("Active: Will extract emails from ") + doc.email_id); + cur_frm.set_intro(__("Active: Will extract emails from ") + doc.email_id); } else { - cur_frm.set_intro(frappe._("Not Active")); + cur_frm.set_intro(__("Not Active")); } } } \ No newline at end of file diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js index 9cf2393db6..8f12aa9890 100644 --- a/erpnext/setup/doctype/sales_partner/sales_partner.js +++ b/erpnext/setup/doctype/sales_partner/sales_partner.js @@ -39,7 +39,7 @@ cur_frm.cscript.make_address = function() { return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc" }, as_dict: 1, - no_results_message: frappe._('No addresses created'), + no_results_message: __('No addresses created'), render_row: function(wrapper, data) { $(wrapper).css('padding','5px 0px'); var link = $ln(wrapper,cstr(data.name), function() { loaddoc("Address", this.dn); }, {fontWeight:'bold'}); @@ -69,7 +69,7 @@ cur_frm.cscript.make_contact = function() { return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc" }, as_dict: 1, - no_results_message: frappe._('No contacts created'), + no_results_message: __('No contacts created'), render_row: function(wrapper, data) { $(wrapper).css('padding', '5px 0px'); var link = $ln(wrapper, cstr(data.name), function() { loaddoc("Contact", this.dn); }, {fontWeight:'bold'}); diff --git a/erpnext/setup/doctype/sales_person/sales_person.js b/erpnext/setup/doctype/sales_person/sales_person.js index 84ce303ec0..a87279f666 100644 --- a/erpnext/setup/doctype/sales_person/sales_person.js +++ b/erpnext/setup/doctype/sales_person/sales_person.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root if(!doc.parent_sales_person) { cur_frm.set_read_only(); - cur_frm.set_intro(frappe._("This is a root sales person and cannot be edited.")); + cur_frm.set_intro(__("This is a root sales person and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.js b/erpnext/setup/doctype/supplier_type/supplier_type.js index 12a77cbc4a..0949b6a033 100644 --- a/erpnext/setup/doctype/supplier_type/supplier_type.js +++ b/erpnext/setup/doctype/supplier_type/supplier_type.js @@ -2,5 +2,5 @@ // License: GNU General Public License v3. See license.txt cur_frm.cscript.refresh = function(doc) { - cur_frm.set_intro(doc.__islocal ? "" : frappe._("There is nothing to edit.")) + cur_frm.set_intro(doc.__islocal ? "" : __("There is nothing to edit.")) } \ No newline at end of file diff --git a/erpnext/setup/doctype/territory/territory.js b/erpnext/setup/doctype/territory/territory.js index c027271a41..4b7b2f68c8 100644 --- a/erpnext/setup/doctype/territory/territory.js +++ b/erpnext/setup/doctype/territory/territory.js @@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) { // read-only for root territory if(!doc.parent_territory) { cur_frm.set_read_only(); - cur_frm.set_intro(frappe._("This is a root territory and cannot be edited.")); + cur_frm.set_intro(__("This is a root territory and cannot be edited.")); } else { cur_frm.set_intro(null); } diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js index fe2ceb88d3..fbc5d02417 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.js +++ b/erpnext/setup/page/setup_wizard/setup_wizard.js @@ -17,7 +17,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { args: values, callback: function(r) { if(r.exc) { - var d = msgprint(frappe._("There were errors.")); + var d = msgprint(__("There were errors.")); d.custom_onhide = function() { frappe.set_route(erpnext.wiz.page_name, "0"); } @@ -25,7 +25,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { wiz.show_complete(); setTimeout(function() { if(user==="Administrator") { - msgprint(frappe._("Login with your new User ID") + ":" + values.email); + msgprint(__("Login with your new User ID") + ":" + values.email); setTimeout(function() { frappe.app.logout(); }, 2000); @@ -37,40 +37,40 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { } }) }, - title: frappe._("ERPNext Setup Guide"), + title: __("ERPNext Setup Guide"), welcome_html: '

\ -

'+frappe._('ERPNext Setup')+'

\ +

'+__('ERPNext Setup')+'

\

' + - frappe._('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') + + __('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') + '

', working_html: '

\ -

'+frappe._('Setting up...')+'

\ +

'+__('Setting up...')+'

\

' + - frappe._('Sit tight while your system is being setup. This may take a few moments.') + + __('Sit tight while your system is being setup. This may take a few moments.') + '

', complete_html: '

\ -

'+frappe._('Setup Complete!')+'

\ +

'+__('Setup Complete!')+'

\

' + - frappe._('Your setup is complete. Refreshing...') + + __('Your setup is complete. Refreshing...') + '

', slides: [ // User { - title: frappe._("The First User: You"), + title: __("The First User: You"), icon: "icon-user", fields: [ - {"fieldname": "first_name", "label": frappe._("First Name"), "fieldtype": "Data", + {"fieldname": "first_name", "label": __("First Name"), "fieldtype": "Data", reqd:1}, - {"fieldname": "last_name", "label": frappe._("Last Name"), "fieldtype": "Data", + {"fieldname": "last_name", "label": __("Last Name"), "fieldtype": "Data", reqd:1}, - {"fieldname": "email", "label": frappe._("Email Id"), "fieldtype": "Data", + {"fieldname": "email", "label": __("Email Id"), "fieldtype": "Data", reqd:1, "description":"Your Login Id", "options":"Email"}, - {"fieldname": "password", "label": frappe._("Password"), "fieldtype": "Password", + {"fieldname": "password", "label": __("Password"), "fieldtype": "Password", reqd:1}, {fieldtype:"Attach Image", fieldname:"attach_user", label:"Attach Your User..."}, ], - help: frappe._('The first user will become the System Manager (you can change that later).'), + help: __('The first user will become the System Manager (you can change that later).'), onload: function(slide) { if(user!=="Administrator") { slide.form.fields_dict.password.$wrapper.toggle(false); @@ -86,21 +86,21 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { // Organization { - title: frappe._("The Organization"), + title: __("The Organization"), icon: "icon-building", fields: [ - {fieldname:'company_name', label: frappe._('Company Name'), fieldtype:'Data', reqd:1, + {fieldname:'company_name', label: __('Company Name'), fieldtype:'Data', reqd:1, placeholder: 'e.g. "My Company LLC"'}, - {fieldname:'company_abbr', label: frappe._('Company Abbreviation'), fieldtype:'Data', + {fieldname:'company_abbr', label: __('Company Abbreviation'), fieldtype:'Data', placeholder:'e.g. "MC"',reqd:1}, {fieldname:'fy_start_date', label:'Financial Year Start Date', fieldtype:'Date', description:'Your financial year begins on', reqd:1}, {fieldname:'fy_end_date', label:'Financial Year End Date', fieldtype:'Date', description:'Your financial year ends on', reqd:1}, - {fieldname:'company_tagline', label: frappe._('What does it do?'), fieldtype:'Data', + {fieldname:'company_tagline', label: __('What does it do?'), fieldtype:'Data', placeholder:'e.g. "Build tools for builders"', reqd:1}, ], - help: frappe._('The name of your company for which you are setting up this system.'), + help: __('The name of your company for which you are setting up this system.'), onload: function(slide) { slide.get_input("company_name").on("change", function() { var parts = slide.get_input("company_name").val().split(" "); @@ -120,19 +120,19 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { // Country { - title: frappe._("Country, Timezone and Currency"), + title: __("Country, Timezone and Currency"), icon: "icon-flag", fields: [ - {fieldname:'country', label: frappe._('Country'), reqd:1, + {fieldname:'country', label: __('Country'), reqd:1, options: "", fieldtype: 'Select'}, - {fieldname:'currency', label: frappe._('Default Currency'), reqd:1, + {fieldname:'currency', label: __('Default Currency'), reqd:1, options: "", fieldtype: 'Select'}, - {fieldname:'timezone', label: frappe._('Time Zone'), reqd:1, + {fieldname:'timezone', label: __('Time Zone'), reqd:1, options: "", fieldtype: 'Select'}, - {fieldname:'chart_of_accounts', label: frappe._('Chart of Accounts'), + {fieldname:'chart_of_accounts', label: __('Chart of Accounts'), options: "", fieldtype: 'Select'} ], - help: frappe._('Select your home country and check the timezone and currency.'), + help: __('Select your home country and check the timezone and currency.'), onload: function(slide, form) { frappe.call({ method:"frappe.country_info.get_country_timezone_info", @@ -179,8 +179,8 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { // Logo { icon: "icon-bookmark", - title: frappe._("Logo and Letter Heads"), - help: frappe._('Upload your letter head and logo - you can edit them later.'), + title: __("Logo and Letter Heads"), + help: __('Upload your letter head and logo - you can edit them later.'), fields: [ {fieldtype:"Attach Image", fieldname:"attach_letterhead", label:"Attach Letterhead..."}, {fieldtype:"Attach Image", fieldname:"attach_logo", label:"Attach Logo..."}, @@ -190,40 +190,40 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { // Taxes { icon: "icon-money", - "title": frappe._("Add Taxes"), - "help": frappe._("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."), + "title": __("Add Taxes"), + "help": __("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."), "fields": [], }, // Customers { icon: "icon-group", - "title": frappe._("Your Customers"), - "help": frappe._("List a few of your customers. They could be organizations or individuals."), + "title": __("Your Customers"), + "help": __("List a few of your customers. They could be organizations or individuals."), "fields": [], }, // Items to Sell { icon: "icon-barcode", - "title": frappe._("Your Products or Services"), - "help": frappe._("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."), + "title": __("Your Products or Services"), + "help": __("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."), "fields": [], }, // Suppliers { icon: "icon-group", - "title": frappe._("Your Suppliers"), - "help": frappe._("List a few of your suppliers. They could be organizations or individuals."), + "title": __("Your Suppliers"), + "help": __("List a few of your suppliers. They could be organizations or individuals."), "fields": [], }, // Items to Buy { icon: "icon-barcode", - "title": frappe._("Products or Services You Buy"), - "help": frappe._("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."), + "title": __("Products or Services You Buy"), + "help": __("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."), "fields": [], }, @@ -324,7 +324,7 @@ frappe.wiz.Wizard = Class.extend({ return; var me = this; this.$welcome = this.get_message(this.welcome_html + - '

') + '

') .appendTo(this.parent); this.$welcome.find(".btn").click(function() { diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js index f94a118ff6..e9ce9bd92b 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.js +++ b/erpnext/stock/doctype/delivery_note/delivery_note.js @@ -25,20 +25,20 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend( }); if(!from_sales_invoice) - cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_sales_invoice); + cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice); } if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1) - cur_frm.add_custom_button(frappe._('Make Installation Note'), this.make_installation_note); + cur_frm.add_custom_button(__('Make Installation Note'), this.make_installation_note); if (doc.docstatus==1) { - cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); + cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); this.show_stock_ledger(); this.show_general_ledger(); } if(doc.docstatus==0 && !doc.__islocal) { - cur_frm.add_custom_button(frappe._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']); + cur_frm.add_custom_button(__('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']); } set_print_hide(doc, dt, dn); @@ -48,7 +48,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend( cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(["expense_account", "cost_center"], aii_enabled); if (this.frm.doc.docstatus===0) { - cur_frm.add_custom_button(frappe._('From Sales Order'), + cur_frm.add_custom_button(__('From Sales Order'), function() { frappe.model.map_current_doc({ method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note", diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 78bdcb08b5..ce92934678 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -130,7 +130,7 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) { cur_frm.cscript.add_image = function(doc, dt, dn) { if(!doc.image) { - msgprint(frappe._('Please select an "Image" first')); + msgprint(__('Please select an "Image" first')); return; } @@ -145,7 +145,7 @@ cur_frm.cscript.add_image = function(doc, dt, dn) { // Quotation to validation - either customer or lead mandatory cur_frm.cscript.weight_to_validate = function(doc, cdt, cdn){ if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom) { - msgprint(frappe._('Weight is mentioned,\nPlease mention "Weight UOM" too')); + msgprint(__('Weight is mentioned,\nPlease mention "Weight UOM" too')); validated = 0; } } @@ -181,7 +181,7 @@ cur_frm.cscript.image = function() { if(!cur_frm.doc.description_html) cur_frm.cscript.add_image(cur_frm.doc); else { - msgprint(frappe._("You may need to update: ") + + msgprint(__("You may need to update: ") + frappe.meta.get_docfield(cur_frm.doc.doctype, "description_html").label); } } diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js index 6917efc449..38e8636f8e 100644 --- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js +++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js @@ -10,7 +10,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({ var me = this; this.frm.fields_dict.lc_pr_details.grid.get_field('purchase_receipt').get_query = function() { - if(!me.frm.doc.company) msgprint(frappe._("Please enter company first")); + if(!me.frm.doc.company) msgprint(__("Please enter company first")); return { filters:[ ['Purchase Receipt', 'docstatus', '=', '1'], @@ -20,7 +20,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({ }; this.frm.fields_dict.landed_cost_details.grid.get_field('account_head').get_query = function() { - if(!me.frm.doc.company) msgprint(frappe._("Please enter company first")); + if(!me.frm.doc.company) msgprint(__("Please enter company first")); return { filters:[ ['Account', 'group_or_ledger', '=', 'Ledger'], @@ -32,7 +32,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({ this.frm.fields_dict.landed_cost_details.grid.get_field('cost_center').get_query = function() { - if(!me.frm.doc.company) msgprint(frappe._("Please enter company first")); + if(!me.frm.doc.company) msgprint(__("Please enter company first")); return { filters:[ ['Cost Center', 'group_or_ledger', '=', 'Ledger'], diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js index 081469b103..271fe86568 100644 --- a/erpnext/stock/doctype/material_request/material_request.js +++ b/erpnext/stock/doctype/material_request/material_request.js @@ -25,38 +25,38 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten cur_frm.dashboard.reset(); if(doc.docstatus===1) { if(doc.status==="Stopped") { - cur_frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop") + cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop") } cur_frm.dashboard.add_progress(cint(doc.per_ordered) + "% " - + frappe._("Fulfilled"), cint(doc.per_ordered)); + + __("Fulfilled"), cint(doc.per_ordered)); } if(doc.docstatus==0) { - cur_frm.add_custom_button(frappe._("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap"); + cur_frm.add_custom_button(__("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap"); } if(doc.docstatus == 1 && doc.status != 'Stopped') { if(doc.material_request_type === "Purchase") - cur_frm.add_custom_button(frappe._("Make Supplier Quotation"), + cur_frm.add_custom_button(__("Make Supplier Quotation"), this.make_supplier_quotation); if(doc.material_request_type === "Transfer" && doc.status === "Submitted") - cur_frm.add_custom_button(frappe._("Transfer Material"), this.make_stock_entry); + cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry); if(flt(doc.per_ordered, 2) < 100) { if(doc.material_request_type === "Purchase") - cur_frm.add_custom_button(frappe._('Make Purchase Order'), + cur_frm.add_custom_button(__('Make Purchase Order'), this.make_purchase_order); - cur_frm.add_custom_button(frappe._('Stop Material Request'), + cur_frm.add_custom_button(__('Stop Material Request'), cur_frm.cscript['Stop Material Request'], "icon-exclamation"); } - cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); + cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone"); } if (this.frm.doc.docstatus===0) { - cur_frm.add_custom_button(frappe._('From Sales Order'), + cur_frm.add_custom_button(__('From Sales Order'), function() { frappe.model.map_current_doc({ method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request", @@ -72,7 +72,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten } if(doc.docstatus == 1 && doc.status == 'Stopped') - cur_frm.add_custom_button(frappe._('Unstop Material Request'), + cur_frm.add_custom_button(__('Unstop Material Request'), cur_frm.cscript['Unstop Material Request'], "icon-check"); }, @@ -91,13 +91,13 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten get_items_from_bom: function() { var d = new frappe.ui.Dialog({ - title: frappe._("Get Items from BOM"), + title: __("Get Items from BOM"), fields: [ - {"fieldname":"bom", "fieldtype":"Link", "label":frappe._("BOM"), + {"fieldname":"bom", "fieldtype":"Link", "label":__("BOM"), options:"BOM"}, {"fieldname":"fetch_exploded", "fieldtype":"Check", - "label":frappe._("Fetch exploded BOM (including sub-assemblies)"), "default":1}, - {fieldname:"fetch", "label":frappe._("Get Items from BOM"), "fieldtype":"Button"} + "label":__("Fetch exploded BOM (including sub-assemblies)"), "default":1}, + {fieldname:"fetch", "label":__("Get Items from BOM"), "fieldtype":"Button"} ] }); d.get_input("fetch").on("click", function() { @@ -164,12 +164,12 @@ $.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur cur_frm.cscript.qty = function(doc, cdt, cdn) { var d = locals[cdt][cdn]; if (flt(d.qty) < flt(d.min_order_qty)) - alert(frappe._("Warning: Material Requested Qty is less than Minimum Order Qty")); + alert(__("Warning: Material Requested Qty is less than Minimum Order Qty")); }; cur_frm.cscript['Stop Material Request'] = function() { var doc = cur_frm.doc; - var check = confirm(frappe._("Do you really want to STOP this Material Request?")); + var check = confirm(__("Do you really want to STOP this Material Request?")); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': doc}, function(r,rt) { @@ -180,7 +180,7 @@ cur_frm.cscript['Stop Material Request'] = function() { cur_frm.cscript['Unstop Material Request'] = function(){ var doc = cur_frm.doc; - var check = confirm(frappe._("Do you really want to UNSTOP this Material Request?")); + var check = confirm(__("Do you really want to UNSTOP this Material Request?")); if (check) { return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': doc}, function(r,rt) { diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.js b/erpnext/stock/doctype/packing_slip/packing_slip.js index ff1e1f036e..dd7ba0b15a 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.js +++ b/erpnext/stock/doctype/packing_slip/packing_slip.js @@ -45,13 +45,13 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) { cur_frm.cscript.validate_case_nos = function(doc) { doc = locals[doc.doctype][doc.name]; if(cint(doc.from_case_no)==0) { - msgprint(frappe._("Case No. cannot be 0")) + msgprint(__("Case No. cannot be 0")) validated = false; } else if(!cint(doc.to_case_no)) { doc.to_case_no = doc.from_case_no; refresh_field('to_case_no'); } else if(cint(doc.to_case_no) < cint(doc.from_case_no)) { - msgprint(frappe._("'To Case No.' cannot be less than 'From Case No.'")); + msgprint(__("'To Case No.' cannot be less than 'From Case No.'")); validated = false; } } @@ -72,14 +72,14 @@ cur_frm.cscript.validate_duplicate_items = function(doc, ps_detail) { for(var i=0; i item.received_qty) { - msgprint(frappe._("Error") + ": " + frappe._(frappe.meta.get_label(item.doctype, "qty", item.name)) - + " > " + frappe._(frappe.meta.get_label(item.doctype, "received_qty", item.name))); + msgprint(__("Error") + ": " + __(frappe.meta.get_label(item.doctype, "qty", item.name)) + + " > " + __(frappe.meta.get_label(item.doctype, "received_qty", item.name))); item.qty = item.rejected_qty = 0.0; } else { item.rejected_qty = flt(item.received_qty - item.qty, precision("rejected_qty", item)); @@ -78,9 +78,9 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend frappe.model.round_floats_in(item, ["received_qty", "rejected_qty"]); if(item.rejected_qty > item.received_qty) { - msgprint(frappe._("Error") + ": " + - frappe._(frappe.meta.get_label(item.doctype, "rejected_qty", item.name)) - + " > " + frappe._(frappe.meta.get_label(item.doctype, "received_qty", item.name))); + msgprint(__("Error") + ": " + + __(frappe.meta.get_label(item.doctype, "rejected_qty", item.name)) + + " > " + __(frappe.meta.get_label(item.doctype, "received_qty", item.name))); item.qty = item.rejected_qty = 0.0; } else { item.qty = flt(item.received_qty - item.rejected_qty, precision("qty", item)); @@ -141,7 +141,7 @@ cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('batch_no').get_q } } else - msgprint(frappe._("Please enter Item Code.")); + msgprint(__("Please enter Item Code.")); } cur_frm.cscript.select_print_heading = function(doc, cdt, cdn) { diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 07456debf7..d32f17884c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -70,10 +70,10 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ if(this.frm.doc.docstatus === 1 && frappe.boot.user.can_create.indexOf("Journal Voucher")!==-1) { if(this.frm.doc.purpose === "Sales Return") { - this.frm.add_custom_button(frappe._("Make Credit Note"), function() { me.make_return_jv(); }); + this.frm.add_custom_button(__("Make Credit Note"), function() { me.make_return_jv(); }); this.add_excise_button(); } else if(this.frm.doc.purpose === "Purchase Return") { - this.frm.add_custom_button(frappe._("Make Debit Note"), function() { me.make_return_jv(); }); + this.frm.add_custom_button(__("Make Debit Note"), function() { me.make_return_jv(); }); this.add_excise_button(); } } @@ -166,11 +166,11 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ if(this.frm.doc.purpose === "Sales Return") { if(this.frm.doc.delivery_note_no && this.frm.doc.sales_invoice_no) { // both specified - msgprint(frappe._("You can not enter both Delivery Note No and Sales Invoice No. Please enter any one.")); + msgprint(__("You can not enter both Delivery Note No and Sales Invoice No. Please enter any one.")); } else if(!(this.frm.doc.delivery_note_no || this.frm.doc.sales_invoice_no)) { // none specified - msgprint(frappe._("Please enter Delivery Note No or Sales Invoice No to proceed")); + msgprint(__("Please enter Delivery Note No or Sales Invoice No to proceed")); } else if(this.frm.doc.delivery_note_no) { return {doctype: "Delivery Note", docname: this.frm.doc.delivery_note_no}; @@ -185,7 +185,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ } else { // not specified - msgprint(frappe._("Please enter Purchase Receipt No to proceed")); + msgprint(__("Please enter Purchase Receipt No to proceed")); } } @@ -193,7 +193,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({ add_excise_button: function() { if(frappe.boot.sysdefaults.country === "India") - this.frm.add_custom_button(frappe._("Make Excise Invoice"), function() { + this.frm.add_custom_button(__("Make Excise Invoice"), function() { var excise = frappe.model.make_new_doc_and_get_name('Journal Voucher'); excise = locals['Journal Voucher'][excise]; excise.voucher_type = 'Excise Voucher'; @@ -333,7 +333,7 @@ cur_frm.fields_dict['mtn_details'].grid.get_field('batch_no').get_query = functi } } } else { - msgprint(frappe._("Please enter Item Code to get batch no")); + msgprint(__("Please enter Item Code to get batch no")); } } @@ -390,7 +390,7 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) { cur_frm.cscript.validate_items = function(doc) { cl = doc.mtn_details || []; if (!cl.length) { - msgprint(frappe._("Item table can not be blank")); + msgprint(__("Item table can not be blank")); validated = false; } } diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js index bf62c75ac1..77530c4391 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js @@ -56,12 +56,12 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ this.show_download_template(); this.show_upload(); if(this.frm.doc.reconciliation_json) { - this.frm.set_intro(frappe._("You can submit this Stock Reconciliation.")); + this.frm.set_intro(__("You can submit this Stock Reconciliation.")); } else { - this.frm.set_intro(frappe._("Download the Template, fill appropriate data and attach the modified file.")); + this.frm.set_intro(__("Download the Template, fill appropriate data and attach the modified file.")); } } else if(this.frm.doc.docstatus == 1) { - this.frm.set_intro(frappe._("Cancelling this Stock Reconciliation will nullify its effect.")); + this.frm.set_intro(__("Cancelling this Stock Reconciliation will nullify its effect.")); this.show_stock_ledger(); this.show_general_ledger(); } else { @@ -73,20 +73,20 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ show_download_template: function() { var me = this; - this.frm.add_custom_button(frappe._("Download Template"), function() { - this.title = frappe._("Stock Reconcilation Template"); - frappe.tools.downloadify([[frappe._("Stock Reconciliation")], + this.frm.add_custom_button(__("Download Template"), function() { + this.title = __("Stock Reconcilation Template"); + frappe.tools.downloadify([[__("Stock Reconciliation")], ["----"], - [frappe._("Stock Reconciliation can be used to update the stock on a particular date, ") - + frappe._("usually as per physical inventory.")], - [frappe._("When submitted, the system creates difference entries ") - + frappe._("to set the given stock and valuation on this date.")], - [frappe._("It can also be used to create opening stock entries and to fix stock value.")], + [__("Stock Reconciliation can be used to update the stock on a particular date, ") + + __("usually as per physical inventory.")], + [__("When submitted, the system creates difference entries ") + + __("to set the given stock and valuation on this date.")], + [__("It can also be used to create opening stock entries and to fix stock value.")], ["----"], - [frappe._("Notes:")], - [frappe._("Item Code and Warehouse should already exist.")], - [frappe._("You can update either Quantity or Valuation Rate or both.")], - [frappe._("If no change in either Quantity or Valuation Rate, leave the cell blank.")], + [__("Notes:")], + [__("Item Code and Warehouse should already exist.")], + [__("You can update either Quantity or Valuation Rate or both.")], + [__("If no change in either Quantity or Valuation Rate, leave the cell blank.")], ["----"], ["Item Code", "Warehouse", "Quantity", "Valuation Rate"]], null, this); return false; @@ -120,8 +120,8 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({ show_download_reconciliation_data: function() { var me = this; if(this.frm.doc.reconciliation_json) { - this.frm.add_custom_button(frappe._("Download Reconcilation Data"), function() { - this.title = frappe._("Stock Reconcilation Data"); + this.frm.add_custom_button(__("Download Reconcilation Data"), function() { + this.title = __("Stock Reconcilation Data"); frappe.tools.downloadify(JSON.parse(me.frm.doc.reconciliation_json), null, this); return false; }, "icon-download"); diff --git a/erpnext/stock/page/stock_ageing/stock_ageing.js b/erpnext/stock/page/stock_ageing/stock_ageing.js index d7a2b3e8bd..c16e2eca1b 100644 --- a/erpnext/stock/page/stock_ageing/stock_ageing.js +++ b/erpnext/stock/page/stock_ageing/stock_ageing.js @@ -5,7 +5,7 @@ frappe.pages['stock-ageing'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Stock Ageing'), + title: __('Stock Ageing'), single_column: true }); @@ -21,7 +21,7 @@ frappe.require("assets/erpnext/js/stock_grid_report.js"); erpnext.StockAgeing = erpnext.StockGridReport.extend({ init: function(wrapper) { this._super({ - title: frappe._("Stock Ageing"), + title: __("Stock Ageing"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -30,37 +30,37 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({ }, setup_columns: function() { this.columns = [ - {id: "name", name: frappe._("Item"), field: "name", width: 300, + {id: "name", name: __("Item"), field: "name", width: 300, link_formatter: { open_btn: true, doctype: '"Item"' }}, - {id: "item_name", name: frappe._("Item Name"), field: "item_name", + {id: "item_name", name: __("Item Name"), field: "item_name", width: 100, formatter: this.text_formatter}, - {id: "description", name: frappe._("Description"), field: "description", + {id: "description", name: __("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "brand", name: frappe._("Brand"), field: "brand", width: 100}, - {id: "average_age", name: frappe._("Average Age"), field: "average_age", + {id: "brand", name: __("Brand"), field: "brand", width: 100}, + {id: "average_age", name: __("Average Age"), field: "average_age", formatter: this.currency_formatter}, - {id: "earliest", name: frappe._("Earliest"), field: "earliest", + {id: "earliest", name: __("Earliest"), field: "earliest", formatter: this.currency_formatter}, - {id: "latest", name: frappe._("Latest"), field: "latest", + {id: "latest", name: __("Latest"), field: "latest", formatter: this.currency_formatter}, {id: "stock_uom", name: "UOM", field: "stock_uom", width: 100}, ]; }, filters: [ - {fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse", + {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse", default_value: "Select Warehouse..."}, - {fieldtype:"Select", label: frappe._("Brand"), link:"Brand", + {fieldtype:"Select", label: __("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val; }, link_formatter: {filter_input: "brand"}}, - {fieldtype:"Select", label: frappe._("Plot By"), + {fieldtype:"Select", label: __("Plot By"), options: ["Average Age", "Earliest", "Latest"]}, - {fieldtype:"Date", label: frappe._("To Date")}, - {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"}, - {fieldtype:"Button", label: frappe._("Reset Filters")} + {fieldtype:"Date", label: __("To Date")}, + {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"}, + {fieldtype:"Button", label: __("Reset Filters")} ], setup_filters: function() { var me = this; diff --git a/erpnext/stock/page/stock_analytics/stock_analytics.js b/erpnext/stock/page/stock_analytics/stock_analytics.js index f6f80436a1..963cff0b75 100644 --- a/erpnext/stock/page/stock_analytics/stock_analytics.js +++ b/erpnext/stock/page/stock_analytics/stock_analytics.js @@ -5,7 +5,7 @@ frappe.pages['stock-analytics'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Stock Analytics'), + title: __('Stock Analytics'), single_column: true }); diff --git a/erpnext/stock/page/stock_balance/stock_balance.js b/erpnext/stock/page/stock_balance/stock_balance.js index c3204a4e03..52e73f1a91 100644 --- a/erpnext/stock/page/stock_balance/stock_balance.js +++ b/erpnext/stock/page/stock_balance/stock_balance.js @@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/stock_analytics.js"); frappe.pages['stock-balance'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Stock Balance'), + title: __('Stock Balance'), single_column: true }); @@ -20,58 +20,58 @@ frappe.pages['stock-balance'].onload = function(wrapper) { erpnext.StockBalance = erpnext.StockAnalytics.extend({ init: function(wrapper) { this._super(wrapper, { - title: frappe._("Stock Balance"), + title: __("Stock Balance"), doctypes: ["Item", "Item Group", "Warehouse", "Stock Ledger Entry", "Brand", "Stock Entry", "Project", "Serial No"], }); }, setup_columns: function() { this.columns = [ - {id: "name", name: frappe._("Item"), field: "name", width: 300, + {id: "name", name: __("Item"), field: "name", width: 300, formatter: this.tree_formatter}, - {id: "item_name", name: frappe._("Item Name"), field: "item_name", width: 100}, - {id: "description", name: frappe._("Description"), field: "description", width: 200, + {id: "item_name", name: __("Item Name"), field: "item_name", width: 100}, + {id: "description", name: __("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "brand", name: frappe._("Brand"), field: "brand", width: 100}, - {id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100}, - {id: "opening_qty", name: frappe._("Opening Qty"), field: "opening_qty", width: 100, + {id: "brand", name: __("Brand"), field: "brand", width: 100}, + {id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100}, + {id: "opening_qty", name: __("Opening Qty"), field: "opening_qty", width: 100, formatter: this.currency_formatter}, - {id: "inflow_qty", name: frappe._("In Qty"), field: "inflow_qty", width: 100, + {id: "inflow_qty", name: __("In Qty"), field: "inflow_qty", width: 100, formatter: this.currency_formatter}, - {id: "outflow_qty", name: frappe._("Out Qty"), field: "outflow_qty", width: 100, + {id: "outflow_qty", name: __("Out Qty"), field: "outflow_qty", width: 100, formatter: this.currency_formatter}, - {id: "closing_qty", name: frappe._("Closing Qty"), field: "closing_qty", width: 100, + {id: "closing_qty", name: __("Closing Qty"), field: "closing_qty", width: 100, formatter: this.currency_formatter}, - {id: "opening_value", name: frappe._("Opening Value"), field: "opening_value", width: 100, + {id: "opening_value", name: __("Opening Value"), field: "opening_value", width: 100, formatter: this.currency_formatter}, - {id: "inflow_value", name: frappe._("In Value"), field: "inflow_value", width: 100, + {id: "inflow_value", name: __("In Value"), field: "inflow_value", width: 100, formatter: this.currency_formatter}, - {id: "outflow_value", name: frappe._("Out Value"), field: "outflow_value", width: 100, + {id: "outflow_value", name: __("Out Value"), field: "outflow_value", width: 100, formatter: this.currency_formatter}, - {id: "closing_value", name: frappe._("Closing Value"), field: "closing_value", width: 100, + {id: "closing_value", name: __("Closing Value"), field: "closing_value", width: 100, formatter: this.currency_formatter}, ]; }, filters: [ - {fieldtype:"Select", label: frappe._("Brand"), link:"Brand", + {fieldtype:"Select", label: __("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val || item._show; }, link_formatter: {filter_input: "brand"}}, - {fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse", + {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse", default_value: "Select Warehouse...", filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: frappe._("Project"), link:"Project", + {fieldtype:"Select", label: __("Project"), link:"Project", default_value: "Select Project...", filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }, link_formatter: {filter_input: "project"}}, - {fieldtype:"Date", label: frappe._("From Date")}, - {fieldtype:"Label", label: frappe._("To")}, - {fieldtype:"Date", label: frappe._("To Date")}, - {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"}, - {fieldtype:"Button", label: frappe._("Reset Filters")} + {fieldtype:"Date", label: __("From Date")}, + {fieldtype:"Label", label: __("To")}, + {fieldtype:"Date", label: __("To Date")}, + {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"}, + {fieldtype:"Button", label: __("Reset Filters")} ], setup_plot_check: function() { diff --git a/erpnext/stock/page/stock_ledger/stock_ledger.js b/erpnext/stock/page/stock_ledger/stock_ledger.js index 107304a05f..4e31e37de4 100644 --- a/erpnext/stock/page/stock_ledger/stock_ledger.js +++ b/erpnext/stock/page/stock_ledger/stock_ledger.js @@ -4,7 +4,7 @@ frappe.pages['stock-ledger'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Stock Ledger'), + title: __('Stock Ledger'), single_column: true }); @@ -17,7 +17,7 @@ frappe.require("assets/erpnext/js/stock_grid_report.js"); erpnext.StockLedger = erpnext.StockGridReport.extend({ init: function(wrapper) { this._super({ - title: frappe._("Stock Ledger"), + title: __("Stock Ledger"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -28,29 +28,29 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({ setup_columns: function() { this.hide_balance = (this.is_default("item_code") || this.voucher_no) ? true : false; this.columns = [ - {id: "posting_datetime", name: frappe._("Posting Date"), field: "posting_datetime", width: 120, + {id: "posting_datetime", name: __("Posting Date"), field: "posting_datetime", width: 120, formatter: this.date_formatter}, - {id: "item_code", name: frappe._("Item Code"), field: "item_code", width: 160, + {id: "item_code", name: __("Item Code"), field: "item_code", width: 160, link_formatter: { filter_input: "item_code", open_btn: true, doctype: '"Item"', }}, - {id: "description", name: frappe._("Description"), field: "description", width: 200, + {id: "description", name: __("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "warehouse", name: frappe._("Warehouse"), field: "warehouse", width: 100, + {id: "warehouse", name: __("Warehouse"), field: "warehouse", width: 100, link_formatter: {filter_input: "warehouse"}}, - {id: "brand", name: frappe._("Brand"), field: "brand", width: 100}, - {id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100}, - {id: "qty", name: frappe._("Qty"), field: "qty", width: 100, + {id: "brand", name: __("Brand"), field: "brand", width: 100}, + {id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100}, + {id: "qty", name: __("Qty"), field: "qty", width: 100, formatter: this.currency_formatter}, - {id: "balance", name: frappe._("Balance Qty"), field: "balance", width: 100, + {id: "balance", name: __("Balance Qty"), field: "balance", width: 100, formatter: this.currency_formatter, hidden: this.hide_balance}, - {id: "balance_value", name: frappe._("Balance Value"), field: "balance_value", width: 100, + {id: "balance_value", name: __("Balance Value"), field: "balance_value", width: 100, formatter: this.currency_formatter, hidden: this.hide_balance}, - {id: "voucher_type", name: frappe._("Voucher Type"), field: "voucher_type", width: 120}, - {id: "voucher_no", name: frappe._("Voucher No"), field: "voucher_no", width: 160, + {id: "voucher_type", name: __("Voucher Type"), field: "voucher_type", width: 120}, + {id: "voucher_no", name: __("Voucher No"), field: "voucher_no", width: 160, link_formatter: { filter_input: "voucher_no", open_btn: true, @@ -60,11 +60,11 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({ }, filters: [ - {fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse", + {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse", default_value: "Select Warehouse...", filter: function(val, item, opts) { return item.warehouse == val || val == opts.default_value; }}, - {fieldtype:"Link", label: frappe._("Item Code"), link:"Item", default_value: "Select Item...", + {fieldtype:"Link", label: __("Item Code"), link:"Item", default_value: "Select Item...", filter: function(val, item, opts) { return item.item_code == val || !val; }}, @@ -72,20 +72,20 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({ default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val || item._show; }, link_formatter: {filter_input: "brand"}}, - {fieldtype:"Data", label: frappe._("Voucher No"), + {fieldtype:"Data", label: __("Voucher No"), filter: function(val, item, opts) { if(!val) return true; return (item.voucher_no && item.voucher_no.indexOf(val)!=-1); }}, - {fieldtype:"Date", label: frappe._("From Date"), filter: function(val, item) { + {fieldtype:"Date", label: __("From Date"), filter: function(val, item) { return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype:"Label", label: frappe._("To")}, - {fieldtype:"Date", label: frappe._("To Date"), filter: function(val, item) { + {fieldtype:"Label", label: __("To")}, + {fieldtype:"Date", label: __("To Date"), filter: function(val, item) { return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date); }}, - {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"}, - {fieldtype:"Button", label: frappe._("Reset Filters")} + {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"}, + {fieldtype:"Button", label: __("Reset Filters")} ], setup_filters: function() { diff --git a/erpnext/stock/page/stock_level/stock_level.js b/erpnext/stock/page/stock_level/stock_level.js index 1b84b73e95..370883ff41 100644 --- a/erpnext/stock/page/stock_level/stock_level.js +++ b/erpnext/stock/page/stock_level/stock_level.js @@ -4,7 +4,7 @@ frappe.pages['stock-level'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Stock Level'), + title: __('Stock Level'), single_column: true }); @@ -22,7 +22,7 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ var me = this; this._super({ - title: frappe._("Stock Level"), + title: __("Stock Level"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -37,12 +37,12 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ Projected Qty = Actual Qty + Planned Qty + Requested Qty \ + Ordered Qty - Reserved Qty \
    \ -
  • "+frappe._("Actual Qty: Quantity available in the warehouse.") +"
  • "+ - "
  • "+frappe._("Planned Qty: Quantity, for which, Production Order has been raised,")+ - frappe._("but is pending to be manufactured.")+ "
  • " + - "
  • "+frappe._("Requested Qty: Quantity requested for purchase, but not ordered.") + "
  • " + - "
  • " + frappe._("Ordered Qty: Quantity ordered for purchase, but not received.")+ "
  • " + - "
  • " + frappe._("Reserved Qty: Quantity ordered for sale, but not delivered.") + "
  • " + +
  • "+__("Actual Qty: Quantity available in the warehouse.") +"
  • "+ + "
  • "+__("Planned Qty: Quantity, for which, Production Order has been raised,")+ + __("but is pending to be manufactured.")+ "
  • " + + "
  • "+__("Requested Qty: Quantity requested for purchase, but not ordered.") + "
  • " + + "
  • " + __("Ordered Qty: Quantity ordered for purchase, but not received.")+ "
  • " + + "
  • " + __("Reserved Qty: Quantity ordered for sale, but not delivered.") + "
  • " + "
\ "); }); @@ -50,57 +50,57 @@ erpnext.StockLevel = erpnext.StockGridReport.extend({ setup_columns: function() { this.columns = [ - {id: "item_code", name: frappe._("Item Code"), field: "item_code", width: 160, + {id: "item_code", name: __("Item Code"), field: "item_code", width: 160, link_formatter: { filter_input: "item_code", open_btn: true, doctype: '"Item"', }}, - {id: "item_name", name: frappe._("Item Name"), field: "item_name", width: 100, + {id: "item_name", name: __("Item Name"), field: "item_name", width: 100, formatter: this.text_formatter}, - {id: "description", name: frappe._("Description"), field: "description", width: 200, + {id: "description", name: __("Description"), field: "description", width: 200, formatter: this.text_formatter}, - {id: "brand", name: frappe._("Brand"), field: "brand", width: 100, + {id: "brand", name: __("Brand"), field: "brand", width: 100, link_formatter: {filter_input: "brand"}}, - {id: "warehouse", name: frappe._("Warehouse"), field: "warehouse", width: 100, + {id: "warehouse", name: __("Warehouse"), field: "warehouse", width: 100, link_formatter: {filter_input: "warehouse"}}, - {id: "uom", name: frappe._("UOM"), field: "uom", width: 60}, - {id: "actual_qty", name: frappe._("Actual Qty"), + {id: "uom", name: __("UOM"), field: "uom", width: 60}, + {id: "actual_qty", name: __("Actual Qty"), field: "actual_qty", width: 80, formatter: this.currency_formatter}, - {id: "planned_qty", name: frappe._("Planned Qty"), + {id: "planned_qty", name: __("Planned Qty"), field: "planned_qty", width: 80, formatter: this.currency_formatter}, - {id: "requested_qty", name: frappe._("Requested Qty"), + {id: "requested_qty", name: __("Requested Qty"), field: "requested_qty", width: 80, formatter: this.currency_formatter}, - {id: "ordered_qty", name: frappe._("Ordered Qty"), + {id: "ordered_qty", name: __("Ordered Qty"), field: "ordered_qty", width: 80, formatter: this.currency_formatter}, - {id: "reserved_qty", name: frappe._("Reserved Qty"), + {id: "reserved_qty", name: __("Reserved Qty"), field: "reserved_qty", width: 80, formatter: this.currency_formatter}, - {id: "projected_qty", name: frappe._("Projected Qty"), + {id: "projected_qty", name: __("Projected Qty"), field: "projected_qty", width: 80, formatter: this.currency_formatter}, - {id: "re_order_level", name: frappe._("Re-Order Level"), + {id: "re_order_level", name: __("Re-Order Level"), field: "re_order_level", width: 80, formatter: this.currency_formatter}, - {id: "re_order_qty", name: frappe._("Re-Order Qty"), + {id: "re_order_qty", name: __("Re-Order Qty"), field: "re_order_qty", width: 80, formatter: this.currency_formatter}, ]; }, filters: [ - {fieldtype:"Link", label: frappe._("Item Code"), link:"Item", default_value: "Select Item...", + {fieldtype:"Link", label: __("Item Code"), link:"Item", default_value: "Select Item...", filter: function(val, item, opts) { return item.item_code == val || !val; }}, - {fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse", + {fieldtype:"Select", label: __("Warehouse"), link:"Warehouse", default_value: "Select Warehouse...", filter: function(val, item, opts) { return item.warehouse == val || val == opts.default_value; }}, - {fieldtype:"Select", label: frappe._("Brand"), link:"Brand", + {fieldtype:"Select", label: __("Brand"), link:"Brand", default_value: "Select Brand...", filter: function(val, item, opts) { return val == opts.default_value || item.brand == val; }}, - {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"}, - {fieldtype:"Button", label: frappe._("Reset Filters")} + {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"}, + {fieldtype:"Button", label: __("Reset Filters")} ], setup_filters: function() { diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js index 517ca4a65d..4faf89eaee 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.js @@ -5,14 +5,14 @@ frappe.query_reports["Batch-Wise Balance History"] = { "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "width": "80", "default": sys_defaults.year_start_date, }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "width": "80", "default": frappe.datetime.get_today() diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js index 55083e877c..400030125f 100644 --- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js +++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.js @@ -5,13 +5,13 @@ frappe.query_reports["Itemwise Recommended Reorder Level"] = { "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": sys_defaults.year_start_date }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": get_today() } diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.js b/erpnext/stock/report/stock_ageing/stock_ageing.js index 2a47f0ebe6..a4eac19b80 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.js +++ b/erpnext/stock/report/stock_ageing/stock_ageing.js @@ -5,7 +5,7 @@ frappe.query_reports["Stock Ageing"] = { "filters": [ { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company"), @@ -13,26 +13,26 @@ frappe.query_reports["Stock Ageing"] = { }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": frappe.datetime.get_today(), "reqd": 1 }, { "fieldname":"warehouse", - "label": frappe._("Warehouse"), + "label": __("Warehouse"), "fieldtype": "Link", "options": "Warehouse" }, { "fieldname":"item_code", - "label": frappe._("Item"), + "label": __("Item"), "fieldtype": "Link", "options": "Item" }, { "fieldname":"brand", - "label": frappe._("Brand"), + "label": __("Brand"), "fieldtype": "Link", "options": "Brand" } diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.js b/erpnext/stock/report/stock_ledger/stock_ledger.js index 32e868ab7b..efee9d621d 100644 --- a/erpnext/stock/report/stock_ledger/stock_ledger.js +++ b/erpnext/stock/report/stock_ledger/stock_ledger.js @@ -5,7 +5,7 @@ frappe.query_reports["Stock Ledger"] = { "filters": [ { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company", "default": frappe.defaults.get_user_default("company"), @@ -13,39 +13,39 @@ frappe.query_reports["Stock Ledger"] = { }, { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "default": frappe.datetime.add_months(frappe.datetime.get_today(), -1), "reqd": 1 }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "default": frappe.datetime.get_today(), "reqd": 1 }, { "fieldname":"warehouse", - "label": frappe._("Warehouse"), + "label": __("Warehouse"), "fieldtype": "Link", "options": "Warehouse" }, { "fieldname":"item_code", - "label": frappe._("Item"), + "label": __("Item"), "fieldtype": "Link", "options": "Item" }, { "fieldname":"brand", - "label": frappe._("Brand"), + "label": __("Brand"), "fieldtype": "Link", "options": "Brand" }, { "fieldname":"voucher_no", - "label": frappe._("Voucher #"), + "label": __("Voucher #"), "fieldtype": "Data" } ] diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.js b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.js index 3cb9ee1e1a..504ecec5b8 100644 --- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.js +++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.js @@ -5,25 +5,25 @@ frappe.query_reports["Stock Projected Qty"] = { "filters": [ { "fieldname":"company", - "label": frappe._("Company"), + "label": __("Company"), "fieldtype": "Link", "options": "Company" }, { "fieldname":"warehouse", - "label": frappe._("Warehouse"), + "label": __("Warehouse"), "fieldtype": "Link", "options": "Warehouse" }, { "fieldname":"item_code", - "label": frappe._("Item"), + "label": __("Item"), "fieldtype": "Link", "options": "Item" }, { "fieldname":"brand", - "label": frappe._("Brand"), + "label": __("Brand"), "fieldtype": "Link", "options": "Brand" } diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.js b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.js index 8af47b14b4..112b2ca62e 100644 --- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.js +++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.js @@ -5,21 +5,21 @@ frappe.query_reports["Supplier-Wise Sales Analytics"] = { "filters": [ { "fieldname":"supplier", - "label": frappe._("Supplier"), + "label": __("Supplier"), "fieldtype": "Link", "options": "Supplier", "width": "80" }, { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "width": "80", "default": frappe.datetime.month_start() }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "width": "80", "default": frappe.datetime.month_end() diff --git a/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js b/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js index 1fa85a2494..2543fa4667 100644 --- a/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js +++ b/erpnext/stock/report/warehouse_wise_stock_balance/warehouse_wise_stock_balance.js @@ -5,14 +5,14 @@ frappe.query_reports["Warehouse-Wise Stock Balance"] = { "filters": [ { "fieldname":"from_date", - "label": frappe._("From Date"), + "label": __("From Date"), "fieldtype": "Date", "width": "80", "default": sys_defaults.year_start_date, }, { "fieldname":"to_date", - "label": frappe._("To Date"), + "label": __("To Date"), "fieldtype": "Date", "width": "80", "default": frappe.datetime.get_today() diff --git a/erpnext/support/doctype/customer_issue/customer_issue.js b/erpnext/support/doctype/customer_issue/customer_issue.js index e3552c07e5..422ec98036 100644 --- a/erpnext/support/doctype/customer_issue/customer_issue.js +++ b/erpnext/support/doctype/customer_issue/customer_issue.js @@ -13,7 +13,7 @@ frappe.ui.form.on_change("Customer Issue", "contact_person", erpnext.support.CustomerIssue = frappe.ui.form.Controller.extend({ refresh: function() { if((cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) { - cur_frm.add_custom_button(frappe._('Make Maintenance Visit'), this.make_maintenance_visit) + cur_frm.add_custom_button(__('Make Maintenance Visit'), this.make_maintenance_visit) } }, diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js index c6ac73c0f7..9852eecfdb 100644 --- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js +++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js @@ -16,7 +16,7 @@ erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({ var me = this; if (this.frm.doc.docstatus === 0) { - this.frm.add_custom_button(frappe._('From Sales Order'), + this.frm.add_custom_button(__('From Sales Order'), function() { frappe.model.map_current_doc({ method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_schedule", @@ -30,7 +30,7 @@ erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({ }); }); } else if (this.frm.doc.docstatus === 1) { - this.frm.add_custom_button(frappe._("Make Maintenance Visit"), function() { + this.frm.add_custom_button(__("Make Maintenance Visit"), function() { frappe.model.open_mapped_doc({ method: "erpnext.support.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit", source_name: me.frm.doc.name @@ -88,7 +88,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(frappe._("Please enter Start Date and End Date")); + msgprint(__("Please enter Start Date and End Date")); } } @@ -99,7 +99,7 @@ cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) { refresh_field('maintenance_schedule_detail'); }); } else { - msgprint(frappe._("Please save the document before generating maintenance schedule")); + msgprint(__("Please save the document before generating maintenance schedule")); } } diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js index d469082ada..0f70cf24b1 100644 --- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js +++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js @@ -14,7 +14,7 @@ frappe.ui.form.on_change("Maintenance Visit", "contact_person", erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({ refresh: function() { if (this.frm.doc.docstatus===0) { - cur_frm.add_custom_button(frappe._('From Maintenance Schedule'), + cur_frm.add_custom_button(__('From Maintenance Schedule'), function() { frappe.model.map_current_doc({ method: "erpnext.support.doctype.maintenance_schedule.maintenance_schedule.make_maintenance_visit", @@ -26,7 +26,7 @@ erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({ } }) }); - cur_frm.add_custom_button(frappe._('From Customer Issue'), + cur_frm.add_custom_button(__('From Customer Issue'), function() { frappe.model.map_current_doc({ method: "erpnext.support.doctype.customer_issue.customer_issue.make_maintenance_visit", @@ -38,7 +38,7 @@ erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({ } }) }); - cur_frm.add_custom_button(frappe._('From Sales Order'), + cur_frm.add_custom_button(__('From Sales Order'), function() { frappe.model.map_current_doc({ method: "erpnext.selling.doctype.sales_order.sales_order.make_maintenance_visit", diff --git a/erpnext/support/doctype/newsletter/newsletter.js b/erpnext/support/doctype/newsletter/newsletter.js index 5c88692c91..911cb39f94 100644 --- a/erpnext/support/doctype/newsletter/newsletter.js +++ b/erpnext/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(frappe.boot.user.can_write, doc.doctype)) { - cur_frm.add_custom_button(frappe._('Send'), function() { + cur_frm.add_custom_button(__('Send'), function() { return $c_obj(doc, 'send_emails', '', function(r) { cur_frm.refresh(); }); diff --git a/erpnext/support/doctype/support_ticket/support_ticket.js b/erpnext/support/doctype/support_ticket/support_ticket.js index c18653549c..d09d7d66fc 100644 --- a/erpnext/support/doctype/support_ticket/support_ticket.js +++ b/erpnext/support/doctype/support_ticket/support_ticket.js @@ -11,8 +11,8 @@ cur_frm.add_fetch("customer", "customer_name", "customer_name") $.extend(cur_frm.cscript, { onload: function(doc, dt, dn) { if(in_list(user_roles,'System Manager')) { - cur_frm.footer.help_area.innerHTML = '

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

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

'+__("Support Email Settings")+'
\ + '+__("Integrate incoming support emails to Support Ticket")+'

'; } }, diff --git a/erpnext/support/page/support_analytics/support_analytics.js b/erpnext/support/page/support_analytics/support_analytics.js index d8e8214da4..5c2a722e11 100644 --- a/erpnext/support/page/support_analytics/support_analytics.js +++ b/erpnext/support/page/support_analytics/support_analytics.js @@ -4,7 +4,7 @@ frappe.pages['support-analytics'].onload = function(wrapper) { frappe.ui.make_app_page({ parent: wrapper, - title: frappe._('Support Analytics'), + title: __('Support Analytics'), single_column: true }); @@ -18,7 +18,7 @@ frappe.pages['support-analytics'].onload = function(wrapper) { erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({ init: function(wrapper) { this._super({ - title: frappe._("Support Analtyics"), + title: __("Support Analtyics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -27,22 +27,22 @@ erpnext.SupportAnalytics = frappe.views.GridReportWithPlot.extend({ }, filters: [ - {fieldtype:"Select", label: frappe._("Fiscal Year"), link:"Fiscal Year", + {fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year", default_value: "Select Fiscal Year..."}, - {fieldtype:"Date", label: frappe._("From Date")}, - {fieldtype:"Label", label: frappe._("To")}, - {fieldtype:"Date", label: frappe._("To Date")}, - {fieldtype:"Select", label: frappe._("Range"), + {fieldtype:"Date", label: __("From Date")}, + {fieldtype:"Label", label: __("To")}, + {fieldtype:"Date", label: __("To Date")}, + {fieldtype:"Select", label: __("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"}, - {fieldtype:"Button", label: frappe._("Reset Filters")} + {fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"}, + {fieldtype:"Button", label: __("Reset Filters")} ], setup_columns: function() { var std_columns = [ - {id: "check", name: frappe._("Plot"), field: "check", width: 30, + {id: "check", name: __("Plot"), field: "check", width: 30, formatter: this.check_formatter}, - {id: "status", name: frappe._("Status"), field: "status", width: 100}, + {id: "status", name: __("Status"), field: "status", width: 100}, ]; this.make_date_range_columns(); this.columns = std_columns.concat(this.columns); diff --git a/erpnext/utilities/doctype/rename_tool/rename_tool.js b/erpnext/utilities/doctype/rename_tool/rename_tool.js index 1338c0ec37..42ae34005f 100644 --- a/erpnext/utilities/doctype/rename_tool/rename_tool.js +++ b/erpnext/utilities/doctype/rename_tool/rename_tool.js @@ -19,7 +19,7 @@ cur_frm.cscript.setup_upload = function() { var me = this; var $wrapper = $(cur_frm.fields_dict.upload_html.wrapper).empty() .html("
" + - frappe._("Upload a .csv file with two columns: the old name and the new name. Max 500 rows.") + __("Upload a .csv file with two columns: the old name and the new name. Max 500 rows.") + "
"); var $log = $(cur_frm.fields_dict.rename_log.wrapper).empty(); diff --git a/erpnext/utilities/doctype/sms_control/sms_control.js b/erpnext/utilities/doctype/sms_control/sms_control.js index 24d314e0f5..60f53d92a2 100644 --- a/erpnext/utilities/doctype/sms_control/sms_control.js +++ b/erpnext/utilities/doctype/sms_control/sms_control.js @@ -53,7 +53,7 @@ function SMSManager() { return $c_obj('SMS Control', 'send_form_sms', v, function(r,rt) { $(this).done_working(); if(r.exc) {msgprint(r.exc); return; } - msgprint('Message Sent'); + msgprint(__('Message Sent')); me.dialog.hide(); }) }