traslation issue fixed in setup wizard and desktop

This commit is contained in:
Nabin Hait 2014-05-16 19:56:06 +05:30
parent 091b48168e
commit e60853930b
3 changed files with 67 additions and 61 deletions

View File

@ -1,60 +1,61 @@
from frappe import _ from frappe import _
data = { def get_data():
"Accounts": { return {
"color": "#3498db", "Accounts": {
"icon": "icon-money", "color": "#3498db",
"type": "module" "icon": "icon-money",
}, "type": "module"
"Activity": { },
"color": "#e67e22", "Activity": {
"icon": "icon-play", "color": "#e67e22",
"label": _("Activity"), "icon": "icon-play",
"link": "activity", "label": _("Activity"),
"type": "page" "link": "activity",
}, "type": "page"
"Buying": { },
"color": "#c0392b", "Buying": {
"icon": "icon-shopping-cart", "color": "#c0392b",
"type": "module" "icon": "icon-shopping-cart",
}, "type": "module"
"HR": { },
"color": "#2ecc71", "HR": {
"icon": "icon-group", "color": "#2ecc71",
"label": _("Human Resources"), "icon": "icon-group",
"type": "module" "label": _("Human Resources"),
}, "type": "module"
"Manufacturing": { },
"color": "#7f8c8d", "Manufacturing": {
"icon": "icon-cogs", "color": "#7f8c8d",
"type": "module" "icon": "icon-cogs",
}, "type": "module"
"Notes": { },
"color": "#95a5a6", "Notes": {
"doctype": "Note", "color": "#95a5a6",
"icon": "icon-file-alt", "doctype": "Note",
"label": _("Notes"), "icon": "icon-file-alt",
"link": "List/Note", "label": _("Notes"),
"type": "list" "link": "List/Note",
}, "type": "list"
"Projects": { },
"color": "#8e44ad", "Projects": {
"icon": "icon-puzzle-piece", "color": "#8e44ad",
"type": "module" "icon": "icon-puzzle-piece",
}, "type": "module"
"Selling": { },
"color": "#1abc9c", "Selling": {
"icon": "icon-tag", "color": "#1abc9c",
"type": "module" "icon": "icon-tag",
}, "type": "module"
"Stock": { },
"color": "#f39c12", "Stock": {
"icon": "icon-truck", "color": "#f39c12",
"type": "module" "icon": "icon-truck",
}, "type": "module"
"Support": { },
"color": "#2c3e50", "Support": {
"icon": "icon-phone", "color": "#2c3e50",
"type": "module" "icon": "icon-phone",
"type": "module"
}
} }
}

View File

@ -32,7 +32,7 @@
{ {
"fieldname": "cb0", "fieldname": "cb0",
"fieldtype": "Column Break", "fieldtype": "Column Break",
"in_list_view": 1, "in_list_view": 0,
"permlevel": 0 "permlevel": 0
}, },
{ {
@ -162,7 +162,7 @@
"in_create": 1, "in_create": 1,
"issingle": 0, "issingle": 0,
"max_attachments": 3, "max_attachments": 3,
"modified": "2014-05-04 00:06:26.075492", "modified": "2014-05-16 15:26:47.322787",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Setup", "module": "Setup",
"name": "Item Group", "name": "Item Group",

View File

@ -68,6 +68,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
onload: function(slide) { onload: function(slide) {
slide.get_input("language").on("change", function() { slide.get_input("language").on("change", function() {
var lang = $(this).val(); var lang = $(this).val();
frappe._messages = {};
frappe.call({ frappe.call({
method: "erpnext.setup.page.setup_wizard.setup_wizard.load_messages", method: "erpnext.setup.page.setup_wizard.setup_wizard.load_messages",
args: { 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."), "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": [], "fields": [],
before_load: function(slide) { before_load: function(slide) {
slide.fields = [];
for(var i=1; i<4; i++) { for(var i=1; i<4; i++) {
slide.fields = slide.fields.concat([ slide.fields = slide.fields.concat([
{fieldtype:"Data", fieldname:"tax_"+ i, label:__("Tax") + " " + i, {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."), "help": __("List a few of your customers. They could be organizations or individuals."),
"fields": [], "fields": [],
before_load: function(slide) { before_load: function(slide) {
slide.fields = [];
for(var i=1; i<6; i++) { for(var i=1; i<6; i++) {
slide.fields = slide.fields.concat([ slide.fields = slide.fields.concat([
{fieldtype:"Data", fieldname:"customer_" + i, label:__("Customer") + " " + i, {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."), "help": __("List a few of your suppliers. They could be organizations or individuals."),
"fields": [], "fields": [],
before_load: function(slide) { before_load: function(slide) {
slide.fields = [];
for(var i=1; i<6; i++) { for(var i=1; i<6; i++) {
slide.fields = slide.fields.concat([ slide.fields = slide.fields.concat([
{fieldtype:"Data", fieldname:"supplier_" + i, label:__("Supplier")+" " + i, {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."), "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": [], "fields": [],
before_load: function(slide) { before_load: function(slide) {
slide.fields = [];
for(var i=1; i<6; i++) { for(var i=1; i<6; i++) {
slide.fields = slide.fields.concat([ slide.fields = slide.fields.concat([
{fieldtype:"Section Break", show_section_border: true}, {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_sales_item_" + i, label:__("We sell this Item")},
{fieldtype: "Check", fieldname: "is_purchase_item_" + i, label:__("We buy this Item")}, {fieldtype: "Check", fieldname: "is_purchase_item_" + i, label:__("We buy this Item")},
{fieldtype:"Column Break"}, {fieldtype:"Column Break"},
{fieldtype:"Select", label:"Group", fieldname:"item_group_" + i, {fieldtype:"Select", label:__("Group"), fieldname:"item_group_" + i,
options:[__("Products"), __("Services"), options:[__("Products"), __("Services"),
__("Raw Material"), __("Consumable"), __("Sub Assemblies")]}, __("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"), options:[__("Unit"), __("Nos"), __("Box"), __("Pair"), __("Kg"), __("Set"),
__("Hour"), __("Minute")]}, __("Hour"), __("Minute")]},
{fieldtype:"Attach", fieldname:"item_img_" + i, label:__("Attach Image")}, {fieldtype:"Attach", fieldname:"item_img_" + i, label:__("Attach Image")},