frappe._ to __

This commit is contained in:
Pratik Vyas 2014-04-14 16:25:30 +05:30
parent 7da01d6007
commit b52618c142
121 changed files with 700 additions and 700 deletions

View File

@ -3,7 +3,7 @@
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(doc.__islocal) {
msgprint(frappe._("Please create new account from Chart of Accounts."));
msgprint(__("Please create new account from Chart of Accounts."));
throw "cannot create";
}
@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
// read-only for root accounts
if(!doc.parent_account) {
cur_frm.set_read_only();
cur_frm.set_intro(frappe._("This is a root account and cannot be edited."));
cur_frm.set_intro(__("This is a root account and cannot be edited."));
} else {
// credit days and type if customer or supplier
cur_frm.set_intro(null);
@ -64,17 +64,17 @@ cur_frm.cscript.account_type = function(doc, cdt, cdn) {
}
cur_frm.cscript.add_toolbar_buttons = function(doc) {
cur_frm.appframe.add_button(frappe._('Chart of Accounts'),
cur_frm.appframe.add_button(__('Chart of Accounts'),
function() { frappe.set_route("Accounts Browser", "Account"); }, 'icon-sitemap')
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(frappe._('Convert to Ledger'),
cur_frm.add_custom_button(__('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(frappe._('Convert to Group'),
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
cur_frm.appframe.add_button(frappe._('View Ledger'), function() {
cur_frm.appframe.add_button(__('View Ledger'), function() {
frappe.route_options = {
"account": doc.name,
"from_date": sys_defaults.year_start_date,

View File

@ -4,5 +4,5 @@
cur_frm.add_fetch("bank_account", "company", "company");
cur_frm.cscript.onload = function(doc, cdt, cdn){
cur_frm.set_intro('<i class="icon-question" /> ' +
frappe._("Update clearance date of Journal Entries marked as 'Bank Vouchers'"))
__("Update clearance date of Journal Entries marked as 'Bank Vouchers'"))
}

View File

@ -40,8 +40,8 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_enable(['group_or_ledger', 'company'], doc.__islocal);
if(!doc.__islocal && doc.group_or_ledger=='Group') {
intro_txt += '<p><b>'+frappe._('Note:')+'</b>'+ frappe._('This Cost Center is a')+ '<i>'+frappe._('Group')+'</i>, '+
frappe._('Accounting Entries are not allowed against groups.')+'</p>';
intro_txt += '<p><b>'+__('Note:')+'</b>'+ __('This Cost Center is a')+ '<i>'+__('Group')+'</i>, '+
__('Accounting Entries are not allowed against groups.')+'</p>';
}
cur_frm.cscript.hide_unhide_group_ledger(doc);
@ -49,22 +49,22 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.toggle_display('sb1', doc.group_or_ledger=='Ledger')
cur_frm.set_intro(intro_txt);
cur_frm.appframe.add_button(frappe._('Chart of Cost Centers'),
cur_frm.appframe.add_button(__('Chart of Cost Centers'),
function() { frappe.set_route("Accounts Browser", "Cost Center"); }, 'icon-sitemap')
}
cur_frm.cscript.parent_cost_center = function(doc, cdt, cdn) {
if(!doc.company){
msgprint(frappe._('Please enter company name first'));
msgprint(__('Please enter company name first'));
}
}
cur_frm.cscript.hide_unhide_group_ledger = function(doc) {
if (cstr(doc.group_or_ledger) == 'Group') {
cur_frm.add_custom_button(frappe._('Convert to Ledger'),
cur_frm.add_custom_button(__('Convert to Ledger'),
function() { cur_frm.cscript.convert_to_ledger(); }, 'icon-retweet')
} else if (cstr(doc.group_or_ledger) == 'Ledger') {
cur_frm.add_custom_button(frappe._('Convert to Group'),
cur_frm.add_custom_button(__('Convert to Group'),
function() { cur_frm.cscript.convert_to_group(); }, 'icon-retweet')
}
}

View File

@ -8,8 +8,8 @@ $.extend(cur_frm.cscript, {
this.frm.toggle_enable('year_end_date', doc.__islocal)
if (!doc.__islocal && (doc.name != sys_defaults.fiscal_year)) {
this.frm.add_custom_button(frappe._("Set as Default"), this.frm.cscript.set_as_default);
this.frm.set_intro(frappe._("To set this Fiscal Year as Default, click on 'Set as Default'"));
this.frm.add_custom_button(__("Set as Default"), this.frm.cscript.set_as_default);
this.frm.set_intro(__("To set this Fiscal Year as Default, click on 'Set as Default'"));
} else this.frm.set_intro("");
},
set_as_default: function() {

View File

@ -114,7 +114,7 @@ cur_frm.cscript.refresh = function(doc) {
erpnext.hide_naming_series();
cur_frm.cscript.voucher_type(doc);
if(doc.docstatus==1) {
cur_frm.appframe.add_button(frappe._('View Ledger'), function() {
cur_frm.appframe.add_button(__('View Ledger'), function() {
frappe.route_options = {
"voucher_no": doc.name,
"from_date": doc.posting_date,
@ -186,7 +186,7 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
cur_frm.pformat.print_heading = doc.select_print_heading;
}
else
cur_frm.pformat.print_heading = frappe._("Journal Voucher");
cur_frm.pformat.print_heading = __("Journal Voucher");
}
cur_frm.cscript.voucher_type = function(doc, cdt, cdn) {

View File

@ -10,15 +10,15 @@ cur_frm.cscript.onload_post_render = function(doc) {
cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro("");
if(!doc.voucher_no) {
cur_frm.set_intro(frappe._("Select the Invoice against which you want to allocate payments."));
cur_frm.set_intro(__("Select the Invoice against which you want to allocate payments."));
} else {
cur_frm.set_intro(frappe._("Set allocated amount against each Payment Entry and click 'Allocate'."));
cur_frm.set_intro(__("Set allocated amount against each Payment Entry and click 'Allocate'."));
}
}
cur_frm.fields_dict.voucher_no.get_query = function(doc) {
// TO-do: check for pos, it should not come
if (!doc.account) msgprint(frappe._("Please select Account first"));
if (!doc.account) msgprint(__("Please select Account first"));
else {
return {
doctype: doc.voucher_type,

View File

@ -27,10 +27,10 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
// Show / Hide button
if(doc.docstatus==1 && doc.outstanding_amount > 0)
this.frm.add_custom_button(frappe._('Make Payment Entry'), this.make_bank_voucher);
this.frm.add_custom_button(__('Make Payment Entry'), this.make_bank_voucher);
if(doc.docstatus==1) {
cur_frm.appframe.add_button(frappe._('View Ledger'), function() {
cur_frm.appframe.add_button(__('View Ledger'), function() {
frappe.route_options = {
"voucher_no": doc.name,
"from_date": doc.posting_date,
@ -43,7 +43,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
}
if(doc.docstatus===0) {
cur_frm.add_custom_button(frappe._('From Purchase Order'),
cur_frm.add_custom_button(__('From Purchase Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_invoice",
@ -58,7 +58,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
})
});
cur_frm.add_custom_button(frappe._('From Purchase Receipt'),
cur_frm.add_custom_button(__('From Purchase Receipt'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.purchase_receipt.purchase_receipt.make_purchase_invoice",
@ -228,5 +228,5 @@ cur_frm.cscript.select_print_heading = function(doc,cdt,cdn){
cur_frm.pformat.print_heading = doc.select_print_heading;
}
else
cur_frm.pformat.print_heading = frappe._("Purchase Invoice");
cur_frm.pformat.print_heading = __("Purchase Invoice");
}

View File

@ -78,11 +78,11 @@ cur_frm.cscript.add_deduct_tax = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.category && d.add_deduct_tax) {
msgprint(frappe._("Please select Category first"));
msgprint(__("Please select Category first"));
d.add_deduct_tax = '';
}
else if(d.category != 'Total' && d.add_deduct_tax == 'Deduct') {
msgprint(frappe._("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
msgprint(__("You cannot deduct when category is for 'Valuation' or 'Valuation and Total'"));
d.add_deduct_tax = '';
}
}
@ -91,15 +91,15 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.category && d.charge_type) {
msgprint(frappe._("Please select Category first"));
msgprint(__("Please select Category first"));
d.charge_type = '';
}
else if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
msgprint(frappe._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
msgprint(__("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
d.charge_type = '';
}
else if((d.category == 'Valuation' || d.category == 'Valuation and Total') && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
msgprint(frappe._("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total"));
msgprint(__("You cannot select charge type as 'On Previous Row Amount' or 'On Previous Row Total' for valuation. You can select only 'Total' option for previous row amount or previous row total"));
d.charge_type = '';
}
@ -116,16 +116,16 @@ cur_frm.cscript.row_id = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.row_id) {
msgprint(frappe._("Please select Charge Type first"));
msgprint(__("Please select Charge Type first"));
d.row_id = '';
}
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
msgprint(frappe._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
msgprint(__("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
d.row_id = '';
}
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) {
if(d.row_id >= d.idx){
msgprint(frappe._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
msgprint(__("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
d.row_id = '';
}
}
@ -156,7 +156,7 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.rate) {
msgprint(frappe._("Please select Charge Type first"));
msgprint(__("Please select Charge Type first"));
d.rate = '';
}
validated = false;
@ -167,14 +167,14 @@ cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.tax_amount) {
msgprint(frappe._("Please select Charge Type first"));
msgprint(__("Please select Charge Type first"));
d.tax_amount = '';
}
else if(d.charge_type && d.tax_amount) {
msgprint(frappe._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
msgprint(__("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
d.tax_amount = '';
}
validated = false;
refresh_field('tax_amount', d.name, 'other_charges');
}
}

View File

@ -523,7 +523,7 @@ erpnext.POS = Class.extend({
me.add_to_cart(r.message[0][0].name);
}
else
msgprint(frappe._("Invalid Barcode"));
msgprint(__("Invalid Barcode"));
me.refresh();
}
@ -564,7 +564,7 @@ erpnext.POS = Class.extend({
var mode_of_payment = [];
if (no_of_items == 0)
msgprint(frappe._("Payment cannot be made for empty cart"));
msgprint(__("Payment cannot be made for empty cart"));
else {
frappe.call({
method: 'erpnext.accounts.doctype.sales_invoice.pos.get_mode_of_payment',

View File

@ -63,7 +63,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
var percent_paid = cint(flt(doc.grand_total - doc.outstanding_amount) / flt(doc.grand_total) * 100);
cur_frm.dashboard.add_progress(percent_paid + "% Paid", percent_paid);
cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone');
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, 'icon-mobile-phone');
if(cint(doc.update_stock)!=1) {
// show Make Delivery Note button only if Sales Invoice is not created from Delivery Note
@ -74,11 +74,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
});
if(!from_delivery_note)
cur_frm.appframe.add_primary_action(frappe._('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
cur_frm.appframe.add_primary_action(__('Make Delivery'), cur_frm.cscript['Make Delivery Note'])
}
if(doc.outstanding_amount!=0)
cur_frm.appframe.add_primary_action(frappe._('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
cur_frm.appframe.add_primary_action(__('Make Payment Entry'), cur_frm.cscript.make_bank_voucher);
}
// Show buttons only when pos view is active
@ -89,7 +89,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
sales_order_btn: function() {
this.$sales_order_btn = cur_frm.appframe.add_primary_action(frappe._('From Sales Order'),
this.$sales_order_btn = cur_frm.appframe.add_primary_action(__('From Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_sales_invoice",
@ -106,7 +106,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
},
delivery_note_btn: function() {
this.$delivery_note_btn = cur_frm.appframe.add_primary_action(frappe._('From Delivery Note'),
this.$delivery_note_btn = cur_frm.appframe.add_primary_action(__('From Delivery Note'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_sales_invoice",
@ -134,7 +134,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
if(cint(this.frm.doc.is_pos)) {
if(!this.frm.doc.company) {
this.frm.set_value("is_pos", 0);
msgprint(frappe._("Please specify Company to proceed"));
msgprint(__("Please specify Company to proceed"));
} else {
var me = this;
return this.frm.call({

View File

@ -100,7 +100,7 @@ cur_frm.pformat.other_charges= function(doc){
cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(d.idx == 1 && (d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total')) {
msgprint(frappe._("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
msgprint(__("You cannot select Charge Type as 'On Previous Row Amount' or 'On Previous Row Total' for first row"));
d.charge_type = '';
}
validated = false;
@ -113,16 +113,16 @@ cur_frm.cscript.charge_type = function(doc, cdt, cdn) {
cur_frm.cscript.row_id = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.row_id) {
msgprint(frappe._("Please select Charge Type first"));
msgprint(__("Please select Charge Type first"));
d.row_id = '';
}
else if((d.charge_type == 'Actual' || d.charge_type == 'On Net Total') && d.row_id) {
msgprint(frappe._("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
msgprint(__("You can Enter Row only if your Charge Type is 'On Previous Row Amount' or ' Previous Row Total'"));
d.row_id = '';
}
else if((d.charge_type == 'On Previous Row Amount' || d.charge_type == 'On Previous Row Total') && d.row_id) {
if(d.row_id >= d.idx){
msgprint(frappe._("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
msgprint(__("You cannot Enter Row no. greater than or equal to current row no. for this Charge type"));
d.row_id = '';
}
}
@ -152,7 +152,7 @@ cur_frm.fields_dict['other_charges'].grid.get_field("cost_center").get_query = f
cur_frm.cscript.rate = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.rate) {
msgprint(frappe._("Please select Charge Type first"));
msgprint(__("Please select Charge Type first"));
d.rate = '';
}
validated = false;
@ -162,11 +162,11 @@ cur_frm.cscript.rate = function(doc, cdt, cdn) {
cur_frm.cscript.tax_amount = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if(!d.charge_type && d.tax_amount) {
msgprint(frappe._("Please select Charge Type first"));
msgprint(__("Please select Charge Type first"));
d.tax_amount = '';
}
else if(d.charge_type && d.tax_amount) {
msgprint(frappe._("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
msgprint(__("You cannot directly enter Amount and if your Charge Type is Actual enter your amount in Rate"));
d.tax_amount = '';
}
validated = false;

View File

@ -20,30 +20,30 @@ pscript['onload_Accounts Browser'] = function(wrapper){
.css({"margin-bottom": "15px", "min-height": "200px"})
.appendTo(main),
help_area = $('<div class="well">'+
'<h4>'+frappe._('Quick Help')+'</h4>'+
'<h4>'+__('Quick Help')+'</h4>'+
'<ol>'+
'<li>'+frappe._('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
'<li>'+__('To add child nodes, explore tree and click on the node under which you want to add more nodes.')+'</li>'+
'<li>'+
frappe._('Accounting Entries can be made against leaf nodes, called')+
'<b>' +frappe._('Ledgers')+'</b>.'+ frappe._('Entries against') +
'<b>' +frappe._('Groups') + '</b>'+ frappe._('are not allowed.')+
__('Accounting Entries can be made against leaf nodes, called')+
'<b>' +__('Ledgers')+'</b>.'+ __('Entries against') +
'<b>' +__('Groups') + '</b>'+ __('are not allowed.')+
'</li>'+
'<li>'+frappe._('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
'<li>'+__('Please do NOT create Account (Ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.')+'</li>'+
'<li>'+
'<b>'+frappe._('To create a Bank Account:')+'</b>'+
frappe._('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+
frappe._('and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
'<b>'+__('To create a Bank Account:')+'</b>'+
__('Go to the appropriate group (usually Application of Funds > Current Assets > Bank Accounts)')+
__('and create a new Account Ledger (by clicking on Add Child) of type "Bank"')+
'</li>'+
'<li>'+
'<b>'+frappe._('To create a Tax Account:')+'</b>'+
frappe._('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+
frappe._('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
'<b>'+__('To create a Tax Account:')+'</b>'+
__('Go to the appropriate group (usually Source of Funds > Current Liabilities > Taxes and Duties)')+
__('and create a new Account Ledger (by clicking on Add Child) of type "Tax" and do mention the Tax rate.')+
'</li>'+
'</ol>'+
'<p>'+frappe._('Please setup your chart of accounts before you start Accounting Entries')+'</p></div>').appendTo(main);
'<p>'+__('Please setup your chart of accounts before you start Accounting Entries')+'</p></div>').appendTo(main);
if (frappe.boot.user.can_create.indexOf("Company") !== -1) {
wrapper.appframe.add_button(frappe._('New Company'), function() { newdoc('Company'); },
wrapper.appframe.add_button(__('New Company'), function() { newdoc('Company'); },
'icon-plus');
}
@ -184,21 +184,21 @@ erpnext.AccountsChart = Class.extend({
// the dialog
var d = new frappe.ui.Dialog({
title:frappe._('New Account'),
title:__('New Account'),
fields: [
{fieldtype:'Data', fieldname:'account_name', label:frappe._('New Account Name'), reqd:true,
description: frappe._("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+
frappe._("they are created automatically from the Customer and Supplier master")},
{fieldtype:'Select', fieldname:'group_or_ledger', label:frappe._('Group or Ledger'),
options:'Group\nLedger', description: frappe._('Further accounts can be made under Groups,')+
frappe._('but entries can be made against Ledger')},
{fieldtype:'Select', fieldname:'account_type', label:frappe._('Account Type'),
{fieldtype:'Data', fieldname:'account_name', label:__('New Account Name'), reqd:true,
description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers,")+
__("they are created automatically from the Customer and Supplier master")},
{fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'),
options:'Group\nLedger', description: __('Further accounts can be made under Groups,')+
__('but entries can be made against Ledger')},
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',
'Income Account', 'Tax', 'Chargeable'].join('\n'),
description: frappe._("Optional. This setting will be used to filter in various transactions.") },
{fieldtype:'Float', fieldname:'tax_rate', label:frappe._('Tax Rate')},
{fieldtype:'Button', fieldname:'create_new', label:frappe._('Create New') }
description: __("Optional. This setting will be used to filter in various transactions.") },
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate')},
{fieldtype:'Button', fieldname:'create_new', label:__('Create New') }
]
})
@ -261,13 +261,13 @@ erpnext.AccountsChart = Class.extend({
var me = this;
// the dialog
var d = new frappe.ui.Dialog({
title:frappe._('New Cost Center'),
title:__('New Cost Center'),
fields: [
{fieldtype:'Data', fieldname:'cost_center_name', label:frappe._('New Cost Center Name'), reqd:true},
{fieldtype:'Select', fieldname:'group_or_ledger', label:frappe._('Group or Ledger'),
options:'Group\nLedger', description:frappe._('Further accounts can be made under Groups,')+
frappe._('but entries can be made against Ledger')},
{fieldtype:'Button', fieldname:'create_new', label:frappe._('Create New') }
{fieldtype:'Data', fieldname:'cost_center_name', label:__('New Cost Center Name'), reqd:true},
{fieldtype:'Select', fieldname:'group_or_ledger', label:__('Group or Ledger'),
options:'Group\nLedger', description:__('Further accounts can be made under Groups,')+
__('but entries can be made against Ledger')},
{fieldtype:'Button', fieldname:'create_new', label:__('Create New') }
]
});

View File

@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/account_tree_grid.js");
frappe.pages['financial-analytics'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: frappe._('Financial Analytics'),
title: __('Financial Analytics'),
single_column: true
});
erpnext.trial_balance = new erpnext.FinancialAnalytics(wrapper, 'Financial Analytics');
@ -17,7 +17,7 @@ frappe.pages['financial-analytics'].onload = function(wrapper) {
erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
filters: [
{
fieldtype:"Select", label: frappe._("PL or BS"),
fieldtype:"Select", label: __("PL or BS"),
options:["Profit and Loss", "Balance Sheet"],
filter: function(val, item, opts, me) {
if(item._show) return true;
@ -31,31 +31,31 @@ erpnext.FinancialAnalytics = erpnext.AccountTreeGrid.extend({
}
},
{
fieldtype:"Select", label: frappe._("Company"),
fieldtype:"Select", label: __("Company"),
link:"Company", default_value: "Select Company...",
filter: function(val, item, opts) {
return item.company == val || val == opts.default_value || item._show;
}
},
{fieldtype:"Select", label: frappe._("Fiscal Year"), link:"Fiscal Year",
{fieldtype:"Select", label: __("Fiscal Year"), link:"Fiscal Year",
default_value: "Select Fiscal Year..."},
{fieldtype:"Date", label: frappe._("From Date")},
{fieldtype:"Label", label: frappe._("To")},
{fieldtype:"Date", label: frappe._("To Date")},
{fieldtype:"Select", label: frappe._("Range"),
{fieldtype:"Date", label: __("From Date")},
{fieldtype:"Label", label: __("To")},
{fieldtype:"Date", label: __("To Date")},
{fieldtype:"Select", label: __("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: frappe._("Reset Filters")}
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: __("Reset Filters")}
],
setup_columns: function() {
var std_columns = [
{id: "check", name: frappe._("Plot"), field: "check", width: 30,
{id: "check", name: __("Plot"), field: "check", width: 30,
formatter: this.check_formatter},
{id: "name", name: frappe._("Account"), field: "name", width: 300,
{id: "name", name: __("Account"), field: "name", width: 300,
formatter: this.tree_formatter},
{id: "opening_dr", name: frappe._("Opening (Dr)"), field: "opening_dr",
{id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr",
hidden: true, formatter: this.currency_formatter, balance_type: "Dr"},
{id: "opening_cr", name: frappe._("Opening (Cr)"), field: "opening_cr",
{id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr",
hidden: true, formatter: this.currency_formatter, balance_type: "Cr"},
];

View File

@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/account_tree_grid.js");
frappe.pages['trial-balance'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: frappe._('Trial Balance'),
title: __('Trial Balance'),
single_column: true
});
var TrialBalance = erpnext.AccountTreeGrid.extend({
@ -18,7 +18,7 @@ frappe.pages['trial-balance'].onload = function(wrapper) {
this.wrapper.bind("make", function() {
$('<div style="margin: 10px 0px; "\
class="with_period_closing_entry"><input type="checkbox" checked="checked">' +
frappe._("With period closing entry") + '</div>')
__("With period closing entry") + '</div>')
.appendTo(me.wrapper)
.find("input").click(function() { me.refresh(); });
});

View File

@ -5,14 +5,14 @@ frappe.query_reports["Accounts Payable"] = {
"filters": [
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
},
{
"fieldname":"account",
"label": frappe._("Account"),
"label": __("Account"),
"fieldtype": "Link",
"options": "Account",
"get_query": function() {
@ -29,13 +29,13 @@ frappe.query_reports["Accounts Payable"] = {
},
{
"fieldname":"report_date",
"label": frappe._("Date"),
"label": __("Date"),
"fieldtype": "Date",
"default": get_today()
},
{
"fieldname":"ageing_based_on",
"label": frappe._("Ageing Based On"),
"label": __("Ageing Based On"),
"fieldtype": "Select",
"options": 'Posting Date' + NEWLINE + 'Due Date',
"default": "Posting Date"

View File

@ -5,14 +5,14 @@ frappe.query_reports["Accounts Receivable"] = {
"filters": [
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
},
{
"fieldname":"account",
"label": frappe._("Account"),
"label": __("Account"),
"fieldtype": "Link",
"options": "Account",
"get_query": function() {
@ -29,13 +29,13 @@ frappe.query_reports["Accounts Receivable"] = {
},
{
"fieldname":"report_date",
"label": frappe._("Date"),
"label": __("Date"),
"fieldtype": "Date",
"default": get_today()
},
{
"fieldname":"ageing_based_on",
"label": frappe._("Ageing Based On"),
"label": __("Ageing Based On"),
"fieldtype": "Select",
"options": 'Posting Date' + NEWLINE + 'Due Date',
"default": "Posting Date"

View File

@ -5,20 +5,20 @@ frappe.query_reports["Bank Clearance Summary"] = {
"filters": [
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_start_date"),
"width": "80"
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": get_today()
},
{
"fieldname":"account",
"label": frappe._("Bank Account"),
"label": __("Bank Account"),
"fieldtype": "Link",
"options": "Account",
"get_query": function() {

View File

@ -5,7 +5,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
"filters": [
{
"fieldname":"account",
"label": frappe._("Bank Account"),
"label": __("Bank Account"),
"fieldtype": "Link",
"options": "Account",
"reqd": 1,
@ -21,7 +21,7 @@ frappe.query_reports["Bank Reconciliation Statement"] = {
},
{
"fieldname":"report_date",
"label": frappe._("Date"),
"label": __("Date"),
"fieldtype": "Date",
"default": get_today(),
"reqd": 1

View File

@ -5,21 +5,21 @@ frappe.query_reports["Budget Variance Report"] = {
"filters": [
{
fieldname: "fiscal_year",
label: frappe._("Fiscal Year"),
label: __("Fiscal Year"),
fieldtype: "Link",
options: "Fiscal Year",
default: sys_defaults.fiscal_year
},
{
fieldname: "period",
label: frappe._("Period"),
label: __("Period"),
fieldtype: "Select",
options: "Monthly\nQuarterly\nHalf-Yearly\nYearly",
default: "Monthly"
},
{
fieldname: "company",
label: frappe._("Company"),
label: __("Company"),
fieldtype: "Link",
options: "Company",
default: frappe.defaults.get_user_default("company")

View File

@ -5,7 +5,7 @@ frappe.query_reports["General Ledger"] = {
"filters": [
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company"),
@ -13,7 +13,7 @@ frappe.query_reports["General Ledger"] = {
},
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.datetime.add_months(frappe.datetime.get_today(), -1),
"reqd": 1,
@ -21,7 +21,7 @@ frappe.query_reports["General Ledger"] = {
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": frappe.datetime.get_today(),
"reqd": 1,
@ -32,7 +32,7 @@ frappe.query_reports["General Ledger"] = {
},
{
"fieldname":"account",
"label": frappe._("Account"),
"label": __("Account"),
"fieldtype": "Link",
"options": "Account",
"get_query": function() {
@ -47,18 +47,18 @@ frappe.query_reports["General Ledger"] = {
},
{
"fieldname":"voucher_no",
"label": frappe._("Voucher No"),
"label": __("Voucher No"),
"fieldtype": "Data",
},
{
"fieldname":"group_by_voucher",
"label": frappe._("Group by Voucher"),
"label": __("Group by Voucher"),
"fieldtype": "Check",
"default": 1
},
{
"fieldname":"group_by_account",
"label": frappe._("Group by Account"),
"label": __("Group by Account"),
"fieldtype": "Check",
}
]

View File

@ -5,20 +5,20 @@ frappe.query_reports["Gross Profit"] = {
"filters": [
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
},
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_start_date")
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_end_date")
},

View File

@ -5,26 +5,26 @@ frappe.query_reports["Item-wise Purchase Register"] = {
"filters": [
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_start_date"),
"width": "80"
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": get_today()
},
{
"fieldname": "item_code",
"label": frappe._("Item"),
"label": __("Item"),
"fieldtype": "Link",
"options": "Item",
},
{
"fieldname":"account",
"label": frappe._("Account"),
"label": __("Account"),
"fieldtype": "Link",
"options": "Account",
"get_query": function() {
@ -41,7 +41,7 @@ frappe.query_reports["Item-wise Purchase Register"] = {
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -5,20 +5,20 @@ frappe.query_reports["Item-wise Sales Register"] = frappe.query_reports["Sales R
"filters": [
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_default("year_start_date"),
"width": "80"
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": get_today()
},
{
"fieldname":"account",
"label": frappe._("Account"),
"label": __("Account"),
"fieldtype": "Link",
"options": "Account",
"get_query": function() {
@ -35,7 +35,7 @@ frappe.query_reports["Item-wise Sales Register"] = frappe.query_reports["Sales R
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -5,26 +5,26 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = {
"filters": [
{
fieldname: "from_date",
label: frappe._("From Date"),
label: __("From Date"),
fieldtype: "Date",
default: frappe.defaults.get_user_default("year_start_date"),
},
{
fieldname:"to_date",
label: frappe._("To Date"),
label: __("To Date"),
fieldtype: "Date",
default: get_today()
},
{
fieldname:"payment_type",
label: frappe._("Payment Type"),
label: __("Payment Type"),
fieldtype: "Select",
options: "Incoming\nOutgoing",
default: "Incoming"
},
{
fieldname:"account",
label: frappe._("Account"),
label: __("Account"),
fieldtype: "Link",
options: "Account",
get_query: function() {
@ -39,7 +39,7 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = {
},
{
fieldname:"company",
label: frappe._("Company"),
label: __("Company"),
fieldtype: "Link",
options: "Company",
default: frappe.defaults.get_user_default("company")

View File

@ -5,20 +5,20 @@ frappe.query_reports["Purchase Register"] = {
"filters": [
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_start_date"),
"width": "80"
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": get_today()
},
{
"fieldname":"account",
"label": frappe._("Account"),
"label": __("Account"),
"fieldtype": "Link",
"options": "Account",
"get_query": function() {
@ -35,7 +35,7 @@ frappe.query_reports["Purchase Register"] = {
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -5,20 +5,20 @@ frappe.query_reports["Sales Register"] = {
"filters": [
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_default("year_start_date"),
"width": "80"
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": get_today()
},
{
"fieldname":"account",
"label": frappe._("Account"),
"label": __("Account"),
"fieldtype": "Link",
"options": "Account",
"get_query": function() {
@ -35,7 +35,7 @@ frappe.query_reports["Sales Register"] = {
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -300,7 +300,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
$.each(fields_list, function(i, fname) {
var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname];
if(docfield) {
var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, "");
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
field_label_map[fname] = label.trim() + " (" + currency + ")";
}
});
@ -347,7 +347,7 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
$.each(fields_list, function(i, fname) {
var docfield = frappe.meta.docfield_map[grid_doctype][fname];
if(docfield) {
var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, "");
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
field_label_map[grid_doctype + "-" + fname] =
label.trim() + " (" + currency + ")";
}

View File

@ -18,25 +18,25 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
this.frm.dashboard.reset();
if(doc.docstatus == 1 && doc.status != 'Stopped'){
cur_frm.dashboard.add_progress(cint(doc.per_received) + frappe._("% Received"),
cur_frm.dashboard.add_progress(cint(doc.per_received) + __("% Received"),
doc.per_received);
cur_frm.dashboard.add_progress(cint(doc.per_billed) + frappe._("% Billed"),
cur_frm.dashboard.add_progress(cint(doc.per_billed) + __("% Billed"),
doc.per_billed);
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
if(flt(doc.per_received, 2) < 100)
cur_frm.add_custom_button(frappe._('Make Purchase Receipt'), this.make_purchase_receipt);
cur_frm.add_custom_button(__('Make Purchase Receipt'), this.make_purchase_receipt);
if(flt(doc.per_billed, 2) < 100)
cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_purchase_invoice);
cur_frm.add_custom_button(__('Make Invoice'), this.make_purchase_invoice);
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100)
cur_frm.add_custom_button(frappe._('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation");
cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Purchase Order'], "icon-exclamation");
} else if(doc.docstatus===0) {
cur_frm.cscript.add_from_mappers();
}
if(doc.docstatus == 1 && doc.status == 'Stopped')
cur_frm.add_custom_button(frappe._('Unstop Purchase Order'),
cur_frm.add_custom_button(__('Unstop Purchase Order'),
cur_frm.cscript['Unstop Purchase Order'], "icon-check");
},
@ -55,7 +55,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
},
add_from_mappers: function() {
cur_frm.add_custom_button(frappe._('From Material Request'),
cur_frm.add_custom_button(__('From Material Request'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order",
@ -71,7 +71,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
}
);
cur_frm.add_custom_button(frappe._('From Supplier Quotation'),
cur_frm.add_custom_button(__('From Supplier Quotation'),
function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.supplier_quotation.supplier_quotation.make_purchase_order",
@ -85,7 +85,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
}
);
cur_frm.add_custom_button(frappe._('For Supplier'),
cur_frm.add_custom_button(__('For Supplier'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.material_request.material_request.make_purchase_order_based_on_supplier",
@ -137,7 +137,7 @@ cur_frm.cscript.get_last_purchase_rate = function(doc, cdt, cdn){
cur_frm.cscript['Stop Purchase Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(frappe._("Do you really want to STOP ") + doc.name);
var check = confirm(__("Do you really want to STOP ") + doc.name);
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs':doc}, function(r,rt) {
@ -148,7 +148,7 @@ cur_frm.cscript['Stop Purchase Order'] = function() {
cur_frm.cscript['Unstop Purchase Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(frappe._("Do you really want to UNSTOP ") + doc.name);
var check = confirm(__("Do you really want to UNSTOP ") + doc.name);
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted', 'docs':doc}, function(r,rt) {

View File

@ -45,9 +45,9 @@ cur_frm.cscript.make_dashboard = function(doc) {
callback: function(r) {
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
cur_frm.dashboard.set_headline(
frappe._("Total Billing This Year: ") + "<b>"
__("Total Billing This Year: ") + "<b>"
+ format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company))
+ '</b> / <span class="text-muted">' + frappe._("Unpaid") + ": <b>"
+ '</b> / <span class="text-muted">' + __("Unpaid") + ": <b>"
+ format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company))
+ '</b></span>');
}
@ -67,7 +67,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 supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
},
as_dict: 1,
no_results_message: frappe._('No addresses created'),
no_results_message: __('No addresses created'),
render_row: cur_frm.cscript.render_address_row,
});
// note: render_address_row is defined in contact_control.js
@ -85,7 +85,7 @@ cur_frm.cscript.make_contact = function() {
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where supplier='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
},
as_dict: 1,
no_results_message: frappe._('No contacts created'),
no_results_message: __('No contacts created'),
render_row: cur_frm.cscript.render_contact_row,
});
// note: render_contact_row is defined in contact_control.js

View File

@ -16,10 +16,10 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext
this._super();
if (this.frm.doc.docstatus === 1) {
cur_frm.add_custom_button(frappe._("Make Purchase Order"), this.make_purchase_order);
cur_frm.add_custom_button(__("Make Purchase Order"), this.make_purchase_order);
}
else if (this.frm.doc.docstatus===0) {
cur_frm.add_custom_button(frappe._('From Material Request'),
cur_frm.add_custom_button(__('From Material Request'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.material_request.material_request.make_supplier_quotation",

View File

@ -4,7 +4,7 @@
frappe.pages['purchase-analytics'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: frappe._('Purchase Analytics'),
title: __('Purchase Analytics'),
single_column: true
});
@ -18,7 +18,7 @@ frappe.pages['purchase-analytics'].onload = function(wrapper) {
erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
init: function(wrapper) {
this._super({
title: frappe._("Purchase Analytics"),
title: __("Purchase Analytics"),
page: wrapper,
parent: $(wrapper).find('.layout-main'),
appframe: wrapper.appframe,
@ -31,7 +31,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
this.tree_grids = {
"Supplier Type": {
label: frappe._("Supplier Type / Supplier"),
label: __("Supplier Type / Supplier"),
show: true,
item_key: "supplier",
parent_field: "parent_supplier_type",
@ -44,7 +44,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
}
},
"Supplier": {
label: frappe._("Supplier"),
label: __("Supplier"),
show: false,
item_key: "supplier",
formatter: function(item) {
@ -74,7 +74,7 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
this.tree_grid = this.tree_grids[this.tree_type];
var std_columns = [
{id: "check", name: frappe._("Plot"), field: "check", width: 30,
{id: "check", name: __("Plot"), field: "check", width: 30,
formatter: this.check_formatter},
{id: "name", name: this.tree_grid.label, field: "name", width: 300,
formatter: this.tree_formatter},
@ -86,23 +86,23 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
this.columns = std_columns.concat(this.columns);
},
filters: [
{fieldtype:"Select", label: frappe._("Tree Type"), options:["Supplier Type", "Supplier",
{fieldtype:"Select", label: __("Tree Type"), options:["Supplier Type", "Supplier",
"Item Group", "Item"],
filter: function(val, item, opts, me) {
return me.apply_zero_filter(val, item, opts, me);
}},
{fieldtype:"Select", label: frappe._("Based On"), options:["Purchase Invoice",
{fieldtype:"Select", label: __("Based On"), options:["Purchase Invoice",
"Purchase Order", "Purchase Receipt"]},
{fieldtype:"Select", label: frappe._("Value or Qty"), options:["Value", "Quantity"]},
{fieldtype:"Select", label: frappe._("Company"), link:"Company",
{fieldtype:"Select", label: __("Value or Qty"), options:["Value", "Quantity"]},
{fieldtype:"Select", label: __("Company"), link:"Company",
default_value: "Select Company..."},
{fieldtype:"Date", label: frappe._("From Date")},
{fieldtype:"Label", label: frappe._("To")},
{fieldtype:"Date", label: frappe._("To Date")},
{fieldtype:"Select", label: frappe._("Range"),
{fieldtype:"Date", label: __("From Date")},
{fieldtype:"Label", label: __("To")},
{fieldtype:"Date", label: __("To Date")},
{fieldtype:"Select", label: __("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: frappe._("Reset Filters")}
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: __("Reset Filters")}
],
setup_filters: function() {
var me = this;
@ -130,18 +130,18 @@ erpnext.PurchaseAnalytics = frappe.views.TreeGridReport.extend({
})
frappe.report_dump.data["Supplier Type"] = [{
name: frappe._("All Supplier Types"),
name: __("All Supplier Types"),
id: "All Supplier Types",
}].concat(frappe.report_dump.data["Supplier Type"]);
frappe.report_dump.data["Supplier"].push({
name: frappe._("Not Set"),
name: __("Not Set"),
parent_supplier_type: "All Supplier Types",
id: "Not Set",
});
frappe.report_dump.data["Item"].push({
name: frappe._("Not Set"),
name: __("Not Set"),
parent_item_group: "All Item Groups",
id: "Not Set",
});

View File

@ -4,7 +4,7 @@
frappe.pages['activity'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: frappe._("Activity"),
title: __("Activity"),
single_column: true
})
wrapper.appframe.add_module_icon("Activity");
@ -24,7 +24,7 @@ frappe.pages['activity'].onload = function(wrapper) {
// Build Report Button
if(frappe.boot.user.can_get_report.indexOf("Feed")!=-1) {
wrapper.appframe.add_primary_action(frappe._('Build Report'), function() {
wrapper.appframe.add_primary_action(__('Build Report'), function() {
frappe.set_route('Report', "Feed");
}, 'icon-th')
}
@ -47,7 +47,7 @@ erpnext.ActivityFeed = Class.extend({
// feedtype
if(!data.feed_type) {
data.feed_type = frappe._(data.doc_type);
data.feed_type = __(data.doc_type);
data.add_class = "label-info";
data.onclick = repl('onclick="window.location.href=\'#!List/%(feed_type)s\';"', data)
}

View File

@ -45,7 +45,7 @@ cur_frm.cscript.score = function(doc,cdt,cdn){
var d = locals[cdt][cdn];
if (d.score){
if (flt(d.score) > 5) {
msgprint(frappe._("Score must be less than or equal to 5"));
msgprint(__("Score must be less than or equal to 5"));
d.score = 0;
refresh_field('score', d.name, 'appraisal_details');
}

View File

@ -21,7 +21,7 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
var me = this;
erpnext.hide_naming_series();
if(!this.frm.doc.__islocal) {
cur_frm.add_custom_button(frappe._('Make Salary Structure'), function() {
cur_frm.add_custom_button(__('Make Salary Structure'), function() {
me.make_salary_structure(this); });
}
},
@ -61,8 +61,8 @@ erpnext.hr.EmployeeController = frappe.ui.form.Controller.extend({
var me = this;
this.validate_salary_structure(btn, function(r) {
if(r.message) {
msgprint(frappe._("Employee") + ' "' + me.frm.doc.name + '": '
+ frappe._("An active Salary Structure already exists. \
msgprint(__("Employee") + ' "' + me.frm.doc.name + '": '
+ __("An active Salary Structure already exists. \
If you want to create new one, please ensure that no active \
Salary Structure exists for this Employee. \
Go to the active Salary Structure and set \"Is Active\" = \"No\""));

View File

@ -92,26 +92,26 @@ cur_frm.cscript.refresh = function(doc,cdt,cdn){
cur_frm.savesubmit();
if(doc.docstatus==1 && frappe.model.can_create("Journal Voucher"))
cur_frm.add_custom_button(frappe._("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher);
cur_frm.add_custom_button(__("Make Bank Voucher"), cur_frm.cscript.make_bank_voucher);
}
}
cur_frm.cscript.set_help = function(doc) {
cur_frm.set_intro("");
if(doc.__islocal && !in_list(user_roles, "HR User")) {
cur_frm.set_intro(frappe._("Fill the form and save it"))
cur_frm.set_intro(__("Fill the form and save it"))
} else {
if(doc.docstatus==0 && doc.approval_status=="Draft") {
if(user==doc.exp_approver) {
cur_frm.set_intro(frappe._("You are the Expense Approver for this record. Please Update the 'Status' and Save"));
cur_frm.set_intro(__("You are the Expense Approver for this record. Please Update the 'Status' and Save"));
} else {
cur_frm.set_intro(frappe._("Expense Claim is pending approval. Only the Expense Approver can update status."));
cur_frm.set_intro(__("Expense Claim is pending approval. Only the Expense Approver can update status."));
}
} else {
if(doc.approval_status=="Approved") {
cur_frm.set_intro(frappe._("Expense Claim has been approved."));
cur_frm.set_intro(__("Expense Claim has been approved."));
} else if(doc.approval_status=="Rejected") {
cur_frm.set_intro(frappe._("Expense Claim has been rejected."));
cur_frm.set_intro(__("Expense Claim has been rejected."));
}
}
}

View File

@ -6,8 +6,8 @@
cur_frm.cscript = {
onload: function(doc, dt, dn) {
if(in_list(user_roles,'System Manager')) {
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Jobs Email Settings">'+frappe._("Jobs Email Settings")+'</a><br>\
<span class="help">'+frappe._('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"</span></p>';
cur_frm.footer.help_area.innerHTML = '<p><a href="#Form/Jobs Email Settings">'+__("Jobs Email Settings")+'</a><br>\
<span class="help">'+__('Automatically extract Job Applicants from a mail box ')+'e.g. "jobs@example.com"</span></p>';
}
},
refresh: function(doc) {

View File

@ -31,14 +31,14 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}
cur_frm.set_intro("");
if(doc.__islocal && !in_list(user_roles, "HR User")) {
cur_frm.set_intro(frappe._("Fill the form and save it"))
cur_frm.set_intro(__("Fill the form and save it"))
} else {
if(doc.docstatus==0 && doc.status=="Open") {
if(user==doc.leave_approver) {
cur_frm.set_intro(frappe._("You are the Leave Approver for this record. Please Update the 'Status' and Save"));
cur_frm.set_intro(__("You are the Leave Approver for this record. Please Update the 'Status' and Save"));
cur_frm.toggle_enable("status", true);
} else {
cur_frm.set_intro(frappe._("This Leave Application is pending approval. Only the Leave Apporver can update status."))
cur_frm.set_intro(__("This Leave Application is pending approval. Only the Leave Apporver can update status."))
cur_frm.toggle_enable("status", false);
if(!doc.__islocal) {
cur_frm.frm_head.appframe.set_title_right("");
@ -46,12 +46,12 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}
} else {
if(doc.status=="Approved") {
cur_frm.set_intro(frappe._("Leave application has been approved."));
cur_frm.set_intro(__("Leave application has been approved."));
if(cur_frm.doc.docstatus==0) {
cur_frm.set_intro(frappe._("Please submit to update Leave Balance."));
cur_frm.set_intro(__("Please submit to update Leave Balance."));
}
} else if(doc.status=="Rejected") {
cur_frm.set_intro(frappe._("Leave application has been rejected."));
cur_frm.set_intro(__("Leave application has been rejected."));
}
}
}
@ -85,7 +85,7 @@ cur_frm.cscript.from_date = function(doc, dt, dn) {
cur_frm.cscript.to_date = function(doc, dt, dn) {
if(cint(doc.half_day) == 1 && cstr(doc.from_date) && doc.from_date != doc.to_date){
msgprint(frappe._("To Date should be same as From Date for Half Day leave"));
msgprint(__("To Date should be same as From Date for Half Day leave"));
set_multiple(dt,dn,{to_date:doc.from_date});
}
cur_frm.cscript.calculate_total_days(doc, dt, dn);

View File

@ -13,7 +13,7 @@ cur_frm.cscript.to_date = function(doc, cdt, cdn) {
function(r, rt) {
var doc = locals[cdt][cdn];
if (r.message) {
msgprint(frappe._("To date cannot be before from date"));
msgprint(__("To date cannot be before from date"));
doc.to_date = '';
refresh_field('to_date');
}

View File

@ -5,7 +5,7 @@ var display_activity_log = function(msg) {
if(!pscript.ss_html)
pscript.ss_html = $a(cur_frm.fields_dict['activity_log'].wrapper,'div');
pscript.ss_html.innerHTML =
'<div class="panel"><div class="panel-heading">'+frappe._("Activity Log:")+'</div>'+msg+'</div>';
'<div class="panel"><div class="panel-heading">'+__("Activity Log:")+'</div>'+msg+'</div>';
}
//Create salary slip
@ -19,7 +19,7 @@ cur_frm.cscript.create_salary_slip = function(doc, cdt, cdn) {
}
cur_frm.cscript.submit_salary_slip = function(doc, cdt, cdn) {
var check = confirm(frappe._("Do you really want to Submit all Salary Slip for month : ") + doc.month+ frappe._(" and fiscal year : ")+doc.fiscal_year);
var check = confirm(__("Do you really want to Submit all Salary Slip for month : ") + doc.month+ __(" and fiscal year : ")+doc.fiscal_year);
if(check){
var callback = function(r, rt){
if (r.message)
@ -33,7 +33,7 @@ cur_frm.cscript.make_bank_voucher = function(doc,cdt,cdn){
if(doc.company && doc.month && doc.fiscal_year){
cur_frm.cscript.make_jv(doc, cdt, cdn);
} else {
msgprint(frappe._("Company, Month and Fiscal Year is mandatory"));
msgprint(__("Company, Month and Fiscal Year is mandatory"));
}
}
@ -42,8 +42,8 @@ cur_frm.cscript.make_jv = function(doc, dt, dn) {
var jv = frappe.model.make_new_doc_and_get_name('Journal Voucher');
jv = locals['Journal Voucher'][jv];
jv.voucher_type = 'Bank Voucher';
jv.user_remark = frappe._('Payment of salary for the month: ') + doc.month +
frappe._(' and fiscal year: ') + doc.fiscal_year;
jv.user_remark = __('Payment of salary for the month: ') + doc.month +
__(' and fiscal year: ') + doc.fiscal_year;
jv.fiscal_year = doc.fiscal_year;
jv.company = doc.company;
jv.posting_date = dateutil.obj_to_str(new Date());

View File

@ -12,7 +12,7 @@ cur_frm.cscript.onload = function(doc, dt, dn){
cur_frm.cscript.refresh = function(doc, dt, dn){
if((!doc.__islocal) && (doc.is_active == 'Yes')){
cur_frm.add_custom_button(frappe._('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
cur_frm.add_custom_button(__('Make Salary Slip'), cur_frm.cscript['Make Salary Slip']);
}
cur_frm.toggle_enable('employee', doc.__islocal);

View File

@ -17,7 +17,7 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
get_template:function() {
if(!this.frm.doc.att_fr_date || !this.frm.doc.att_to_date) {
msgprint(frappe._("Attendance From Date and Attendance To Date is mandatory"));
msgprint(__("Attendance From Date and Attendance To Date is mandatory"));
return;
}
window.location.href = repl(frappe.request.url +
@ -56,10 +56,10 @@ erpnext.hr.AttendanceControlPanel = frappe.ui.form.Controller.extend({
return v;
});
r.messages = ["<h4 style='color:red'>"+frappe._("Import Failed!")+"</h4>"]
r.messages = ["<h4 style='color:red'>"+__("Import Failed!")+"</h4>"]
.concat(r.messages)
} else {
r.messages = ["<h4 style='color:green'>"+frappe._("Import Successful!")+"</h4>"].
r.messages = ["<h4 style='color:green'>"+__("Import Successful!")+"</h4>"].
concat(r.message.messages)
}

View File

@ -5,7 +5,7 @@ frappe.query_reports["Employee Birthday"] = {
"filters": [
{
"fieldname":"month",
"label": frappe._("Month"),
"label": __("Month"),
"fieldtype": "Select",
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@ -13,7 +13,7 @@ frappe.query_reports["Employee Birthday"] = {
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -5,14 +5,14 @@ frappe.query_reports["Employee Leave Balance"] = {
"filters": [
{
"fieldname":"fiscal_year",
"label": frappe._("Fiscal Year"),
"label": __("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": frappe.defaults.get_user_default("fiscal_year")
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -5,7 +5,7 @@ frappe.query_reports["Monthly Attendance Sheet"] = {
"filters": [
{
"fieldname":"month",
"label": frappe._("Month"),
"label": __("Month"),
"fieldtype": "Select",
"options": "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@ -13,20 +13,20 @@ frappe.query_reports["Monthly Attendance Sheet"] = {
},
{
"fieldname":"fiscal_year",
"label": frappe._("Fiscal Year"),
"label": __("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
},
{
"fieldname":"employee",
"label": frappe._("Employee"),
"label": __("Employee"),
"fieldtype": "Link",
"options": "Employee"
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -5,7 +5,7 @@ frappe.query_reports["Monthly Salary Register"] = {
"filters": [
{
"fieldname":"month",
"label": frappe._("Month"),
"label": __("Month"),
"fieldtype": "Select",
"options": "\nJan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec",
"default": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
@ -13,20 +13,20 @@ frappe.query_reports["Monthly Salary Register"] = {
},
{
"fieldname":"fiscal_year",
"label": frappe._("Fiscal Year"),
"label": __("Fiscal Year"),
"fieldtype": "Link",
"options": "Fiscal Year",
"default": sys_defaults.fiscal_year,
},
{
"fieldname":"employee",
"label": frappe._("Employee"),
"label": __("Employee"),
"fieldtype": "Link",
"options": "Employee"
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -6,7 +6,7 @@ cur_frm.cscript.refresh = function(doc,dt,dn){
cur_frm.toggle_enable("item", doc.__islocal);
if (!doc.__islocal && doc.docstatus<2) {
cur_frm.add_custom_button(frappe._("Update Cost"), cur_frm.cscript.update_cost);
cur_frm.add_custom_button(__("Update Cost"), cur_frm.cscript.update_cost);
}
cur_frm.cscript.with_operations(doc);
@ -123,7 +123,7 @@ cur_frm.cscript.qty = function(doc, cdt, cdn) {
cur_frm.cscript.rate = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
if (d.bom_no) {
msgprint(frappe._("You can not change rate if BOM mentioned agianst any item"));
msgprint(__("You can not change rate if BOM mentioned agianst any item"));
get_bom_material_detail(doc, cdt, cdn);
} else {
calculate_rm_cost(doc);

View File

@ -17,13 +17,13 @@ $.extend(cur_frm.cscript, {
cfn_set_fields(doc, dt, dn);
if (doc.docstatus === 0 && !doc.__islocal) {
this.frm.set_intro(frappe._("Submit this Production Order for further processing."));
this.frm.set_intro(__("Submit this Production Order for further processing."));
} else if (doc.docstatus === 1) {
var percent = flt(doc.produced_qty) / flt(doc.qty) * 100;
this.frm.dashboard.add_progress(cint(percent) + "% " + frappe._("Complete"), percent);
this.frm.dashboard.add_progress(cint(percent) + "% " + __("Complete"), percent);
if(doc.status === "Stopped") {
this.frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop");
this.frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop");
}
}
},
@ -55,20 +55,20 @@ $.extend(cur_frm.cscript, {
var cfn_set_fields = function(doc, dt, dn) {
if (doc.docstatus == 1) {
if (doc.status != 'Stopped' && doc.status != 'Completed')
cur_frm.add_custom_button(frappe._('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Production Order'], "icon-exclamation");
else if (doc.status == 'Stopped')
cur_frm.add_custom_button(frappe._('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Production Order'], "icon-check");
if (doc.status == 'Submitted' || doc.status == 'Material Transferred' || doc.status == 'In Process'){
cur_frm.add_custom_button(frappe._('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
cur_frm.add_custom_button(frappe._('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']);
cur_frm.add_custom_button(__('Transfer Raw Materials'), cur_frm.cscript['Transfer Raw Materials']);
cur_frm.add_custom_button(__('Update Finished Goods'), cur_frm.cscript['Update Finished Goods']);
}
}
}
cur_frm.cscript['Stop Production Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(frappe._("Do you really want to stop production order: " + doc.name));
var check = confirm(__("Do you really want to stop production order: " + doc.name));
if (check) {
return $c_obj(doc, 'stop_unstop', 'Stopped', function(r, rt) {cur_frm.refresh();});
}
@ -76,7 +76,7 @@ cur_frm.cscript['Stop Production Order'] = function() {
cur_frm.cscript['Unstop Production Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(frappe._("Do really want to unstop production order: " + doc.name));
var check = confirm(__("Do really want to unstop production order: " + doc.name));
if (check)
return $c_obj(doc, 'stop_unstop', 'Unstopped', function(r, rt) {cur_frm.refresh();});
}
@ -111,5 +111,5 @@ cur_frm.set_query("bom_no", function(doc) {
query: "erpnext.controllers.queries.bom",
filters: {item: cstr(doc.production_item)}
}
} else msgprint(frappe._("Please enter Production Item first"));
} else msgprint(__("Please enter Production Item first"));
});

View File

@ -44,7 +44,7 @@ cur_frm.fields_dict['pp_details'].grid.get_field('bom_no').get_query = function(
query: "erpnext.controllers.queries.bom",
filters:{'item': cstr(d.item_code)}
}
} else msgprint(frappe._("Please enter Item first"));
} else msgprint(__("Please enter Item first"));
}
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {

View File

@ -4,11 +4,11 @@
// show tasks
cur_frm.cscript.refresh = function(doc) {
if(!doc.__islocal) {
cur_frm.appframe.add_button(frappe._("Gantt Chart"), function() {
cur_frm.appframe.add_button(__("Gantt Chart"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("Gantt", "Task");
}, "icon-tasks");
cur_frm.add_custom_button(frappe._("Tasks"), function() {
cur_frm.add_custom_button(__("Tasks"), function() {
frappe.route_options = {"project": doc.name}
frappe.set_route("List", "Task");
}, "icon-list");

View File

@ -6,7 +6,7 @@ frappe.views.calendar["Task"] = {
"start": "exp_start_date",
"end": "exp_end_date",
"id": "name",
"title": frappe._("subject"),
"title": __("subject"),
"allDay": "allDay"
},
gantt: true,
@ -15,7 +15,7 @@ frappe.views.calendar["Task"] = {
"fieldtype": "Link",
"fieldname": "project",
"options": "Project",
"label": frappe._("Project")
"label": __("Project")
}
],
get_events_method: "erpnext.projects.doctype.task.task.get_events"

View File

@ -6,22 +6,22 @@ frappe.listview_settings['Time Log'] = {
add_fields: ["`tabTime Log`.`status`", "`tabTime Log`.`billable`", "`tabTime Log`.`activity_type`"],
selectable: true,
onload: function(me) {
me.appframe.add_button(frappe._("Make Time Log Batch"), function() {
me.appframe.add_button(__("Make Time Log Batch"), function() {
var selected = me.get_checked_items() || [];
if(!selected.length) {
msgprint(frappe._("Please select Time Logs."))
msgprint(__("Please select Time Logs."))
}
// select only billable time logs
for(var i in selected) {
var d = selected[i];
if(!d.billable) {
msgprint(frappe._("Time Log is not billable") + ": " + d.name);
msgprint(__("Time Log is not billable") + ": " + d.name);
return;
}
if(d.status!="Submitted") {
msgprint(frappe._("Time Log Status must be Submitted."));
msgprint(__("Time Log Status must be Submitted."));
}
}

View File

@ -18,14 +18,14 @@ cur_frm.set_query("time_log", "time_log_batch_details", function(doc) {
$.extend(cur_frm.cscript, {
refresh: function(doc) {
cur_frm.set_intro({
"Draft": frappe._("Select Time Logs and Submit to create a new Sales Invoice."),
"Submitted": frappe._("Click on 'Make Sales Invoice' button to create a new Sales Invoice."),
"Billed": frappe._("This Time Log Batch has been billed."),
"Cancelled": frappe._("This Time Log Batch has been cancelled.")
"Draft": __("Select Time Logs and Submit to create a new Sales Invoice."),
"Submitted": __("Click on 'Make Sales Invoice' button to create a new Sales Invoice."),
"Billed": __("This Time Log Batch has been billed."),
"Cancelled": __("This Time Log Batch has been cancelled.")
}[doc.status]);
if(doc.status=="Submitted") {
cur_frm.add_custom_button(frappe._("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() },
cur_frm.add_custom_button(__("Make Sales Invoice"), function() { cur_frm.cscript.make_invoice() },
"icon-file-alt");
}
},

View File

@ -5,13 +5,13 @@ frappe.query_reports["Daily Time Log Summary"] = {
"filters": [
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.datetime.get_today()
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": frappe.datetime.get_today()
},

View File

@ -37,39 +37,39 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
},
setup_columns: function() {
this.columns = [
{id: "name", name: frappe._("Account"), field: "name", width: 300, cssClass: "cell-title",
{id: "name", name: __("Account"), field: "name", width: 300, cssClass: "cell-title",
formatter: this.tree_formatter},
{id: "opening_dr", name: frappe._("Opening (Dr)"), field: "opening_dr", width: 100,
{id: "opening_dr", name: __("Opening (Dr)"), field: "opening_dr", width: 100,
formatter: this.currency_formatter},
{id: "opening_cr", name: frappe._("Opening (Cr)"), field: "opening_cr", width: 100,
{id: "opening_cr", name: __("Opening (Cr)"), field: "opening_cr", width: 100,
formatter: this.currency_formatter},
{id: "debit", name: frappe._("Debit"), field: "debit", width: 100,
{id: "debit", name: __("Debit"), field: "debit", width: 100,
formatter: this.currency_formatter},
{id: "credit", name: frappe._("Credit"), field: "credit", width: 100,
{id: "credit", name: __("Credit"), field: "credit", width: 100,
formatter: this.currency_formatter},
{id: "closing_dr", name: frappe._("Closing (Dr)"), field: "closing_dr", width: 100,
{id: "closing_dr", name: __("Closing (Dr)"), field: "closing_dr", width: 100,
formatter: this.currency_formatter},
{id: "closing_cr", name: frappe._("Closing (Cr)"), field: "closing_cr", width: 100,
{id: "closing_cr", name: __("Closing (Cr)"), field: "closing_cr", width: 100,
formatter: this.currency_formatter}
];
},
filters: [
{fieldtype: "Select", label: frappe._("Company"), link:"Company", default_value: "Select Company...",
{fieldtype: "Select", label: __("Company"), link:"Company", default_value: "Select Company...",
filter: function(val, item, opts, me) {
if (item.company == val || val == opts.default_value) {
return me.apply_zero_filter(val, item, opts, me);
}
return false;
}},
{fieldtype: "Select", label: frappe._("Fiscal Year"), link:"Fiscal Year",
{fieldtype: "Select", label: __("Fiscal Year"), link:"Fiscal Year",
default_value: "Select Fiscal Year..."},
{fieldtype: "Date", label: frappe._("From Date")},
{fieldtype: "Label", label: frappe._("To")},
{fieldtype: "Date", label: frappe._("To Date")},
{fieldtype: "Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white",
{fieldtype: "Date", label: __("From Date")},
{fieldtype: "Label", label: __("To")},
{fieldtype: "Date", label: __("To Date")},
{fieldtype: "Button", label: __("Refresh"), icon:"icon-refresh icon-white",
cssClass:"btn-info"},
{fieldtype: "Button", label: frappe._("Reset Filters")},
{fieldtype: "Button", label: __("Reset Filters")},
],
setup_filters: function() {
this._super();
@ -207,7 +207,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
set_fiscal_year: function() {
if (this.opening_date > this.closing_date) {
msgprint(frappe._("Opening Date should be before Closing Date"));
msgprint(__("Opening Date should be before Closing Date"));
return;
}
@ -221,7 +221,7 @@ erpnext.AccountTreeGrid = frappe.views.TreeGridReport.extend({
});
if (!this.fiscal_year) {
msgprint(frappe._("Opening Date and Closing Date should be within same Fiscal Year"));
msgprint(__("Opening Date and Closing Date should be within same Fiscal Year"));
return;
}
},

View File

@ -23,12 +23,12 @@ $(document).bind('toolbar_setup', function() {
frappe.provide('frappe.ui.misc');
frappe.ui.misc.about = function() {
if(!frappe.ui.misc.about_dialog) {
var d = new frappe.ui.Dialog({title: frappe._('About')})
var d = new frappe.ui.Dialog({title: __('About')})
$(d.body).html(repl("<div>\
<h2>ERPNext</h2> \
<p>"+frappe._("An open source ERP made for the web.</p>") +
"<p>"+frappe._("To report an issue, go to ")+"<a href='https://github.com/frappe/erpnext/issues'>GitHub Issues</a></p> \
<p>"+__("An open source ERP made for the web.</p>") +
"<p>"+__("To report an issue, go to ")+"<a href='https://github.com/frappe/erpnext/issues'>GitHub Issues</a></p> \
<p><a href='http://erpnext.org' target='_blank'>http://erpnext.org</a>.</p>\
<p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\
<hr>\

View File

@ -7,7 +7,7 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({
show_stock_ledger: function() {
var me = this;
if(this.frm.doc.docstatus===1) {
this.frm.appframe.add_button(frappe._("Stock Ledger"), function() {
this.frm.appframe.add_button(__("Stock Ledger"), function() {
frappe.route_options = {
voucher_no: me.frm.doc.name,
from_date: me.frm.doc.posting_date,
@ -23,7 +23,7 @@ erpnext.stock.StockController = frappe.ui.form.Controller.extend({
show_general_ledger: function() {
var me = this;
if(this.frm.doc.docstatus===1 && cint(frappe.defaults.get_default("auto_accounting_for_stock"))) {
cur_frm.appframe.add_button(frappe._('Accounting Ledger'), function() {
cur_frm.appframe.add_button(__('Accounting Ledger'), function() {
frappe.route_options = {
voucher_no: me.frm.doc.name,
from_date: me.frm.doc.posting_date,

View File

@ -198,7 +198,7 @@ $(document).bind('form_refresh', function() {
} else if(cur_frm.fields_dict[fort]) {
cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false);
} else {
msgprint(frappe._('Grid "')+fort+frappe._('" does not exists'));
msgprint(__('Grid "')+fort+__('" does not exists'));
}
}
}

View File

@ -5,35 +5,35 @@ var get_filters = function(){
return [
{
"fieldname":"period",
"label": frappe._("Period"),
"label": __("Period"),
"fieldtype": "Select",
"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
"default": "Monthly"
},
{
"fieldname":"based_on",
"label": frappe._("Based On"),
"label": __("Based On"),
"fieldtype": "Select",
"options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"),
"default": "Item"
},
{
"fieldname":"group_by",
"label": frappe._("Group By"),
"label": __("Group By"),
"fieldtype": "Select",
"options": ["Item", "Supplier"].join("\n"),
"default": ""
},
{
"fieldname":"fiscal_year",
"label": frappe._("Fiscal Year"),
"label": __("Fiscal Year"),
"fieldtype": "Link",
"options":'Fiscal Year',
"default": sys_defaults.fiscal_year
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -38,8 +38,8 @@ $.extend(erpnext.queries, {
customer_filter: function(doc) {
if(!doc.customer) {
frappe.throw(frappe._("Please specify a") + " " +
frappe._(frappe.meta.get_label(doc.doctype, "customer", doc.name)));
frappe.throw(__("Please specify a") + " " +
__(frappe.meta.get_label(doc.doctype, "customer", doc.name)));
}
return { filters: { customer: doc.customer } };
@ -47,8 +47,8 @@ $.extend(erpnext.queries, {
supplier_filter: function(doc) {
if(!doc.supplier) {
frappe.throw(frappe._("Please specify a") + " " +
frappe._(frappe.meta.get_label(doc.doctype, "supplier", doc.name)));
frappe.throw(__("Please specify a") + " " +
__(frappe.meta.get_label(doc.doctype, "supplier", doc.name)));
}
return { filters: { supplier: doc.supplier } };
@ -56,8 +56,8 @@ $.extend(erpnext.queries, {
lead_filter: function(doc) {
if(!doc.lead) {
frappe.throw(frappe._("Please specify a") + " " +
frappe._(frappe.meta.get_label(doc.doctype, "lead", doc.name)));
frappe.throw(__("Please specify a") + " " +
__(frappe.meta.get_label(doc.doctype, "lead", doc.name)));
}
return { filters: { lead: doc.lead } };

View File

@ -5,35 +5,35 @@ var get_filters = function(){
return[
{
"fieldname":"period",
"label": frappe._("Period"),
"label": __("Period"),
"fieldtype": "Select",
"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
"default": "Monthly"
},
{
"fieldname":"based_on",
"label": frappe._("Based On"),
"label": __("Based On"),
"fieldtype": "Select",
"options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"),
"default": "Item"
},
{
"fieldname":"group_by",
"label": frappe._("Group By"),
"label": __("Group By"),
"fieldtype": "Select",
"options": ["Item", "Customer"].join("\n"),
"default": ""
},
{
"fieldname":"fiscal_year",
"label": frappe._("Fiscal Year"),
"label": __("Fiscal Year"),
"fieldtype": "Link",
"options":'Fiscal Year',
"default": sys_defaults.fiscal_year
},
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")

View File

@ -3,5 +3,5 @@
// start
$(document).on('startup', function() {
console.log(frappe._('Starting up...'));
console.log(__('Starting up...'));
});

View File

@ -6,7 +6,7 @@ frappe.require("assets/erpnext/js/stock_grid_report.js");
erpnext.StockAnalytics = erpnext.StockGridReport.extend({
init: function(wrapper, opts) {
var args = {
title: frappe._("Stock Analytics"),
title: __("Stock Analytics"),
page: wrapper,
parent: $(wrapper).find('.layout-main'),
appframe: wrapper.appframe,
@ -36,13 +36,13 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
},
setup_columns: function() {
var std_columns = [
{id: "check", name: frappe._("Plot"), field: "check", width: 30,
{id: "check", name: __("Plot"), field: "check", width: 30,
formatter: this.check_formatter},
{id: "name", name: frappe._("Item"), field: "name", width: 300,
{id: "name", name: __("Item"), field: "name", width: 300,
formatter: this.tree_formatter},
{id: "brand", name: frappe._("Brand"), field: "brand", width: 100},
{id: "stock_uom", name: frappe._("UOM"), field: "stock_uom", width: 100},
{id: "opening", name: frappe._("Opening"), field: "opening", hidden: true,
{id: "brand", name: __("Brand"), field: "brand", width: 100},
{id: "stock_uom", name: __("UOM"), field: "stock_uom", width: 100},
{id: "opening", name: __("Opening"), field: "opening", hidden: true,
formatter: this.currency_formatter}
];
@ -50,23 +50,23 @@ erpnext.StockAnalytics = erpnext.StockGridReport.extend({
this.columns = std_columns.concat(this.columns);
},
filters: [
{fieldtype:"Select", label: frappe._("Value or Qty"), options:["Value", "Quantity"],
{fieldtype:"Select", label: __("Value or Qty"), options:["Value", "Quantity"],
filter: function(val, item, opts, me) {
return me.apply_zero_filter(val, item, opts, me);
}},
{fieldtype:"Select", label: frappe._("Brand"), link:"Brand",
{fieldtype:"Select", label: __("Brand"), link:"Brand",
default_value: "Select Brand...", filter: function(val, item, opts) {
return val == opts.default_value || item.brand == val || item._show;
}, link_formatter: {filter_input: "brand"}},
{fieldtype:"Select", label: frappe._("Warehouse"), link:"Warehouse",
{fieldtype:"Select", label: __("Warehouse"), link:"Warehouse",
default_value: "Select Warehouse..."},
{fieldtype:"Date", label: frappe._("From Date")},
{fieldtype:"Label", label: frappe._("To")},
{fieldtype:"Date", label: frappe._("To Date")},
{fieldtype:"Select", label: frappe._("Range"),
{fieldtype:"Date", label: __("From Date")},
{fieldtype:"Label", label: __("To")},
{fieldtype:"Date", label: __("To Date")},
{fieldtype:"Select", label: __("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
{fieldtype:"Button", label: frappe._("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: frappe._("Reset Filters")}
{fieldtype:"Button", label: __("Refresh"), icon:"icon-refresh icon-white"},
{fieldtype:"Button", label: __("Reset Filters")}
],
setup_filters: function() {
var me = this;

View File

@ -70,10 +70,10 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
make_pos_btn: function() {
if(!this.pos_active) {
var btn_label = frappe._("POS View"),
var btn_label = __("POS View"),
icon = "icon-desktop";
} else {
var btn_label = frappe._(this.frm.doctype) + frappe._(" View"),
var btn_label = __(this.frm.doctype) + __(" View"),
icon = "icon-file-text";
}
var me = this;
@ -89,7 +89,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
this.frm.doc.selling_price_list : this.frm.doc.buying_price_list;
if (!price_list)
msgprint(frappe._("Please select Price List"))
msgprint(__("Please select Price List"))
else {
if((show===true && this.pos_active) || (show===false && !this.pos_active)) return;
@ -354,10 +354,10 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
validate_on_previous_row: function(tax) {
// validate if a valid row id is mentioned in case of
// On Previous Row Amount and On Previous Row Total
if(([frappe._("On Previous Row Amount"), frappe._("On Previous Row Total")].indexOf(tax.charge_type) != -1) &&
if(([__("On Previous Row Amount"), __("On Previous Row Total")].indexOf(tax.charge_type) != -1) &&
(!tax.row_id || cint(tax.row_id) >= tax.idx)) {
var msg = repl(frappe._("Row") + " # %(idx)s [%(doctype)s]: " +
frappe._("Please specify a valid") + " %(row_id_label)s", {
var msg = repl(__("Row") + " # %(idx)s [%(doctype)s]: " +
__("Please specify a valid") + " %(row_id_label)s", {
idx: tax.idx,
doctype: tax.doctype,
row_id_label: frappe.meta.get_label(tax.doctype, "row_id", tax.name)
@ -370,9 +370,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
if(!this.frm.tax_doclist) this.frm.tax_doclist = this.get_tax_doclist();
var actual_type_error = function() {
var msg = repl(frappe._("For row") + " # %(idx)s [%(doctype)s]: " +
var msg = repl(__("For row") + " # %(idx)s [%(doctype)s]: " +
"%(charge_type_label)s = \"%(charge_type)s\" " +
frappe._("cannot be included in Item's rate"), {
__("cannot be included in Item's rate"), {
idx: tax.idx,
doctype: tax.doctype,
charge_type_label: frappe.meta.get_label(tax.doctype, "charge_type", tax.name),
@ -382,9 +382,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
};
var on_previous_row_error = function(row_range) {
var msg = repl(frappe._("For row") + " # %(idx)s [%(doctype)s]: " +
frappe._("to be included in Item's rate, it is required that: ") +
" [" + frappe._("Row") + " # %(row_range)s] " + frappe._("also be included in Item's rate"), {
var msg = repl(__("For row") + " # %(idx)s [%(doctype)s]: " +
__("to be included in Item's rate, it is required that: ") +
" [" + __("Row") + " # %(row_range)s] " + __("also be included in Item's rate"), {
idx: tax.idx,
doctype: tax.doctype,
charge_type_label: frappe.meta.get_label(tax.doctype, "charge_type", tax.name),
@ -454,7 +454,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
tax_accounts.push([tax.name, tax.account_head]);
});
var headings = $.map([frappe._("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })),
var headings = $.map([__("Item Name")].concat($.map(tax_accounts, function(head) { return head[1]; })),
function(head) { return '<th style="min-width: 100px;">' + (head || "") + "</th>" }).join("\n");
var distinct_item_names = [];
@ -494,9 +494,9 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
$.each(["company", "customer"], function(i, fieldname) {
if(frappe.meta.has_field(me.frm.doc.doctype, fieldname)) {
if (!me.frm.doc[fieldname]) {
msgprint(frappe._("Please specify") + ": " +
msgprint(__("Please specify") + ": " +
frappe.meta.get_label(me.frm.doc.doctype, fieldname, me.frm.doc.name) +
". " + frappe._("It is needed to fetch Item Details."));
". " + __("It is needed to fetch Item Details."));
valid = false;
}
}
@ -520,8 +520,8 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
if(!this.frm.doc.conversion_rate) {
frappe.throw(repl('%(conversion_rate_label)s' +
frappe._(' is mandatory. Maybe Currency Exchange record is not created for ') +
'%(from_currency)s' + frappe._(" to ") + '%(to_currency)s',
__(' is mandatory. Maybe Currency Exchange record is not created for ') +
'%(from_currency)s' + __(" to ") + '%(to_currency)s',
{
"conversion_rate_label": conversion_rate_label,
"from_currency": this.frm.doc.currency,

View File

@ -44,19 +44,19 @@ $.extend(erpnext, {
if(!grid_row.fields_dict.serial_no ||
grid_row.fields_dict.serial_no.get_status()!=="Write") return;
var $btn = $('<button class="btn btn-sm btn-default">'+frappe._("Add Serial No")+'</button>')
var $btn = $('<button class="btn btn-sm btn-default">'+__("Add Serial No")+'</button>')
.appendTo($("<div>")
.css({"margin-bottom": "10px", "margin-left": "15px"})
.appendTo(grid_row.fields_dict.serial_no.$wrapper));
$btn.on("click", function() {
var d = new frappe.ui.Dialog({
title: frappe._("Add Serial No"),
title: __("Add Serial No"),
fields: [
{
"fieldtype": "Link",
"options": "Serial No",
"label": frappe._("Serial No"),
"label": __("Serial No"),
"get_query": {
item_code: grid_row.doc.item_code,
warehouse: grid_row.doc.warehouse
@ -64,7 +64,7 @@ $.extend(erpnext, {
},
{
"fieldtype": "Button",
"label": frappe._("Add")
"label": __("Add")
}
]
});

View File

@ -42,7 +42,7 @@ cur_frm.cscript.setup_dashboard = function(doc) {
if(doc.__islocal)
return;
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager"))
cur_frm.dashboard.set_headline('<span class="text-muted">'+ frappe._('Loading...')+ '</span>')
cur_frm.dashboard.set_headline('<span class="text-muted">'+ __('Loading...')+ '</span>')
cur_frm.dashboard.add_doctype_badge("Opportunity", "customer");
cur_frm.dashboard.add_doctype_badge("Quotation", "customer");
@ -59,9 +59,9 @@ cur_frm.cscript.setup_dashboard = function(doc) {
callback: function(r) {
if (in_list(user_roles, "Accounts User") || in_list(user_roles, "Accounts Manager")) {
cur_frm.dashboard.set_headline(
frappe._("Total Billing This Year: ") + "<b>"
__("Total Billing This Year: ") + "<b>"
+ format_currency(r.message.total_billing, erpnext.get_currency(cur_frm.doc.company))
+ '</b> / <span class="text-muted">' + frappe._("Unpaid") + ": <b>"
+ '</b> / <span class="text-muted">' + __("Unpaid") + ": <b>"
+ format_currency(r.message.total_unpaid, erpnext.get_currency(cur_frm.doc.company))
+ '</b></span>');
}
@ -80,7 +80,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: frappe._('No addresses created'),
no_results_message: __('No addresses created'),
render_row: cur_frm.cscript.render_address_row,
});
// note: render_address_row is defined in contact_control.js
@ -98,7 +98,7 @@ cur_frm.cscript.make_contact = function() {
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where customer='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
},
as_dict: 1,
no_results_message: frappe._('No contacts created'),
no_results_message: __('No contacts created'),
render_row: cur_frm.cscript.render_contact_row,
});
// note: render_contact_row is defined in contact_control.js

View File

@ -49,7 +49,7 @@ erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
refresh: function() {
if (this.frm.doc.docstatus===0) {
cur_frm.add_custom_button(frappe._('From Delivery Note'),
cur_frm.add_custom_button(__('From Delivery Note'),
function() {
frappe.model.map_current_doc({
method: "erpnext.stock.doctype.delivery_note.delivery_note.make_installation_note",

View File

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

View File

@ -85,11 +85,11 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.clear_custom_buttons();
if(doc.docstatus === 1 && doc.status!=="Lost") {
cur_frm.add_custom_button(frappe._('Create Quotation'), cur_frm.cscript.create_quotation);
cur_frm.add_custom_button(__('Create Quotation'), cur_frm.cscript.create_quotation);
if(doc.status!=="Quotation")
cur_frm.add_custom_button(frappe._('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
cur_frm.add_custom_button(__('Opportunity Lost'), cur_frm.cscript['Declare Opportunity Lost']);
cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
}
}
@ -116,11 +116,11 @@ cur_frm.cscript.lead = function(doc, cdt, cdn) {
cur_frm.cscript['Declare Opportunity Lost'] = function() {
var dialog = new frappe.ui.Dialog({
title: frappe._("Set as Lost"),
title: __("Set as Lost"),
fields: [
{"fieldtype": "Text", "label": frappe._("Reason for losing"), "fieldname": "reason",
{"fieldtype": "Text", "label": __("Reason for losing"), "fieldname": "reason",
"reqd": 1 },
{"fieldtype": "Button", "label": frappe._("Update"), "fieldname": "update"},
{"fieldtype": "Button", "label": __("Update"), "fieldname": "update"},
]
});
@ -133,7 +133,7 @@ cur_frm.cscript['Declare Opportunity Lost'] = function() {
args: args.reason,
callback: function(r) {
if(r.exc) {
msgprint(frappe._("There were errors."));
msgprint(__("There were errors."));
return;
}
dialog.hide();

View File

@ -26,17 +26,17 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
this._super(doc, dt, dn);
if(doc.docstatus == 1 && doc.status!=='Lost') {
cur_frm.add_custom_button(frappe._('Make Sales Order'),
cur_frm.add_custom_button(__('Make Sales Order'),
cur_frm.cscript['Make Sales Order']);
if(doc.status!=="Ordered") {
cur_frm.add_custom_button(frappe._('Set as Lost'),
cur_frm.add_custom_button(__('Set as Lost'),
cur_frm.cscript['Declare Order Lost'], "icon-exclamation");
}
cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
}
if (this.frm.doc.docstatus===0) {
cur_frm.add_custom_button(frappe._('From Opportunity'),
cur_frm.add_custom_button(__('From Opportunity'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.opportunity.opportunity.make_quotation",
@ -90,7 +90,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
validate_company_and_party: function(party_field) {
if(!this.frm.doc.quotation_to) {
msgprint(frappe._("Please select a value for" + " " +
msgprint(__("Please select a value for" + " " +
frappe.meta.get_label(this.frm.doc.doctype, "quotation_to", this.frm.doc.name)));
return false;
} else if (this.frm.doc.quotation_to == "Lead") {
@ -135,9 +135,9 @@ cur_frm.cscript['Declare Order Lost'] = function(){
var dialog = new frappe.ui.Dialog({
title: "Set as Lost",
fields: [
{"fieldtype": "Text", "label": frappe._("Reason for losing"), "fieldname": "reason",
{"fieldtype": "Text", "label": __("Reason for losing"), "fieldname": "reason",
"reqd": 1 },
{"fieldtype": "Button", "label": frappe._("Update"), "fieldname": "update"},
{"fieldtype": "Button", "label": __("Update"), "fieldname": "update"},
]
});
@ -150,7 +150,7 @@ cur_frm.cscript['Declare Order Lost'] = function(){
args: args.reason,
callback: function(r) {
if(r.exc) {
msgprint(frappe._("There were errors."));
msgprint(__("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(frappe._("Check for Duplicates"), function() {
cur_frm.add_custom_button(__("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 = frappe._('Select Item where "Is Stock Item" is "No"')+
frappe._('and "Is Sales Item" is "Yes" and there is no other Sales BOM');
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.cscript.item_code = function(doc, dt, dn) {
var d = locals[dt][dn];

View File

@ -21,44 +21,44 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
if(doc.docstatus==1) {
if(doc.status != 'Stopped') {
cur_frm.dashboard.add_progress(cint(doc.per_delivered) + frappe._("% Delivered"),
cur_frm.dashboard.add_progress(cint(doc.per_delivered) + __("% Delivered"),
doc.per_delivered);
cur_frm.dashboard.add_progress(cint(doc.per_billed) + frappe._("% Billed"),
cur_frm.dashboard.add_progress(cint(doc.per_billed) + __("% Billed"),
doc.per_billed);
cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
// delivery note
if(flt(doc.per_delivered, 2) < 100 && doc.order_type=='Sales')
cur_frm.add_custom_button(frappe._('Make Delivery'), this.make_delivery_note);
cur_frm.add_custom_button(__('Make Delivery'), this.make_delivery_note);
// maintenance
if(flt(doc.per_delivered, 2) < 100 && (doc.order_type !='Sales')) {
cur_frm.add_custom_button(frappe._('Make Maint. Visit'), this.make_maintenance_visit);
cur_frm.add_custom_button(frappe._('Make Maint. Schedule'),
cur_frm.add_custom_button(__('Make Maint. Visit'), this.make_maintenance_visit);
cur_frm.add_custom_button(__('Make Maint. Schedule'),
this.make_maintenance_schedule);
}
// indent
if(!doc.order_type || (doc.order_type == 'Sales'))
cur_frm.add_custom_button(frappe._('Make ') + frappe._('Material Request'),
cur_frm.add_custom_button(__('Make ') + __('Material Request'),
this.make_material_request);
// sales invoice
if(flt(doc.per_billed, 2) < 100)
cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_sales_invoice);
cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice);
// stop
if(flt(doc.per_delivered, 2) < 100 || doc.per_billed < 100)
cur_frm.add_custom_button(frappe._('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation");
cur_frm.add_custom_button(__('Stop!'), cur_frm.cscript['Stop Sales Order'],"icon-exclamation");
} else {
// un-stop
cur_frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop");
cur_frm.add_custom_button(frappe._('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check");
cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop");
cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Sales Order'], "icon-check");
}
}
if (this.frm.doc.docstatus===0) {
cur_frm.add_custom_button(frappe._('From Quotation'),
cur_frm.add_custom_button(__('From Quotation'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.quotation.quotation.make_sales_order",
@ -157,7 +157,7 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
cur_frm.cscript['Stop Sales Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(frappe._("Are you sure you want to STOP ") + doc.name);
var check = confirm(__("Are you sure you want to STOP ") + doc.name);
if (check) {
return $c('runserverobj', {
@ -172,7 +172,7 @@ cur_frm.cscript['Stop Sales Order'] = function() {
cur_frm.cscript['Unstop Sales Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(frappe._("Are you sure you want to UNSTOP ") + doc.name);
var check = confirm(__("Are you sure you want to UNSTOP ") + doc.name);
if (check) {
return $c('runserverobj', {

View File

@ -4,7 +4,7 @@
frappe.pages['sales-analytics'].onload = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: frappe._('Sales Analytics'),
title: __('Sales Analytics'),
single_column: true
});
new erpnext.SalesAnalytics(wrapper);
@ -17,7 +17,7 @@ frappe.pages['sales-analytics'].onload = function(wrapper) {
erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
init: function(wrapper) {
this._super({
title: frappe._("Sales Analytics"),
title: __("Sales Analytics"),
page: wrapper,
parent: $(wrapper).find('.layout-main'),
appframe: wrapper.appframe,
@ -30,14 +30,14 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
this.tree_grids = {
"Customer Group": {
label: frappe._("Customer Group / Customer"),
label: __("Customer Group / Customer"),
show: true,
item_key: "customer",
parent_field: "parent_customer_group",
formatter: function(item) { return item.name; }
},
"Customer": {
label: frappe._("Customer"),
label: __("Customer"),
show: false,
item_key: "customer",
formatter: function(item) {
@ -45,7 +45,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
}
},
"Item Group": {
label: frappe._("Item"),
label: __("Item"),
show: true,
parent_field: "parent_item_group",
item_key: "item_code",
@ -54,7 +54,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
}
},
"Item": {
label: frappe._("Item"),
label: __("Item"),
show: false,
item_key: "item_code",
formatter: function(item) {
@ -62,7 +62,7 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
}
},
"Territory": {
label: frappe._("Territory / Customer"),
label: __("Territory / Customer"),
show: true,
item_key: "customer",
parent_field: "parent_territory",
@ -88,23 +88,23 @@ erpnext.SalesAnalytics = frappe.views.TreeGridReport.extend({
this.columns = std_columns.concat(this.columns);
},
filters: [
{fieldtype:"Select", fieldname: "tree_type", label: frappe._("Tree Type"), options:["Customer Group", "Customer",
{fieldtype:"Select", fieldname: "tree_type", label: __("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", fieldname: "based_on", label: frappe._("Based On"), options:["Sales Invoice",
{fieldtype:"Select", fieldname: "based_on", label: __("Based On"), options:["Sales Invoice",
"Sales Order", "Delivery Note"]},
{fieldtype:"Select", fieldname: "value_or_qty", label: frappe._("Value or Qty"), options:["Value", "Quantity"]},
{fieldtype:"Select", fieldname: "company", label: frappe._("Company"), link:"Company",
{fieldtype:"Select", fieldname: "value_or_qty", label: __("Value or Qty"), options:["Value", "Quantity"]},
{fieldtype:"Select", fieldname: "company", label: __("Company"), link:"Company",
default_value: "Select Company..."},
{fieldtype:"Date", fieldname: "from_date", label: frappe._("From Date")},
{fieldtype:"Label", fieldname: "to", label: frappe._("To")},
{fieldtype:"Date", fieldname: "to_date", label: frappe._("To Date")},
{fieldtype:"Select", fieldname: "range", label: frappe._("Range"),
{fieldtype:"Date", fieldname: "from_date", label: __("From Date")},
{fieldtype:"Label", fieldname: "to", label: __("To")},
{fieldtype:"Date", fieldname: "to_date", label: __("To Date")},
{fieldtype:"Select", fieldname: "range", label: __("Range"),
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
{fieldtype:"Button", fieldname: "refresh", label: frappe._("Refresh"), icon:"icon-refresh"},
{fieldtype:"Button", fieldname: "reset_filters", label: frappe._("Reset Filters"), icon:"icon-filter"}
{fieldtype:"Button", fieldname: "refresh", label: __("Refresh"), icon:"icon-refresh"},
{fieldtype:"Button", fieldname: "reset_filters", label: __("Reset Filters"), icon:"icon-filter"}
],
setup_filters: function() {
var me = this;

View File

@ -16,8 +16,8 @@ pscript['onload_Sales Browser'] = function(wrapper){
$(wrapper)
.find(".layout-side-section")
.html('<div class="text-muted">'+
frappe._('Click on a link to get options to expand get options ') +
frappe._('Add') + ' / ' + frappe._('Edit') + ' / '+ frappe._('Delete') + '.</div>')
__('Click on a link to get options to expand get options ') +
__('Add') + ' / ' + __('Edit') + ' / '+ __('Delete') + '.</div>')
wrapper.make_tree = function() {
var ctype = frappe.get_route()[1] || 'Territory';
@ -114,18 +114,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: frappe._("Further nodes can be only created under 'Group' type nodes")},
description: __("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: frappe._("Please enter Employee Id of this sales parson")});
options:'Employee', description: __("Please enter Employee Id of this sales parson")});
}
// the dialog
var d = new frappe.ui.Dialog({
title: frappe._('New ') + frappe._(me.ctype),
title: __('New ') + __(me.ctype),
fields: fields
})

View File

@ -5,20 +5,20 @@ frappe.query_reports["Customer Acquisition and Loyalty"] = {
"filters": [
{
"fieldname":"company",
"label": frappe._("Company"),
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
},
{
"fieldname":"from_date",
"label": frappe._("From Date"),
"label": __("From Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_start_date")
},
{
"fieldname":"to_date",
"label": frappe._("To Date"),
"label": __("To Date"),
"fieldtype": "Date",
"default": frappe.defaults.get_user_default("year_end_date")
},

View File

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

View File

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

View File

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

View File

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

View File

@ -72,7 +72,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
this.frm.set_query("batch_no", this.fname, function(doc, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn);
if(!item.item_code) {
frappe.throw(frappe._("Please enter Item Code to get batch no"));
frappe.throw(__("Please enter Item Code to get batch no"));
} else {
filters = {
'item_code': item.item_code,
@ -174,10 +174,10 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
frappe.model.round_floats_in(this.frm.doc, ["net_total", "total_commission"]);
if(this.frm.doc.net_total < this.frm.doc.total_commission) {
var msg = (frappe._("[Error]") + " " +
frappe._(frappe.meta.get_label(this.frm.doc.doctype, "total_commission",
var msg = (__("[Error]") + " " +
__(frappe.meta.get_label(this.frm.doc.doctype, "total_commission",
this.frm.doc.name)) + " > " +
frappe._(frappe.meta.get_label(this.frm.doc.doctype, "net_total", this.frm.doc.name)));
__(frappe.meta.get_label(this.frm.doc.doctype, "net_total", this.frm.doc.name)));
msgprint(msg);
throw msg;
}
@ -421,8 +421,8 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
calculate_commission: function() {
if(this.frm.fields_dict.commission_rate) {
if(this.frm.doc.commission_rate > 100) {
var msg = frappe._(frappe.meta.get_label(this.frm.doc.doctype, "commission_rate", this.frm.doc.name)) +
" " + frappe._("cannot be greater than 100");
var msg = __(frappe.meta.get_label(this.frm.doc.doctype, "commission_rate", this.frm.doc.name)) +
" " + __("cannot be greater than 100");
msgprint(msg);
throw msg;
}
@ -477,7 +477,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
$.each(fields_list, function(i, fname) {
var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname];
if(docfield) {
var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, "");
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
field_label_map[fname] = label.trim() + " (" + currency + ")";
}
});
@ -521,7 +521,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
$.each(fields_list, function(i, fname) {
var docfield = frappe.meta.docfield_map[grid_doctype][fname];
if(docfield) {
var label = frappe._(docfield.label || "").replace(/\([^\)]*\)/g, "");
var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
field_label_map[grid_doctype + "-" + fname] =
label.trim() + " (" + currency + ")";
}
@ -570,7 +570,7 @@ var set_sales_bom_help = function(doc) {
if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) {
help_msg = "<div class='alert alert-warning'>" +
frappe._("For 'Sales BOM' items, warehouse, serial no and batch no \
__("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.")+

View File

@ -7,12 +7,12 @@ $.extend(cur_frm.cscript, {
if(!(cint(cur_frm.doc.dropbox_access_allowed) ||
cint(cur_frm.doc.gdrive_access_allowed))) {
cur_frm.set_intro(frappe._("You can start by selecting backup frequency and \
cur_frm.set_intro(__("You can start by selecting backup frequency and \
granting access for sync"));
} else {
var services = {
"dropbox": frappe._("Dropbox"),
"gdrive": frappe._("Google Drive")
"dropbox": __("Dropbox"),
"gdrive": __("Google Drive")
}
var active_services = [];
@ -25,7 +25,7 @@ $.extend(cur_frm.cscript, {
});
if(active_services.length > 0) {
cur_frm.set_intro(frappe._("Backups will be uploaded to") + ": " +
cur_frm.set_intro(__("Backups will be uploaded to") + ": " +
frappe.utils.comma_and(active_services));
} else {
cur_frm.set_intro("");
@ -36,8 +36,8 @@ $.extend(cur_frm.cscript, {
validate_send_notifications_to: function() {
if(!cur_frm.doc.send_notifications_to) {
msgprint(frappe._("Please specify") + ": " +
frappe._(frappe.meta.get_label(cur_frm.doctype, "send_notifications_to")));
msgprint(__("Please specify") + ": " +
__(frappe.meta.get_label(cur_frm.doctype, "send_notifications_to")));
return false;
}

View File

@ -35,7 +35,7 @@ cur_frm.cscript.replace_abbr = function() {
},
callback: function(r) {
if(r.exc) {
msgprint(frappe._("There were errors."));
msgprint(__("There were errors."));
return;
} else {
cur_frm.set_value("abbr", args.new_abbr);
@ -61,8 +61,8 @@ cur_frm.cscript.has_special_chars = function(t) {
cur_frm.cscript.company_name = function(doc){
if(doc.company_name && cur_frm.cscript.has_special_chars(doc.company_name)){
msgprint(("<font color=red>"+frappe._("Special Characters")+" <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> "+
frappe._("are not allowed for ")+"</font>\n"+frappe._("Company Name")+" <b> "+ doc.company_name +"</b>"))
msgprint(("<font color=red>"+__("Special Characters")+" <b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b> "+
__("are not allowed for ")+"</font>\n"+__("Company Name")+" <b> "+ doc.company_name +"</b>"))
doc.company_name = '';
refresh_field('company_name');
}
@ -70,8 +70,8 @@ cur_frm.cscript.company_name = function(doc){
cur_frm.cscript.abbr = function(doc){
if(doc.abbr && cur_frm.cscript.has_special_chars(doc.abbr)){
msgprint("<font color=red>"+frappe._("Special Characters ")+"<b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b>" +
frappe._("are not allowed for")+ "</font>\nAbbr <b>" + doc.abbr +"</b>")
msgprint("<font color=red>"+__("Special Characters ")+"<b>! @ # $ % ^ * + = - [ ] ' ; , / { } | : < > ?</b>" +
__("are not allowed for")+ "</font>\nAbbr <b>" + doc.abbr +"</b>")
doc.abbr = '';
refresh_field('abbr');
}

View File

@ -4,6 +4,6 @@
cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro("");
if(!cur_frm.doc.enabled) {
cur_frm.set_intro(frappe._("This Currency is disabled. Enable to use in transactions"))
cur_frm.set_intro(__("This Currency is disabled. Enable to use in transactions"))
}
}

View File

@ -22,7 +22,7 @@ $.extend(cur_frm.cscript, {
set_exchange_rate_label: function() {
if(cur_frm.doc.from_currency && cur_frm.doc.to_currency) {
var default_label = frappe._(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label);
var default_label = __(frappe.meta.docfield_map[cur_frm.doctype]["exchange_rate"].label);
cur_frm.fields_dict.exchange_rate.set_label(default_label +
repl(" (1 %(from_currency)s = [?] %(to_currency)s)", cur_frm.doc));
}

View File

@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
// read-only for root customer group
if(!doc.parent_customer_group) {
cur_frm.set_read_only();
cur_frm.set_intro(frappe._("This is a root customer group and cannot be edited."));
cur_frm.set_intro(__("This is a root customer group and cannot be edited."));
} else {
cur_frm.set_intro(null);
}

View File

@ -3,10 +3,10 @@
cur_frm.cscript.refresh = function(doc, dt, dn) {
doc = locals[dt][dn];
var save_msg = frappe._("You must ")+ "<b>"+frappe._("Save ")+"</b>"+frappe._("the form before proceeding");
var err_msg = frappe._("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.")
var save_msg = __("You must ")+ "<b>"+__("Save ")+"</b>"+__("the form before proceeding");
var err_msg = __("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.")
cur_frm.add_custom_button(frappe._('View Now'), function() {
cur_frm.add_custom_button(__('View Now'), function() {
doc = locals[dt][dn];
if(doc.__unsaved != 1) {
return $c_obj(doc, 'get_digest_msg', '', function(r, rt) {
@ -16,7 +16,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
} else {
//console.log(arguments);
var d = new frappe.ui.Dialog({
title: frappe._('Email Digest: ') + dn,
title: __('Email Digest: ') + dn,
width: 800
});
@ -29,7 +29,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
msgprint(save_msg);
}
}, 1);
cur_frm.add_custom_button(frappe._('Send Now'), function() {
cur_frm.add_custom_button(__('Send Now'), function() {
doc = locals[dt][dn];
if(doc.__unsaved != 1) {
return $c_obj(doc, 'send', '', function(r, rt) {
@ -38,7 +38,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
console.log(r.exc);
} else {
//console.log(arguments);
msgprint(frappe._('Message Sent'));
msgprint(__('Message Sent'));
}
});
} else {
@ -56,7 +56,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
// Open a dialog and display checkboxes against email addresses
doc = locals[dt][dn];
var d = new frappe.ui.Dialog({
title: frappe._('Add/Remove Recipients'),
title: __('Add/Remove Recipients'),
width: 400
});
var dialog_div = $a(d.body, 'div', 'dialog-div', '', '');

View File

@ -4,7 +4,7 @@
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.cscript.set_root_readonly(doc);
cur_frm.appframe.add_button(frappe._("Item Group Tree"), function() {
cur_frm.appframe.add_button(__("Item Group Tree"), function() {
frappe.set_route("Sales Browser", "Item Group");
}, "icon-sitemap")
@ -19,7 +19,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
// read-only for root item group
if(!doc.parent_item_group) {
cur_frm.set_read_only();
cur_frm.set_intro(frappe._("This is a root item group and cannot be edited."));
cur_frm.set_intro(__("This is a root item group and cannot be edited."));
} else {
cur_frm.set_intro(null);
}

View File

@ -7,9 +7,9 @@ cur_frm.cscript = {
refresh: function(doc) {
cur_frm.set_intro("");
if(doc.extract_emails) {
cur_frm.set_intro(frappe._("Active: Will extract emails from ") + doc.email_id);
cur_frm.set_intro(__("Active: Will extract emails from ") + doc.email_id);
} else {
cur_frm.set_intro(frappe._("Not Active"));
cur_frm.set_intro(__("Not Active"));
}
}
}

View File

@ -7,9 +7,9 @@ cur_frm.cscript = {
refresh: function(doc) {
cur_frm.set_intro("");
if(doc.extract_emails) {
cur_frm.set_intro(frappe._("Active: Will extract emails from ") + doc.email_id);
cur_frm.set_intro(__("Active: Will extract emails from ") + doc.email_id);
} else {
cur_frm.set_intro(frappe._("Not Active"));
cur_frm.set_intro(__("Not Active"));
}
}
}

View File

@ -39,7 +39,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 sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_address desc"
},
as_dict: 1,
no_results_message: frappe._('No addresses created'),
no_results_message: __('No addresses created'),
render_row: function(wrapper, data) {
$(wrapper).css('padding','5px 0px');
var link = $ln(wrapper,cstr(data.name), function() { loaddoc("Address", this.dn); }, {fontWeight:'bold'});
@ -69,7 +69,7 @@ cur_frm.cscript.make_contact = function() {
return "select name, first_name, last_name, email_id, phone, mobile_no, department, designation, is_primary_contact from tabContact where sales_partner='"+cur_frm.docname+"' and docstatus != 2 order by is_primary_contact desc"
},
as_dict: 1,
no_results_message: frappe._('No contacts created'),
no_results_message: __('No contacts created'),
render_row: function(wrapper, data) {
$(wrapper).css('padding', '5px 0px');
var link = $ln(wrapper, cstr(data.name), function() { loaddoc("Contact", this.dn); }, {fontWeight:'bold'});

View File

@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
// read-only for root
if(!doc.parent_sales_person) {
cur_frm.set_read_only();
cur_frm.set_intro(frappe._("This is a root sales person and cannot be edited."));
cur_frm.set_intro(__("This is a root sales person and cannot be edited."));
} else {
cur_frm.set_intro(null);
}

View File

@ -2,5 +2,5 @@
// License: GNU General Public License v3. See license.txt
cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro(doc.__islocal ? "" : frappe._("There is nothing to edit."))
cur_frm.set_intro(doc.__islocal ? "" : __("There is nothing to edit."))
}

View File

@ -9,7 +9,7 @@ cur_frm.cscript.set_root_readonly = function(doc) {
// read-only for root territory
if(!doc.parent_territory) {
cur_frm.set_read_only();
cur_frm.set_intro(frappe._("This is a root territory and cannot be edited."));
cur_frm.set_intro(__("This is a root territory and cannot be edited."));
} else {
cur_frm.set_intro(null);
}

View File

@ -17,7 +17,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
args: values,
callback: function(r) {
if(r.exc) {
var d = msgprint(frappe._("There were errors."));
var d = msgprint(__("There were errors."));
d.custom_onhide = function() {
frappe.set_route(erpnext.wiz.page_name, "0");
}
@ -25,7 +25,7 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
wiz.show_complete();
setTimeout(function() {
if(user==="Administrator") {
msgprint(frappe._("Login with your new User ID") + ":" + values.email);
msgprint(__("Login with your new User ID") + ":" + values.email);
setTimeout(function() {
frappe.app.logout();
}, 2000);
@ -37,40 +37,40 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
}
})
},
title: frappe._("ERPNext Setup Guide"),
title: __("ERPNext Setup Guide"),
welcome_html: '<h1 class="text-muted text-center"><i class="icon-magic"></i></h1>\
<h2 class="text-center">'+frappe._('ERPNext Setup')+'</h2>\
<h2 class="text-center">'+__('ERPNext Setup')+'</h2>\
<p class="text-center" style="margin: 0px 100px">' +
frappe._('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') +
__('Welcome to ERPNext. Over the next few minutes we will help you setup your ERPNext account. Try and fill in as much information as you have even if it takes a bit longer. It will save you a lot of time later. Good Luck!') +
'</p>',
working_html: '<h3 class="text-muted text-center"><i class="icon-refresh icon-spin"></i></h3>\
<h2 class="text-center">'+frappe._('Setting up...')+'</h2>\
<h2 class="text-center">'+__('Setting up...')+'</h2>\
<p class="text-center">' +
frappe._('Sit tight while your system is being setup. This may take a few moments.') +
__('Sit tight while your system is being setup. This may take a few moments.') +
'</p>',
complete_html: '<h1 class="text-muted text-center"><i class="icon-thumbs-up"></i></h1>\
<h2 class="text-center">'+frappe._('Setup Complete!')+'</h2>\
<h2 class="text-center">'+__('Setup Complete!')+'</h2>\
<p class="text-center">' +
frappe._('Your setup is complete. Refreshing...') +
__('Your setup is complete. Refreshing...') +
'</p>',
slides: [
// User
{
title: frappe._("The First User: You"),
title: __("The First User: You"),
icon: "icon-user",
fields: [
{"fieldname": "first_name", "label": frappe._("First Name"), "fieldtype": "Data",
{"fieldname": "first_name", "label": __("First Name"), "fieldtype": "Data",
reqd:1},
{"fieldname": "last_name", "label": frappe._("Last Name"), "fieldtype": "Data",
{"fieldname": "last_name", "label": __("Last Name"), "fieldtype": "Data",
reqd:1},
{"fieldname": "email", "label": frappe._("Email Id"), "fieldtype": "Data",
{"fieldname": "email", "label": __("Email Id"), "fieldtype": "Data",
reqd:1, "description":"Your Login Id", "options":"Email"},
{"fieldname": "password", "label": frappe._("Password"), "fieldtype": "Password",
{"fieldname": "password", "label": __("Password"), "fieldtype": "Password",
reqd:1},
{fieldtype:"Attach Image", fieldname:"attach_user",
label:"Attach Your User..."},
],
help: frappe._('The first user will become the System Manager (you can change that later).'),
help: __('The first user will become the System Manager (you can change that later).'),
onload: function(slide) {
if(user!=="Administrator") {
slide.form.fields_dict.password.$wrapper.toggle(false);
@ -86,21 +86,21 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
// Organization
{
title: frappe._("The Organization"),
title: __("The Organization"),
icon: "icon-building",
fields: [
{fieldname:'company_name', label: frappe._('Company Name'), fieldtype:'Data', reqd:1,
{fieldname:'company_name', label: __('Company Name'), fieldtype:'Data', reqd:1,
placeholder: 'e.g. "My Company LLC"'},
{fieldname:'company_abbr', label: frappe._('Company Abbreviation'), fieldtype:'Data',
{fieldname:'company_abbr', label: __('Company Abbreviation'), fieldtype:'Data',
placeholder:'e.g. "MC"',reqd:1},
{fieldname:'fy_start_date', label:'Financial Year Start Date', fieldtype:'Date',
description:'Your financial year begins on', reqd:1},
{fieldname:'fy_end_date', label:'Financial Year End Date', fieldtype:'Date',
description:'Your financial year ends on', reqd:1},
{fieldname:'company_tagline', label: frappe._('What does it do?'), fieldtype:'Data',
{fieldname:'company_tagline', label: __('What does it do?'), fieldtype:'Data',
placeholder:'e.g. "Build tools for builders"', reqd:1},
],
help: frappe._('The name of your company for which you are setting up this system.'),
help: __('The name of your company for which you are setting up this system.'),
onload: function(slide) {
slide.get_input("company_name").on("change", function() {
var parts = slide.get_input("company_name").val().split(" ");
@ -120,19 +120,19 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
// Country
{
title: frappe._("Country, Timezone and Currency"),
title: __("Country, Timezone and Currency"),
icon: "icon-flag",
fields: [
{fieldname:'country', label: frappe._('Country'), reqd:1,
{fieldname:'country', label: __('Country'), reqd:1,
options: "", fieldtype: 'Select'},
{fieldname:'currency', label: frappe._('Default Currency'), reqd:1,
{fieldname:'currency', label: __('Default Currency'), reqd:1,
options: "", fieldtype: 'Select'},
{fieldname:'timezone', label: frappe._('Time Zone'), reqd:1,
{fieldname:'timezone', label: __('Time Zone'), reqd:1,
options: "", fieldtype: 'Select'},
{fieldname:'chart_of_accounts', label: frappe._('Chart of Accounts'),
{fieldname:'chart_of_accounts', label: __('Chart of Accounts'),
options: "", fieldtype: 'Select'}
],
help: frappe._('Select your home country and check the timezone and currency.'),
help: __('Select your home country and check the timezone and currency.'),
onload: function(slide, form) {
frappe.call({
method:"frappe.country_info.get_country_timezone_info",
@ -179,8 +179,8 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
// Logo
{
icon: "icon-bookmark",
title: frappe._("Logo and Letter Heads"),
help: frappe._('Upload your letter head and logo - you can edit them later.'),
title: __("Logo and Letter Heads"),
help: __('Upload your letter head and logo - you can edit them later.'),
fields: [
{fieldtype:"Attach Image", fieldname:"attach_letterhead", label:"Attach Letterhead..."},
{fieldtype:"Attach Image", fieldname:"attach_logo", label:"Attach Logo..."},
@ -190,40 +190,40 @@ frappe.pages['setup-wizard'].onload = function(wrapper) {
// Taxes
{
icon: "icon-money",
"title": frappe._("Add Taxes"),
"help": frappe._("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."),
"title": __("Add Taxes"),
"help": __("List your tax heads (e.g. VAT, Excise) (upto 3) and their standard rates. This will create a standard template, you can edit and add more later."),
"fields": [],
},
// Customers
{
icon: "icon-group",
"title": frappe._("Your Customers"),
"help": frappe._("List a few of your customers. They could be organizations or individuals."),
"title": __("Your Customers"),
"help": __("List a few of your customers. They could be organizations or individuals."),
"fields": [],
},
// Items to Sell
{
icon: "icon-barcode",
"title": frappe._("Your Products or Services"),
"help": frappe._("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."),
"title": __("Your Products or Services"),
"help": __("List your products or services that you sell to your customers. Make sure to check the Item Group, Unit of Measure and other properties when you start."),
"fields": [],
},
// Suppliers
{
icon: "icon-group",
"title": frappe._("Your Suppliers"),
"help": frappe._("List a few of your suppliers. They could be organizations or individuals."),
"title": __("Your Suppliers"),
"help": __("List a few of your suppliers. They could be organizations or individuals."),
"fields": [],
},
// Items to Buy
{
icon: "icon-barcode",
"title": frappe._("Products or Services You Buy"),
"help": frappe._("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."),
"title": __("Products or Services You Buy"),
"help": __("List a few products or services you buy from your suppliers or vendors. If these are same as your products, then do not add them."),
"fields": [],
},
@ -324,7 +324,7 @@ frappe.wiz.Wizard = Class.extend({
return;
var me = this;
this.$welcome = this.get_message(this.welcome_html +
'<br><p class="text-center"><button class="btn btn-primary">'+frappe._("Start")+'</button></p>')
'<br><p class="text-center"><button class="btn btn-primary">'+__("Start")+'</button></p>')
.appendTo(this.parent);
this.$welcome.find(".btn").click(function() {

View File

@ -25,20 +25,20 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
});
if(!from_sales_invoice)
cur_frm.add_custom_button(frappe._('Make Invoice'), this.make_sales_invoice);
cur_frm.add_custom_button(__('Make Invoice'), this.make_sales_invoice);
}
if(flt(doc.per_installed, 2) < 100 && doc.docstatus==1)
cur_frm.add_custom_button(frappe._('Make Installation Note'), this.make_installation_note);
cur_frm.add_custom_button(__('Make Installation Note'), this.make_installation_note);
if (doc.docstatus==1) {
cur_frm.appframe.add_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
cur_frm.appframe.add_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
this.show_stock_ledger();
this.show_general_ledger();
}
if(doc.docstatus==0 && !doc.__islocal) {
cur_frm.add_custom_button(frappe._('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
cur_frm.add_custom_button(__('Make Packing Slip'), cur_frm.cscript['Make Packing Slip']);
}
set_print_hide(doc, dt, dn);
@ -48,7 +48,7 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(["expense_account", "cost_center"], aii_enabled);
if (this.frm.doc.docstatus===0) {
cur_frm.add_custom_button(frappe._('From Sales Order'),
cur_frm.add_custom_button(__('From Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_delivery_note",

View File

@ -130,7 +130,7 @@ cur_frm.fields_dict['item_group'].get_query = function(doc,cdt,cdn) {
cur_frm.cscript.add_image = function(doc, dt, dn) {
if(!doc.image) {
msgprint(frappe._('Please select an "Image" first'));
msgprint(__('Please select an "Image" first'));
return;
}
@ -145,7 +145,7 @@ cur_frm.cscript.add_image = function(doc, dt, dn) {
// Quotation to validation - either customer or lead mandatory
cur_frm.cscript.weight_to_validate = function(doc, cdt, cdn){
if((doc.nett_weight || doc.gross_weight) && !doc.weight_uom) {
msgprint(frappe._('Weight is mentioned,\nPlease mention "Weight UOM" too'));
msgprint(__('Weight is mentioned,\nPlease mention "Weight UOM" too'));
validated = 0;
}
}
@ -181,7 +181,7 @@ cur_frm.cscript.image = function() {
if(!cur_frm.doc.description_html)
cur_frm.cscript.add_image(cur_frm.doc);
else {
msgprint(frappe._("You may need to update: ") +
msgprint(__("You may need to update: ") +
frappe.meta.get_docfield(cur_frm.doc.doctype, "description_html").label);
}
}

View File

@ -10,7 +10,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
var me = this;
this.frm.fields_dict.lc_pr_details.grid.get_field('purchase_receipt').get_query =
function() {
if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
filters:[
['Purchase Receipt', 'docstatus', '=', '1'],
@ -20,7 +20,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
};
this.frm.fields_dict.landed_cost_details.grid.get_field('account_head').get_query = function() {
if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
filters:[
['Account', 'group_or_ledger', '=', 'Ledger'],
@ -32,7 +32,7 @@ erpnext.stock.LandedCostWizard = erpnext.stock.StockController.extend({
this.frm.fields_dict.landed_cost_details.grid.get_field('cost_center').get_query =
function() {
if(!me.frm.doc.company) msgprint(frappe._("Please enter company first"));
if(!me.frm.doc.company) msgprint(__("Please enter company first"));
return {
filters:[
['Cost Center', 'group_or_ledger', '=', 'Ledger'],

View File

@ -25,38 +25,38 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
cur_frm.dashboard.reset();
if(doc.docstatus===1) {
if(doc.status==="Stopped") {
cur_frm.dashboard.set_headline_alert(frappe._("Stopped"), "alert-danger", "icon-stop")
cur_frm.dashboard.set_headline_alert(__("Stopped"), "alert-danger", "icon-stop")
}
cur_frm.dashboard.add_progress(cint(doc.per_ordered) + "% "
+ frappe._("Fulfilled"), cint(doc.per_ordered));
+ __("Fulfilled"), cint(doc.per_ordered));
}
if(doc.docstatus==0) {
cur_frm.add_custom_button(frappe._("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap");
cur_frm.add_custom_button(__("Get Items from BOM"), cur_frm.cscript.get_items_from_bom, "icon-sitemap");
}
if(doc.docstatus == 1 && doc.status != 'Stopped') {
if(doc.material_request_type === "Purchase")
cur_frm.add_custom_button(frappe._("Make Supplier Quotation"),
cur_frm.add_custom_button(__("Make Supplier Quotation"),
this.make_supplier_quotation);
if(doc.material_request_type === "Transfer" && doc.status === "Submitted")
cur_frm.add_custom_button(frappe._("Transfer Material"), this.make_stock_entry);
cur_frm.add_custom_button(__("Transfer Material"), this.make_stock_entry);
if(flt(doc.per_ordered, 2) < 100) {
if(doc.material_request_type === "Purchase")
cur_frm.add_custom_button(frappe._('Make Purchase Order'),
cur_frm.add_custom_button(__('Make Purchase Order'),
this.make_purchase_order);
cur_frm.add_custom_button(frappe._('Stop Material Request'),
cur_frm.add_custom_button(__('Stop Material Request'),
cur_frm.cscript['Stop Material Request'], "icon-exclamation");
}
cur_frm.add_custom_button(frappe._('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
cur_frm.add_custom_button(__('Send SMS'), cur_frm.cscript.send_sms, "icon-mobile-phone");
}
if (this.frm.doc.docstatus===0) {
cur_frm.add_custom_button(frappe._('From Sales Order'),
cur_frm.add_custom_button(__('From Sales Order'),
function() {
frappe.model.map_current_doc({
method: "erpnext.selling.doctype.sales_order.sales_order.make_material_request",
@ -72,7 +72,7 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
}
if(doc.docstatus == 1 && doc.status == 'Stopped')
cur_frm.add_custom_button(frappe._('Unstop Material Request'),
cur_frm.add_custom_button(__('Unstop Material Request'),
cur_frm.cscript['Unstop Material Request'], "icon-check");
},
@ -91,13 +91,13 @@ erpnext.buying.MaterialRequestController = erpnext.buying.BuyingController.exten
get_items_from_bom: function() {
var d = new frappe.ui.Dialog({
title: frappe._("Get Items from BOM"),
title: __("Get Items from BOM"),
fields: [
{"fieldname":"bom", "fieldtype":"Link", "label":frappe._("BOM"),
{"fieldname":"bom", "fieldtype":"Link", "label":__("BOM"),
options:"BOM"},
{"fieldname":"fetch_exploded", "fieldtype":"Check",
"label":frappe._("Fetch exploded BOM (including sub-assemblies)"), "default":1},
{fieldname:"fetch", "label":frappe._("Get Items from BOM"), "fieldtype":"Button"}
"label":__("Fetch exploded BOM (including sub-assemblies)"), "default":1},
{fieldname:"fetch", "label":__("Get Items from BOM"), "fieldtype":"Button"}
]
});
d.get_input("fetch").on("click", function() {
@ -164,12 +164,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(frappe._("Warning: Material Requested Qty is less than Minimum Order Qty"));
alert(__("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(frappe._("Do you really want to STOP this Material Request?"));
var check = confirm(__("Do you really want to STOP this Material Request?"));
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs': doc}, function(r,rt) {
@ -180,7 +180,7 @@ cur_frm.cscript['Stop Material Request'] = function() {
cur_frm.cscript['Unstop Material Request'] = function(){
var doc = cur_frm.doc;
var check = confirm(frappe._("Do you really want to UNSTOP this Material Request?"));
var check = confirm(__("Do you really want to UNSTOP this Material Request?"));
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted','docs': doc}, 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(frappe._("Case No. cannot be 0"))
msgprint(__("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(frappe._("'To Case No.' cannot be less than 'From Case No.'"));
msgprint(__("'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(frappe._("You have entered duplicate items. Please rectify and try again."));
msgprint(__("You have entered duplicate items. Please rectify and try again."));
validated = false;
return;
}
}
if(flt(ps_detail[i].qty)<=0) {
msgprint(frappe._("Invalid quantity specified for item ") + ps_detail[i].item_code +
"."+frappe._(" Quantity should be greater than 0."));
msgprint(__("Invalid quantity specified for item ") + ps_detail[i].item_code +
"."+__(" 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(frappe._("Different UOM for items will lead to incorrect")+
frappe._("(Total) Net Weight value. Make sure that Net Weight of each item is")+
frappe._("in the same 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."))
validated = false;
}
net_weight_pkg += flt(item.net_weight) * flt(item.qty);

View File

@ -17,7 +17,7 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
if(this.frm.doc.docstatus == 1) {
if(!this.frm.doc.__billing_complete) {
cur_frm.add_custom_button(frappe._('Make Purchase Invoice'),
cur_frm.add_custom_button(__('Make Purchase Invoice'),
this.make_purchase_invoice);
}
cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
@ -25,7 +25,7 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
this.show_stock_ledger();
this.show_general_ledger();
} else {
cur_frm.add_custom_button(frappe._(frappe._('From Purchase Order')),
cur_frm.add_custom_button(__(__('From Purchase Order')),
function() {
frappe.model.map_current_doc({
method: "erpnext.buying.doctype.purchase_order.purchase_order.make_purchase_receipt",
@ -63,8 +63,8 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
}
if(item.qty > item.received_qty) {
msgprint(frappe._("Error") + ": " + frappe._(frappe.meta.get_label(item.doctype, "qty", item.name))
+ " > " + frappe._(frappe.meta.get_label(item.doctype, "received_qty", item.name)));
msgprint(__("Error") + ": " + __(frappe.meta.get_label(item.doctype, "qty", item.name))
+ " > " + __(frappe.meta.get_label(item.doctype, "received_qty", item.name)));
item.qty = item.rejected_qty = 0.0;
} else {
item.rejected_qty = flt(item.received_qty - item.qty, precision("rejected_qty", item));
@ -78,9 +78,9 @@ erpnext.stock.PurchaseReceiptController = erpnext.buying.BuyingController.extend
frappe.model.round_floats_in(item, ["received_qty", "rejected_qty"]);
if(item.rejected_qty > item.received_qty) {
msgprint(frappe._("Error") + ": " +
frappe._(frappe.meta.get_label(item.doctype, "rejected_qty", item.name))
+ " > " + frappe._(frappe.meta.get_label(item.doctype, "received_qty", item.name)));
msgprint(__("Error") + ": " +
__(frappe.meta.get_label(item.doctype, "rejected_qty", item.name))
+ " > " + __(frappe.meta.get_label(item.doctype, "received_qty", item.name)));
item.qty = item.rejected_qty = 0.0;
} else {
item.qty = flt(item.received_qty - item.rejected_qty, precision("qty", item));
@ -141,7 +141,7 @@ cur_frm.fields_dict['purchase_receipt_details'].grid.get_field('batch_no').get_q
}
}
else
msgprint(frappe._("Please enter Item Code."));
msgprint(__("Please enter Item Code."));
}
cur_frm.cscript.select_print_heading = function(doc, cdt, cdn) {

View File

@ -70,10 +70,10 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
if(this.frm.doc.docstatus === 1 &&
frappe.boot.user.can_create.indexOf("Journal Voucher")!==-1) {
if(this.frm.doc.purpose === "Sales Return") {
this.frm.add_custom_button(frappe._("Make Credit Note"), function() { me.make_return_jv(); });
this.frm.add_custom_button(__("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(frappe._("Make Debit Note"), function() { me.make_return_jv(); });
this.frm.add_custom_button(__("Make Debit Note"), function() { me.make_return_jv(); });
this.add_excise_button();
}
}
@ -166,11 +166,11 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
if(this.frm.doc.purpose === "Sales Return") {
if(this.frm.doc.delivery_note_no && this.frm.doc.sales_invoice_no) {
// both specified
msgprint(frappe._("You can not enter both Delivery Note No and Sales Invoice No. Please enter any one."));
msgprint(__("You can not enter both Delivery Note No and Sales Invoice No. Please enter any one."));
} else if(!(this.frm.doc.delivery_note_no || this.frm.doc.sales_invoice_no)) {
// none specified
msgprint(frappe._("Please enter Delivery Note No or Sales Invoice No to proceed"));
msgprint(__("Please enter Delivery Note No or Sales Invoice No to proceed"));
} else if(this.frm.doc.delivery_note_no) {
return {doctype: "Delivery Note", docname: this.frm.doc.delivery_note_no};
@ -185,7 +185,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
} else {
// not specified
msgprint(frappe._("Please enter Purchase Receipt No to proceed"));
msgprint(__("Please enter Purchase Receipt No to proceed"));
}
}
@ -193,7 +193,7 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
add_excise_button: function() {
if(frappe.boot.sysdefaults.country === "India")
this.frm.add_custom_button(frappe._("Make Excise Invoice"), function() {
this.frm.add_custom_button(__("Make Excise Invoice"), function() {
var excise = frappe.model.make_new_doc_and_get_name('Journal Voucher');
excise = locals['Journal Voucher'][excise];
excise.voucher_type = 'Excise Voucher';
@ -333,7 +333,7 @@ cur_frm.fields_dict['mtn_details'].grid.get_field('batch_no').get_query = functi
}
}
} else {
msgprint(frappe._("Please enter Item Code to get batch no"));
msgprint(__("Please enter Item Code to get batch no"));
}
}
@ -390,7 +390,7 @@ cur_frm.cscript.validate = function(doc, cdt, cdn) {
cur_frm.cscript.validate_items = function(doc) {
cl = doc.mtn_details || [];
if (!cl.length) {
msgprint(frappe._("Item table can not be blank"));
msgprint(__("Item table can not be blank"));
validated = false;
}
}

Some files were not shown because too many files have changed in this diff Show More