Merge branch 'i18n' of git://github.com/bperretti/erpnext into bperretti-i18n

This commit is contained in:
Nabin Hait
2013-10-24 11:40:32 +05:30
112 changed files with 677 additions and 617 deletions

View File

@@ -77,7 +77,7 @@ cur_frm.cscript.make_address = function() {
return "select name, address_type, address_line1, address_line2, city, state, country, pincode, fax, email_id, phone, is_primary_address, is_shipping_address from tabAddress where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
},
as_dict: 1,
no_results_message: 'No addresses created',
no_results_message: wn._('No addresses created'),
render_row: cur_frm.cscript.render_address_row,
});
// note: render_address_row is defined in contact_control.js

View File

@@ -24,8 +24,8 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
if(in_list(user_roles,'System Manager')) {
cur_frm.footer.help_area.innerHTML = '<hr>\
<p><a href="#Form/Sales Email Settings">Sales Email Settings</a><br>\
<span class="help">Automatically extract Leads from a mail box e.g. "sales@example.com"</span></p>';
<p><a href="#Form/Sales Email Settings">'+wn._('Sales Email Settings')+'</a><br>\
<span class="help">'+wn._('Automatically extract Leads from a mail box e.g.')+' "sales@example.com"</span></p>';
}
},
@@ -36,9 +36,9 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer;
if(!this.frm.doc.__islocal && !this.frm.__is_customer) {
this.frm.add_custom_button("Create Customer", this.create_customer);
this.frm.add_custom_button("Create Opportunity", this.create_opportunity);
this.frm.add_custom_button("Send SMS", this.frm.cscript.send_sms);
this.frm.add_custom_button(wn._("Create Customer"), this.create_customer);
this.frm.add_custom_button(wn._("Create Opportunity"), this.create_opportunity);
this.frm.add_custom_button(wn._("Send SMS"), this.frm.cscript.send_sms);
}
cur_frm.communication_view = new wn.views.CommunicationList({
@@ -68,7 +68,7 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
order by is_primary_address, is_shipping_address desc'
},
as_dict: 1,
no_results_message: 'No addresses created',
no_results_message: wn._('No addresses created'),
render_row: this.render_address_row,
});
// note: render_address_row is defined in contact_control.js

View File

@@ -103,12 +103,19 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn){
erpnext.hide_naming_series();
cur_frm.clear_custom_buttons();
<<<<<<< HEAD
if(doc.docstatus === 1 && doc.status!=="Opportunity Lost") {
cur_frm.add_custom_button( wn._('Create Quotation'), cur_frm.cscript.create_quotation);
cur_frm.add_custom_button(wn._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
=======
if(doc.docstatus === 1 && doc.status!=="Lost") {
cur_frm.add_custom_button('Create Quotation', cur_frm.cscript.create_quotation);
if(doc.status!=="Quotation") {
cur_frm.add_custom_button('Opportunity Lost', cur_frm.cscript['Declare Opportunity Lost']);
}
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
>>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b
}
cur_frm.toggle_display("contact_info", doc.customer || doc.lead);
@@ -174,11 +181,11 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) {
cur_frm.cscript['Declare Opportunity Lost'] = function(){
var dialog = new wn.ui.Dialog({
title: "Set as Lost",
title: wn._("Set as Lost"),
fields: [
{"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason",
{"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason",
"reqd": 1 },
{"fieldtype": "Button", "label": "Update", "fieldname": "update"},
{"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"},
]
});
@@ -191,7 +198,7 @@ cur_frm.cscript['Declare Opportunity Lost'] = function(){
args: args.reason,
callback: function(r) {
if(r.exc) {
msgprint("There were errors.");
msgprint(wn._("There were errors."));
return;
}
dialog.hide();

View File

@@ -25,12 +25,19 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
refresh: function(doc, dt, dn) {
this._super(doc, dt, dn);
<<<<<<< HEAD
if(doc.docstatus == 1 && doc.status!=='Order Lost') {
cur_frm.add_custom_button(wn._('Make Sales Order'), cur_frm.cscript['Make Sales Order']);
if(doc.status!=="Order Confirmed") {
cur_frm.add_custom_button(wn._('Set as Lost'), cur_frm.cscript['Declare Order Lost']);
=======
if(doc.docstatus == 1 && doc.status!=='Lost') {
cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);
if(doc.status!=="Ordered") {
cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
>>>>>>> f146e8b7f52a3e46e335c0fefd92c347717b370b
}
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
cur_frm.add_custom_button(wn._('Send SMS'), cur_frm.cscript.send_sms);
}
if (this.frm.doc.docstatus===0) {
@@ -122,9 +129,9 @@ cur_frm.cscript['Declare Order Lost'] = function(){
var dialog = new wn.ui.Dialog({
title: "Set as Lost",
fields: [
{"fieldtype": "Text", "label": "Reason for losing", "fieldname": "reason",
{"fieldtype": "Text", "label": wn._("Reason for losing"), "fieldname": "reason",
"reqd": 1 },
{"fieldtype": "Button", "label": "Update", "fieldname": "update"},
{"fieldtype": "Button", "label": wn._("Update"), "fieldname": "update"},
]
});
@@ -137,7 +144,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){
args: args.reason,
callback: function(r) {
if(r.exc) {
msgprint("There were errors.");
msgprint(wn._("There were errors."));
return;
}
dialog.hide();

View File

@@ -4,7 +4,7 @@
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_enable('new_item_code', doc.__islocal);
if(!doc.__islocal) {
cur_frm.add_custom_button("Check for Duplicates", function() {
cur_frm.add_custom_button(wn._("Check for Duplicates"), function() {
return cur_frm.call_server('check_duplicate', 1)
}, 'icon-search')
}
@@ -15,8 +15,8 @@ cur_frm.fields_dict.new_item_code.get_query = function() {
query: "selling.doctype.sales_bom.sales_bom.get_new_item_code"
}
}
cur_frm.fields_dict.new_item_code.query_description = 'Select Item where "Is Stock Item" is "No" \
and "Is Sales Item" is "Yes" and there is no other Sales BOM';
cur_frm.fields_dict.new_item_code.query_description = wn._('Select Item where "Is Stock Item" is "No"')+
wn._('and "Is Sales Item" is "Yes" and there is no other Sales BOM');
cur_frm.cscript.item_code = function(doc, dt, dn) {
var d = locals[dt][dn];

View File

@@ -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;

View File

@@ -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
})

View File

@@ -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",

View File

@@ -5,7 +5,7 @@ wn.query_reports["Customers Not Buying Since Long Time"] = {
"filters": [
{
"fieldname":"days_since_last_order",
"label": "Days Since Last Order",
"label": wn._("Days Since Last Order"),
"fieldtype": "Int",
"default": 60
}

View File

@@ -5,21 +5,21 @@ wn.query_reports["Sales Person Target Variance Item Group-Wise"] = {
"filters": [
{
fieldname: "fiscal_year",
label: "Fiscal Year",
label: wn._("Fiscal Year"),
fieldtype: "Link",
options: "Fiscal Year",
default: sys_defaults.fiscal_year
},
{
fieldname: "period",
label: "Period",
label: wn._("Period"),
fieldtype: "Select",
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
default: "Monthly"
},
{
fieldname: "target_on",
label: "Target On",
label: wn._("Target On"),
fieldtype: "Select",
options: "Quantity\nAmount",
default: "Quantity"

View File

@@ -5,57 +5,57 @@ wn.query_reports["Sales Person-wise Transaction Summary"] = {
"filters": [
{
fieldname: "sales_person",
label: "Sales Person",
label: wn._("Sales Person"),
fieldtype: "Link",
options: "Sales Person"
},
{
fieldname: "doc_type",
label: "Document Type",
label: wn._("Document Type"),
fieldtype: "Select",
options: "Sales Order\nDelivery Note\nSales Invoice",
default: "Sales Order"
},
{
fieldname: "from_date",
label: "From Date",
label: wn._("From Date"),
fieldtype: "Date",
default: wn.defaults.get_user_default("year_start_date"),
},
{
fieldname:"to_date",
label: "To Date",
label: wn._("To Date"),
fieldtype: "Date",
default: get_today()
},
{
fieldname:"company",
label: "Company",
label: wn._("Company"),
fieldtype: "Link",
options: "Company",
default: wn.defaults.get_default("company")
},
{
fieldname:"item_group",
label: "Item Group",
label: wn._("Item Group"),
fieldtype: "Link",
options: "Item Group",
},
{
fieldname:"brand",
label: "Brand",
label: wn._("Brand"),
fieldtype: "Link",
options: "Brand",
},
{
fieldname:"customer",
label: "Customer",
label: wn._("Customer"),
fieldtype: "Link",
options: "Customer",
},
{
fieldname:"territory",
label: "Territory",
label: wn._("Territory"),
fieldtype: "Link",
options: "Territory",
},

View File

@@ -5,21 +5,21 @@ wn.query_reports["Territory Target Variance Item Group-Wise"] = {
"filters": [
{
fieldname: "fiscal_year",
label: "Fiscal Year",
label: wn._("Fiscal Year"),
fieldtype: "Link",
options: "Fiscal Year",
default: sys_defaults.fiscal_year
},
{
fieldname: "period",
label: "Period",
label: wn._("Period"),
fieldtype: "Select",
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
default: "Monthly"
},
{
fieldname: "target_on",
label: "Target On",
label: wn._("Target On"),
fieldtype: "Select",
options: "Quantity\nAmount",
default: "Quantity"

View File

@@ -71,7 +71,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
this.frm.set_query("batch_no", this.fname, function(doc, cdt, cdn) {
var item = wn.model.get_doc(cdt, cdn);
if(!item.item_code) {
wn.throw("Please enter Item Code to get batch no");
wn.throw(wn._("Please enter Item Code to get batch no"));
} else {
filters = {
'item_code': item.item_code,
@@ -625,12 +625,12 @@ var set_sales_bom_help = function(doc) {
$(cur_frm.fields_dict.packing_list.row.wrapper).toggle(true);
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
help_msg = "<div class='alert alert-warning'> \
For 'Sales BOM' items, warehouse, serial no and batch no \
help_msg = "<div class='alert alert-warning'>" +
wn._("For 'Sales BOM' items, warehouse, serial no and batch no \
will be considered from the 'Packing List' table. \
If warehouse and batch no are same for all packing items for any 'Sales BOM' item, \
those values can be entered in the main item table, values will be copied to 'Packing List' table. \
</div>";
those values can be entered in the main item table, values will be copied to 'Packing List' table.")+
"</div>";
wn.meta.get_docfield(doc.doctype, 'sales_bom_help', doc.name).options = help_msg;
}
} else {