mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
Merge branch 'i18n' of git://github.com/bperretti/erpnext into bperretti-i18n
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
wn.pages['sales-analytics'].onload = function(wrapper) {
|
||||
wn.ui.make_app_page({
|
||||
parent: wrapper,
|
||||
title: 'Sales Analytics',
|
||||
title: wn._('Sales Analytics'),
|
||||
single_column: true
|
||||
});
|
||||
new erpnext.SalesAnalytics(wrapper);
|
||||
@@ -17,7 +17,7 @@ wn.pages['sales-analytics'].onload = function(wrapper) {
|
||||
erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
init: function(wrapper) {
|
||||
this._super({
|
||||
title: "Sales Analytics",
|
||||
title: wn._("Sales Analytics"),
|
||||
page: wrapper,
|
||||
parent: $(wrapper).find('.layout-main'),
|
||||
appframe: wrapper.appframe,
|
||||
@@ -30,14 +30,14 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
|
||||
this.tree_grids = {
|
||||
"Customer Group": {
|
||||
label: "Customer Group / Customer",
|
||||
label: wn._("Customer Group / Customer"),
|
||||
show: true,
|
||||
item_key: "customer",
|
||||
parent_field: "parent_customer_group",
|
||||
formatter: function(item) { return item.name; }
|
||||
},
|
||||
"Customer": {
|
||||
label: "Customer",
|
||||
label: wn._("Customer"),
|
||||
show: false,
|
||||
item_key: "customer",
|
||||
formatter: function(item) {
|
||||
@@ -45,7 +45,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
}
|
||||
},
|
||||
"Item Group": {
|
||||
label: "Item",
|
||||
label: wn._("Item"),
|
||||
show: true,
|
||||
parent_field: "parent_item_group",
|
||||
item_key: "item_code",
|
||||
@@ -54,7 +54,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
}
|
||||
},
|
||||
"Item": {
|
||||
label: "Item",
|
||||
label: wn._("Item"),
|
||||
show: false,
|
||||
item_key: "item_code",
|
||||
formatter: function(item) {
|
||||
@@ -62,7 +62,7 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
}
|
||||
},
|
||||
"Territory": {
|
||||
label: "Territory / Customer",
|
||||
label: wn._("Territory / Customer"),
|
||||
show: true,
|
||||
item_key: "customer",
|
||||
parent_field: "parent_territory",
|
||||
@@ -88,23 +88,23 @@ erpnext.SalesAnalytics = wn.views.TreeGridReport.extend({
|
||||
this.columns = std_columns.concat(this.columns);
|
||||
},
|
||||
filters: [
|
||||
{fieldtype:"Select", label: "Tree Type", options:["Customer Group", "Customer",
|
||||
{fieldtype:"Select", label: wn._("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", label: "Based On", options:["Sales Invoice",
|
||||
{fieldtype:"Select", label: wn._("Based On"), options:["Sales Invoice",
|
||||
"Sales Order", "Delivery Note"]},
|
||||
{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;
|
||||
|
||||
@@ -15,8 +15,9 @@ pscript['onload_Sales Browser'] = function(wrapper){
|
||||
|
||||
$(wrapper)
|
||||
.find(".layout-side-section")
|
||||
.html('<div class="text-muted">Click on a link to get options to expand \
|
||||
get options Add / Edit / Delete.</div>')
|
||||
.html('<div class="text-muted">'+
|
||||
wn._('Click on a link to get options to expand get options ') +
|
||||
wn._('Add') + ' / ' + wn._('Edit') + ' / '+ wn._('Delete') + '.</div>')
|
||||
|
||||
wrapper.make_tree = function() {
|
||||
var ctype = wn.get_route()[1] || 'Territory';
|
||||
@@ -87,22 +88,22 @@ erpnext.SalesChart = Class.extend({
|
||||
var node_links = [];
|
||||
|
||||
if (wn.model.can_read(this.ctype)) {
|
||||
node_links.push('<a onclick="erpnext.sales_chart.open();">Edit</a>');
|
||||
node_links.push('<a onclick="erpnext.sales_chart.open();">'+wn._('Edit')+'</a>');
|
||||
}
|
||||
|
||||
if(data.expandable) {
|
||||
if (wn.boot.profile.can_create.indexOf(this.ctype) !== -1 ||
|
||||
wn.boot.profile.in_create.indexOf(this.ctype) !== -1) {
|
||||
node_links.push('<a onclick="erpnext.sales_chart.new_node();">Add Child</a>');
|
||||
node_links.push('<a onclick="erpnext.sales_chart.new_node();">' + wn._('Add Child') + '</a>');
|
||||
}
|
||||
}
|
||||
|
||||
if (wn.model.can_write(this.ctype)) {
|
||||
node_links.push('<a onclick="erpnext.sales_chart.rename()">Rename</a>');
|
||||
node_links.push('<a onclick="erpnext.sales_chart.rename()">' + wn._('Rename') + '</a>');
|
||||
};
|
||||
|
||||
if (wn.model.can_delete(this.ctype)) {
|
||||
node_links.push('<a onclick="erpnext.sales_chart.delete()">Delete</a>');
|
||||
node_links.push('<a onclick="erpnext.sales_chart.delete()">' + wn._('Delete') + '</a>');
|
||||
};
|
||||
|
||||
link.toolbar.append(node_links.join(" | "));
|
||||
@@ -114,18 +115,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: "Further nodes can be only created under 'Group' type nodes"},
|
||||
description: wn._("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: "Please enter Employee Id of this sales parson"});
|
||||
options:'Employee', description: wn._("Please enter Employee Id of this sales parson")});
|
||||
}
|
||||
|
||||
// the dialog
|
||||
var d = new wn.ui.Dialog({
|
||||
title:'New ' + me.ctype,
|
||||
title: wn._('New ') + wn._(me.ctype),
|
||||
fields: fields
|
||||
})
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ wn.module_page["Selling"] = [
|
||||
"label": wn._("Selling Settings"),
|
||||
"route": "Form/Selling Settings",
|
||||
"doctype":"Selling Settings",
|
||||
"description": "Settings for Selling Module"
|
||||
"description": wn._("Settings for Selling Module")
|
||||
},
|
||||
{
|
||||
"route":"Form/Shopping Cart Settings",
|
||||
|
||||
Reference in New Issue
Block a user