From 21fc1f26529de5af8a202da34fe46c7b3a25ceaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1rbara=20Perretti?= Date: Tue, 15 Oct 2013 16:18:18 -0300 Subject: [PATCH] Fix translate buying/page/purchase_analytics/purchase_analytics.js --- .../purchase_analytics/purchase_analytics.js | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/buying/page/purchase_analytics/purchase_analytics.js b/buying/page/purchase_analytics/purchase_analytics.js index c163052a6a..6a8fc1ae0f 100644 --- a/buying/page/purchase_analytics/purchase_analytics.js +++ b/buying/page/purchase_analytics/purchase_analytics.js @@ -4,7 +4,7 @@ wn.pages['purchase-analytics'].onload = function(wrapper) { wn.ui.make_app_page({ parent: wrapper, - title: 'Purchase Analytics', + title: wn._('Purchase Analytics'), single_column: true }); @@ -18,7 +18,7 @@ wn.pages['purchase-analytics'].onload = function(wrapper) { erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ init: function(wrapper) { this._super({ - title: "Purchase Analytics", + title: wn._("Purchase Analytics"), page: wrapper, parent: $(wrapper).find('.layout-main'), appframe: wrapper.appframe, @@ -31,7 +31,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.tree_grids = { "Supplier Type": { - label: "Supplier Type / Supplier", + label: wn._("Supplier Type / Supplier"), show: true, item_key: "supplier", parent_field: "parent_supplier_type", @@ -44,7 +44,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ } }, "Supplier": { - label: "Supplier", + label: wn._("Supplier"), show: false, item_key: "supplier", formatter: function(item) { @@ -74,7 +74,7 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.tree_grid = this.tree_grids[this.tree_type]; var std_columns = [ - {id: "check", name: "Plot", field: "check", width: 30, + {id: "check", name: wn._("Plot"), field: "check", width: 30, formatter: this.check_formatter}, {id: "name", name: this.tree_grid.label, field: "name", width: 300, formatter: this.tree_formatter}, @@ -86,23 +86,23 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ this.columns = std_columns.concat(this.columns); }, filters: [ - {fieldtype:"Select", label: "Tree Type", options:["Supplier Type", "Supplier", + {fieldtype:"Select", label: wn._("Tree Type"), options:["Supplier Type", "Supplier", "Item Group", "Item"], filter: function(val, item, opts, me) { return me.apply_zero_filter(val, item, opts, me); }}, - {fieldtype:"Select", label: "Based On", options:["Purchase Invoice", + {fieldtype:"Select", label: wn._("Based On"), options:["Purchase Invoice", "Purchase Order", "Purchase Receipt"]}, - {fieldtype:"Select", label: "Value or Qty", options:["Value", "Quantity"]}, - {fieldtype:"Select", label: "Company", link:"Company", + {fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"]}, + {fieldtype:"Select", label: wn._("Company"), link:"Company", default_value: "Select Company..."}, - {fieldtype:"Date", label: "From Date"}, - {fieldtype:"Label", label: "To"}, - {fieldtype:"Date", label: "To Date"}, - {fieldtype:"Select", label: "Range", + {fieldtype:"Date", label: wn._("From Date")}, + {fieldtype:"Label", label: wn._("To")}, + {fieldtype:"Date", label: wn._("To Date")}, + {fieldtype:"Select", label: wn._("Range"), options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]}, - {fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, - {fieldtype:"Button", label: "Reset Filters"} + {fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"}, + {fieldtype:"Button", label: wn._("Reset Filters")} ], setup_filters: function() { var me = this; @@ -130,18 +130,18 @@ erpnext.PurchaseAnalytics = wn.views.TreeGridReport.extend({ }) wn.report_dump.data["Supplier Type"] = [{ - name: "All Supplier Types", + name: wn._("All Supplier Types"), id: "All Supplier Types", }].concat(wn.report_dump.data["Supplier Type"]); wn.report_dump.data["Supplier"].push({ - name: "Not Set", + name: wn._("Not Set"), parent_supplier_type: "All Supplier Types", id: "Not Set", }); wn.report_dump.data["Item"].push({ - name: "Not Set", + name: wn._("Not Set"), parent_item_group: "All Item Groups", id: "Not Set", });