From e60853930bb25bbbe10823c0351e8de793e1fec4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 16 May 2014 19:56:06 +0530 Subject: [PATCH] traslation issue fixed in setup wizard and desktop --- erpnext/config/desktop.py | 115 +++++++++--------- .../setup/doctype/item_group/item_group.json | 4 +- .../setup/page/setup_wizard/setup_wizard.js | 9 +- 3 files changed, 67 insertions(+), 61 deletions(-) diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py index 700013fcd9d..4b9f8f8a660 100644 --- a/erpnext/config/desktop.py +++ b/erpnext/config/desktop.py @@ -1,60 +1,61 @@ from frappe import _ -data = { - "Accounts": { - "color": "#3498db", - "icon": "icon-money", - "type": "module" - }, - "Activity": { - "color": "#e67e22", - "icon": "icon-play", - "label": _("Activity"), - "link": "activity", - "type": "page" - }, - "Buying": { - "color": "#c0392b", - "icon": "icon-shopping-cart", - "type": "module" - }, - "HR": { - "color": "#2ecc71", - "icon": "icon-group", - "label": _("Human Resources"), - "type": "module" - }, - "Manufacturing": { - "color": "#7f8c8d", - "icon": "icon-cogs", - "type": "module" - }, - "Notes": { - "color": "#95a5a6", - "doctype": "Note", - "icon": "icon-file-alt", - "label": _("Notes"), - "link": "List/Note", - "type": "list" - }, - "Projects": { - "color": "#8e44ad", - "icon": "icon-puzzle-piece", - "type": "module" - }, - "Selling": { - "color": "#1abc9c", - "icon": "icon-tag", - "type": "module" - }, - "Stock": { - "color": "#f39c12", - "icon": "icon-truck", - "type": "module" - }, - "Support": { - "color": "#2c3e50", - "icon": "icon-phone", - "type": "module" +def get_data(): + return { + "Accounts": { + "color": "#3498db", + "icon": "icon-money", + "type": "module" + }, + "Activity": { + "color": "#e67e22", + "icon": "icon-play", + "label": _("Activity"), + "link": "activity", + "type": "page" + }, + "Buying": { + "color": "#c0392b", + "icon": "icon-shopping-cart", + "type": "module" + }, + "HR": { + "color": "#2ecc71", + "icon": "icon-group", + "label": _("Human Resources"), + "type": "module" + }, + "Manufacturing": { + "color": "#7f8c8d", + "icon": "icon-cogs", + "type": "module" + }, + "Notes": { + "color": "#95a5a6", + "doctype": "Note", + "icon": "icon-file-alt", + "label": _("Notes"), + "link": "List/Note", + "type": "list" + }, + "Projects": { + "color": "#8e44ad", + "icon": "icon-puzzle-piece", + "type": "module" + }, + "Selling": { + "color": "#1abc9c", + "icon": "icon-tag", + "type": "module" + }, + "Stock": { + "color": "#f39c12", + "icon": "icon-truck", + "type": "module" + }, + "Support": { + "color": "#2c3e50", + "icon": "icon-phone", + "type": "module" + } } -} \ No newline at end of file diff --git a/erpnext/setup/doctype/item_group/item_group.json b/erpnext/setup/doctype/item_group/item_group.json index 8ab7262de1f..a77978ee8b9 100644 --- a/erpnext/setup/doctype/item_group/item_group.json +++ b/erpnext/setup/doctype/item_group/item_group.json @@ -32,7 +32,7 @@ { "fieldname": "cb0", "fieldtype": "Column Break", - "in_list_view": 1, + "in_list_view": 0, "permlevel": 0 }, { @@ -162,7 +162,7 @@ "in_create": 1, "issingle": 0, "max_attachments": 3, - "modified": "2014-05-04 00:06:26.075492", + "modified": "2014-05-16 15:26:47.322787", "modified_by": "Administrator", "module": "Setup", "name": "Item Group", diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js index ee1daa19d77..cf166568690 100644 --- a/erpnext/setup/page/setup_wizard/setup_wizard.js +++ b/erpnext/setup/page/setup_wizard/setup_wizard.js @@ -68,6 +68,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { onload: function(slide) { slide.get_input("language").on("change", function() { var lang = $(this).val(); + frappe._messages = {}; frappe.call({ method: "erpnext.setup.page.setup_wizard.setup_wizard.load_messages", args: { @@ -240,6 +241,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "help": __("List your tax heads (e.g. VAT, Excise; they should have unique names) and their standard rates. This will create a standard template, which you can edit and add more later."), "fields": [], before_load: function(slide) { + slide.fields = []; for(var i=1; i<4; i++) { slide.fields = slide.fields.concat([ {fieldtype:"Data", fieldname:"tax_"+ i, label:__("Tax") + " " + i, @@ -259,6 +261,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "help": __("List a few of your customers. They could be organizations or individuals."), "fields": [], before_load: function(slide) { + slide.fields = []; for(var i=1; i<6; i++) { slide.fields = slide.fields.concat([ {fieldtype:"Data", fieldname:"customer_" + i, label:__("Customer") + " " + i, @@ -279,6 +282,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "help": __("List a few of your suppliers. They could be organizations or individuals."), "fields": [], before_load: function(slide) { + slide.fields = []; for(var i=1; i<6; i++) { slide.fields = slide.fields.concat([ {fieldtype:"Data", fieldname:"supplier_" + i, label:__("Supplier")+" " + i, @@ -299,6 +303,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { "help": __("List your products or services that you buy or sell. Make sure to check the Item Group, Unit of Measure and other properties when you start."), "fields": [], before_load: function(slide) { + slide.fields = []; for(var i=1; i<6; i++) { slide.fields = slide.fields.concat([ {fieldtype:"Section Break", show_section_border: true}, @@ -307,10 +312,10 @@ frappe.pages['setup-wizard'].onload = function(wrapper) { {fieldtype: "Check", fieldname: "is_sales_item_" + i, label:__("We sell this Item")}, {fieldtype: "Check", fieldname: "is_purchase_item_" + i, label:__("We buy this Item")}, {fieldtype:"Column Break"}, - {fieldtype:"Select", label:"Group", fieldname:"item_group_" + i, + {fieldtype:"Select", label:__("Group"), fieldname:"item_group_" + i, options:[__("Products"), __("Services"), __("Raw Material"), __("Consumable"), __("Sub Assemblies")]}, - {fieldtype:"Select", fieldname:"item_uom_" + i, label:"UOM", + {fieldtype:"Select", fieldname:"item_uom_" + i, label:__("UOM"), options:[__("Unit"), __("Nos"), __("Box"), __("Pair"), __("Kg"), __("Set"), __("Hour"), __("Minute")]}, {fieldtype:"Attach", fieldname:"item_img_" + i, label:__("Attach Image")},