From e3b63f2d9c4f72b5f485d538d83fa932e931e710 Mon Sep 17 00:00:00 2001 From: 81552433qqcom <81552433@qq.com> Date: Fri, 12 Sep 2014 16:06:13 +0800 Subject: [PATCH] added __() for options that need label. --- erpnext/public/js/purchase_trends_filters.js | 14 +++++++++++-- erpnext/public/js/sales_trends_filters.js | 22 +++++++++++++++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/erpnext/public/js/purchase_trends_filters.js b/erpnext/public/js/purchase_trends_filters.js index 2870dcf8de..39c7bba60e 100644 --- a/erpnext/public/js/purchase_trends_filters.js +++ b/erpnext/public/js/purchase_trends_filters.js @@ -19,14 +19,24 @@ var get_filters = function(){ "fieldname":"based_on", "label": __("Based On"), "fieldtype": "Select", - "options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"), + "options": [ + { "value": "Item", "label": __("Item") }, + { "value": "Item Group", "label": __("Item Group") }, + { "value": "Supplier", "label": __("Supplier") }, + { "value": "Supplier Type", "label": __("Supplier Type") }, + { "value": "Supplier Type", "label": __("Project") } + ], "default": "Item" }, { "fieldname":"group_by", "label": __("Group By"), "fieldtype": "Select", - "options": ["", "Item", "Supplier"].join("\n"), + "options": [ + { "value": "", "label": "" }, + { "value": "Item", "label": __("Item") }, + { "value": "Supplier", "label": __("Supplier") } + ], "default": "" }, { diff --git a/erpnext/public/js/sales_trends_filters.js b/erpnext/public/js/sales_trends_filters.js index 89c269e339..5598e59935 100644 --- a/erpnext/public/js/sales_trends_filters.js +++ b/erpnext/public/js/sales_trends_filters.js @@ -7,21 +7,37 @@ var get_filters = function(){ "fieldname":"period", "label": __("Period"), "fieldtype": "Select", - "options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"), + "options": [ + { "value": "Monthly", "label": __("Monthly") }, + { "value": "Quarterly", "label": __("Quarterly") }, + { "value": "Half-Yearly", "label": __("Half-Yearly") }, + { "value": "Yearly", "label": __("Yearly") } + ], "default": "Monthly" }, { "fieldname":"based_on", "label": __("Based On"), "fieldtype": "Select", - "options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"), + "options": [ + { "value": "Item", "label": __("Item") }, + { "value": "Item Group", "label": __("Item Group") }, + { "value": "Customer", "label": __("Customer") }, + { "value": "Customer Group", "label": __("Customer Group") }, + { "value": "Territory", "label": __("Territory") }, + { "value": "Supplier Type", "label": __("Project") } + ], "default": "Item" }, { "fieldname":"group_by", "label": __("Group By"), "fieldtype": "Select", - "options": ["", "Item", "Customer"].join("\n"), + "options": [ + { "value": "", "label": "" }, + { "value": "Item", "label": __("Item") }, + { "value": "Customer", "label": __("Customer") } + ], "default": "" }, {