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

@@ -26,20 +26,20 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
});
if(!from_sales_invoice)
cur_frm.add_custom_button('Make Invoice', this.make_sales_invoice);
cur_frm.add_custom_button(wn._('Make Invoice'), this.make_sales_invoice);
}
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
cur_frm.add_custom_button('Make Installation Note', this.make_installation_note);
cur_frm.add_custom_button(wn._('Make Installation Note'), this.make_installation_note);
if (doc.docstatus==1) {
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);
this.show_stock_ledger();
this.show_general_ledger();
}
if(doc.docstatus==0 && !doc.__islocal) {
cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
cur_frm.add_custom_button(wn._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
}
set_print_hide(doc, dt, dn);

View File

@@ -124,7 +124,7 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) {
// in the "alternate_description" field
cur_frm.cscript.add_image = function(doc, dt, dn) {
if(!doc.image) {
msgprint('Please select an "Image" first');
msgprint(wn._('Please select an "Image" first'));
return;
}
@@ -140,7 +140,7 @@ cur_frm.cscript.weight_to_validate = function(doc,cdt,cdn){
if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom)
{
alert('Weight is mentioned,\nPlease mention "Weight UOM" too');
alert(wn._('Weight is mentioned,\nPlease mention "Weight UOM" too'));
validated=0;
}
}

View File

@@ -27,21 +27,21 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
if(doc.docstatus == 1 && doc.status != 'Stopped') {
if(doc.material_request_type === "Purchase")
cur_frm.add_custom_button("Make Supplier Quotation",
cur_frm.add_custom_button(wn._("Make Supplier Quotation"),
this.make_supplier_quotation);
if(doc.material_request_type === "Transfer" && doc.status === "Submitted")
cur_frm.add_custom_button("Transfer Material", this.make_stock_entry);
cur_frm.add_custom_button(wn._("Transfer Material"), this.make_stock_entry);
if(flt(doc.per_ordered, 2) < 100) {
if(doc.material_request_type === "Purchase")
cur_frm.add_custom_button('Make Purchase Order',
cur_frm.add_custom_button(wn._('Make Purchase Order'),
this.make_purchase_order);
cur_frm.add_custom_button('Stop Material Request',
cur_frm.add_custom_button(wn._('Stop Material Request'),
cur_frm.cscript['Stop Material Request']);
}
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);
}
@@ -62,7 +62,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
}
if(doc.docstatus == 1 && doc.status == 'Stopped')
cur_frm.add_custom_button('Unstop Material Request',
cur_frm.add_custom_button(wn._('Unstop Material Request'),
cur_frm.cscript['Unstop Material Request']);
},
@@ -154,12 +154,12 @@ $.extend(cur_frm.cscript, new erpnext.buying.MaterialRequestController({frm: cur
cur_frm.cscript.qty = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (flt(d.qty) < flt(d.min_order_qty))
alert("Warning: Material Requested Qty is less than Minimum Order Qty");
alert(wn._("Warning: Material Requested Qty is less than Minimum Order Qty"));
};
cur_frm.cscript['Stop Material Request'] = function() {
var doc = cur_frm.doc;
var check = confirm("Do you really want to STOP this Material Request?");
var check = confirm(wn._("Do you really want to STOP this Material Request?"));
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {
@@ -170,7 +170,7 @@ cur_frm.cscript['Stop Material Request'] = function() {
cur_frm.cscript['Unstop Material Request'] = function(){
var doc = cur_frm.doc;
var check = confirm("Do you really want to UNSTOP this Material Request?");
var check = confirm(wn._("Do you really want to UNSTOP this Material Request?"));
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': wn.model.compress(make_doclist(doc.doctype, doc.name))}, function(r,rt) {

View File

@@ -45,13 +45,13 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
cur_frm.cscript.validate_case_nos = function(doc) {
doc = locals[doc.doctype][doc.name];
if(cint(doc.from_case_no)==0) {
msgprint("Case No. cannot be 0")
msgprint(wn._("Case No. cannot be 0"))
validated = false;
} else if(!cint(doc.to_case_no)) {
doc.to_case_no = doc.from_case_no;
refresh_field('to_case_no');
} else if(cint(doc.to_case_no) < cint(doc.from_case_no)) {
msgprint("'To Case No.' cannot be less than 'From Case No.'");
msgprint(wn._("'To Case No.' cannot be less than 'From Case No.'"));
validated = false;
}
}
@@ -72,14 +72,14 @@ cur_frm.cscript.validate_duplicate_items = function(doc, ps_detail) {
for(var i=0; i<ps_detail.length; i++) {
for(var j=0; j<ps_detail.length; j++) {
if(i!=j && ps_detail[i].item_code && ps_detail[i].item_code==ps_detail[j].item_code) {
msgprint("You have entered duplicate items. Please rectify and try again.");
msgprint(wn._("You have entered duplicate items. Please rectify and try again."));
validated = false;
return;
}
}
if(flt(ps_detail[i].qty)<=0) {
msgprint("Invalid quantity specified for item " + ps_detail[i].item_code +
". Quantity should be greater than 0.");
msgprint(wn._("Invalid quantity specified for item ") + ps_detail[i].item_code +
"."+wn._(" Quantity should be greater than 0."));
validated = false;
}
}
@@ -95,9 +95,9 @@ cur_frm.cscript.calc_net_total_pkg = function(doc, ps_detail) {
for(var i=0; i<ps_detail.length; i++) {
var item = ps_detail[i];
if(item.weight_uom != doc.net_weight_uom) {
msgprint("Different UOM for items will lead to incorrect \
(Total) Net Weight value. Make sure that Net Weight of each item is \
in the same UOM.")
msgprint(wn._("Different UOM for items will lead to incorrect")+
wn._("(Total) Net Weight value. Make sure that Net Weight of each item is")+
wn._("in the same UOM."))
validated = false;
}
net_weight_pkg += flt(item.net_weight) * flt(item.qty);

View File

@@ -17,15 +17,15 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
if(this.frm.doc.docstatus == 1) {
if(!this.frm.doc.__billing_complete) {
cur_frm.add_custom_button('Make Purchase Invoice',
cur_frm.add_custom_button(wn._('Make Purchase Invoice'),
this.make_purchase_invoice);
}
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']);
this.show_stock_ledger();
this.show_general_ledger();
} else {
cur_frm.add_custom_button(wn._('From Purchase Order'),
cur_frm.add_custom_button(wn._(wn._('From Purchase Order')),
function() {
wn.model.map_current_doc({
method: "buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
@@ -140,7 +140,7 @@ cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('batch_no').get_q
}
}
else{
alert("Please enter Item Code.");
alert(wn._("Please enter Item Code."));
}
}

View File

@@ -70,10 +70,10 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
if(this.frm.doc.docstatus === 1 &&
wn.boot.profile.can_create.indexOf("Journal Voucher")!==-1) {
if(this.frm.doc.purpose === "Sales Return") {
this.frm.add_custom_button("Make Credit Note", function() { me.make_return_jv(); });
this.frm.add_custom_button(wn._("Make Credit Note"), function() { me.make_return_jv(); });
this.add_excise_button();
} else if(this.frm.doc.purpose === "Purchase Return") {
this.frm.add_custom_button("Make Debit Note", function() { me.make_return_jv(); });
this.frm.add_custom_button(wn._("Make Debit Note"), function() { me.make_return_jv(); });
this.add_excise_button();
}
}
@@ -195,7 +195,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
add_excise_button: function() {
if(wn.boot.control_panel.country === "India")
this.frm.add_custom_button("Make Excise Invoice", function() {
this.frm.add_custom_button(wn._("Make Excise Invoice"), function() {
var excise = wn.model.make_new_doc_and_get_name('Journal Voucher');
excise = locals['Journal Voucher'][excise];
excise.voucher_type = 'Excise Voucher';
@@ -318,7 +318,7 @@ cur_frm.fields_dict['mtn_details'].grid.get_field('batch_no').get_query = functi
}
}
} else {
msgprint("Please enter Item Code to get batch no");
msgprint(wn._("Please enter Item Code to get batch no"));
}
}
@@ -372,7 +372,7 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
cur_frm.cscript.validate_items = function(doc) {
cl = getchildren('Stock Entry Detail', doc.name, 'mtn_details');
if (!cl.length) {
alert("Item table can not be blank");
alert(wn._("Item table can not be blank"));
validated = false;
}
}
@@ -391,4 +391,4 @@ cur_frm.fields_dict.customer.get_query = function(doc, cdt, cdn) {
cur_frm.fields_dict.supplier.get_query = function(doc, cdt, cdn) {
return{ query:"controllers.queries.supplier_query" }
}
}

View File

@@ -48,13 +48,13 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
this.show_download_template();
this.show_upload();
if(this.frm.doc.reconciliation_json) {
this.frm.set_intro("You can submit this Stock Reconciliation.");
this.frm.set_intro(wn._("You can submit this Stock Reconciliation."));
} else {
this.frm.set_intro("Download the Template, fill appropriate data and \
attach the modified file.");
this.frm.set_intro(wn._("Download the Template, fill appropriate data and \
attach the modified file."));
}
} else if(this.frm.doc.docstatus == 1) {
this.frm.set_intro("Cancelling this Stock Reconciliation will nullify its effect.");
this.frm.set_intro(wn._("Cancelling this Stock Reconciliation will nullify its effect."));
this.show_stock_ledger();
this.show_general_ledger();
} else {
@@ -66,20 +66,20 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
show_download_template: function() {
var me = this;
this.frm.add_custom_button("Download Template", function() {
this.title = "Stock Reconcilation Template";
wn.tools.downloadify([["Stock Reconciliation"],
this.frm.add_custom_button(wn._("Download Template"), function() {
this.title = wn._("Stock Reconcilation Template");
wn.tools.downloadify([[wn._("Stock Reconciliation")],
["----"],
["Stock Reconciliation can be used to update the stock on a particular date,"
+ " usually as per physical inventory."],
["When submitted, the system creates difference entries"
+ " to set the given stock and valuation on this date."],
["It can also be used to create opening stock entries and to fix stock value."],
[wn._("Stock Reconciliation can be used to update the stock on a particular date, ")
+ wn._("usually as per physical inventory.")],
[wn._("When submitted, the system creates difference entries ")
+ wn._("to set the given stock and valuation on this date.")],
[wn._("It can also be used to create opening stock entries and to fix stock value.")],
["----"],
["Notes:"],
["Item Code and Warehouse should already exist."],
["You can update either Quantity or Valuation Rate or both."],
["If no change in either Quantity or Valuation Rate, leave the cell blank."],
[wn._("Notes:")],
[wn._("Item Code and Warehouse should already exist.")],
[wn._("You can update either Quantity or Valuation Rate or both.")],
[wn._("If no change in either Quantity or Valuation Rate, leave the cell blank.")],
["----"],
["Item Code", "Warehouse", "Quantity", "Valuation Rate"]], null, this);
return false;
@@ -113,8 +113,8 @@ erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
show_download_reconciliation_data: function() {
var me = this;
if(this.frm.doc.reconciliation_json) {
this.frm.add_custom_button("Download Reconcilation Data", function() {
this.title = "Stock Reconcilation Data";
this.frm.add_custom_button(wn._("Download Reconcilation Data"), function() {
this.title = wn._("Stock Reconcilation Data");
wn.tools.downloadify(JSON.parse(me.frm.doc.reconciliation_json), null, this);
return false;
}, "icon-download");

View File

@@ -7,11 +7,11 @@ cur_frm.cscript.refresh = function(doc) {
cur_frm.cscript.merge = function(doc, cdt, cdn) {
if (!doc.merge_with) {
msgprint("Please enter the warehouse to which you want to merge?");
msgprint(wn._("Please enter the warehouse to which you want to merge?"));
return;
}
var check = confirm("Are you sure you want to merge this warehouse into "
+ doc.merge_with + "?");
var check = confirm(wn._("Are you sure you want to merge this warehouse into "
+ doc.merge_with + "?"));
if (check) {
return $c_obj(make_doclist(cdt, cdn), 'merge_warehouses', '', '');
}