mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
Merge branch 'i18n' of git://github.com/bperretti/erpnext into bperretti-i18n
This commit is contained in:
@@ -36,39 +36,39 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({
|
||||
},
|
||||
setup_columns: function() {
|
||||
this.columns = [
|
||||
{id: "name", name: "Account", field: "name", width: 300, cssClass: "cell-title",
|
||||
{id: "name", name: wn._("Account"), field: "name", width: 300, cssClass: "cell-title",
|
||||
formatter: this.tree_formatter},
|
||||
{id: "opening_debit", name: "Opening (Dr)", field: "opening_debit", width: 100,
|
||||
{id: "opening_debit", name: wn._("Opening (Dr)"), field: "opening_debit", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "opening_credit", name: "Opening (Cr)", field: "opening_credit", width: 100,
|
||||
{id: "opening_credit", name: wn._("Opening (Cr)"), field: "opening_credit", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "debit", name: "Debit", field: "debit", width: 100,
|
||||
{id: "debit", name: wn._("Debit"), field: "debit", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "credit", name: "Credit", field: "credit", width: 100,
|
||||
{id: "credit", name: wn._("Credit"), field: "credit", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "closing_debit", name: "Closing (Dr)", field: "closing_debit", width: 100,
|
||||
{id: "closing_debit", name: wn._("Closing (Dr)"), field: "closing_debit", width: 100,
|
||||
formatter: this.currency_formatter},
|
||||
{id: "closing_credit", name: "Closing (Cr)", field: "closing_credit", width: 100,
|
||||
{id: "closing_credit", name: wn._("Closing (Cr)"), field: "closing_credit", width: 100,
|
||||
formatter: this.currency_formatter}
|
||||
];
|
||||
|
||||
},
|
||||
filters: [
|
||||
{fieldtype: "Select", label: "Company", link:"Company", default_value: "Select Company...",
|
||||
{fieldtype: "Select", label: wn._("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: "Fiscal Year", link:"Fiscal Year",
|
||||
{fieldtype: "Select", label: wn._("Fiscal Year"), link:"Fiscal Year",
|
||||
default_value: "Select Fiscal Year..."},
|
||||
{fieldtype: "Date", label: "From Date"},
|
||||
{fieldtype: "Label", label: "To"},
|
||||
{fieldtype: "Date", label: "To Date"},
|
||||
{fieldtype: "Button", label: "Refresh", icon:"icon-refresh icon-white",
|
||||
{fieldtype: "Date", label: wn._("From Date")},
|
||||
{fieldtype: "Label", label: wn._("To")},
|
||||
{fieldtype: "Date", label: wn._("To Date")},
|
||||
{fieldtype: "Button", label: wn._("Refresh"), icon:"icon-refresh icon-white",
|
||||
cssClass:"btn-info"},
|
||||
{fieldtype: "Button", label: "Reset Filters"},
|
||||
{fieldtype: "Button", label: wn._("Reset Filters")},
|
||||
],
|
||||
setup_filters: function() {
|
||||
this._super();
|
||||
@@ -193,7 +193,7 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({
|
||||
|
||||
set_fiscal_year: function() {
|
||||
if (this.opening_date > this.closing_date) {
|
||||
msgprint("Opening Date should be before Closing Date");
|
||||
msgprint(wn._("Opening Date should be before Closing Date"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ erpnext.AccountTreeGrid = wn.views.TreeGridReport.extend({
|
||||
});
|
||||
|
||||
if (!this.fiscal_year) {
|
||||
msgprint("Opening Date and Closing Date should be within same Fiscal Year");
|
||||
msgprint(wn._("Opening Date and Closing Date should be within same Fiscal Year"));
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -24,14 +24,14 @@ $(document).bind('toolbar_setup', function() {
|
||||
wn.provide('wn.ui.misc');
|
||||
wn.ui.misc.about = function() {
|
||||
if(!wn.ui.misc.about_dialog) {
|
||||
var d = new wn.ui.Dialog({title:'About ERPNext'})
|
||||
var d = new wn.ui.Dialog({title: wn._('About ERPNext')})
|
||||
|
||||
$(d.body).html(repl("<div>\
|
||||
<p>ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\
|
||||
<p>"+wn._("ERPNext is an open-source web based ERP made by Web Notes Technologies Pvt Ltd.\
|
||||
to provide an integrated tool to manage most processes in a small organization.\
|
||||
For more information about Web Notes, or to buy hosting servies, go to \
|
||||
<a href='https://erpnext.com'>https://erpnext.com</a>.</p>\
|
||||
<p>To report an issue, go to <a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p>\
|
||||
For more information about Web Notes, or to buy hosting servies, go to ")+
|
||||
"<a href='https://erpnext.com'>https://erpnext.com</a>.</p>\
|
||||
<p>"+wn._("To report an issue, go to ")+"<a href='https://github.com/webnotes/erpnext/issues'>GitHub Issues</a></p>\
|
||||
<hr>\
|
||||
<p><a href='http://www.gnu.org/copyleft/gpl.html'>License: GNU General Public License Version 3</a></p>\
|
||||
</div>", wn.app));
|
||||
|
||||
@@ -7,7 +7,7 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({
|
||||
show_stock_ledger: function() {
|
||||
var me = this;
|
||||
if(this.frm.doc.docstatus===1) {
|
||||
this.frm.add_custom_button("Stock Ledger", function() {
|
||||
this.frm.add_custom_button(wn._("Stock Ledger"), function() {
|
||||
wn.route_options = {
|
||||
voucher_no: me.frm.doc.name,
|
||||
from_date: me.frm.doc.posting_date,
|
||||
@@ -22,7 +22,7 @@ erpnext.stock.StockController = wn.ui.form.Controller.extend({
|
||||
show_general_ledger: function() {
|
||||
var me = this;
|
||||
if(this.frm.doc.docstatus===1 && cint(wn.defaults.get_default("auto_accounting_for_stock"))) {
|
||||
cur_frm.add_custom_button('Accounting Ledger', function() {
|
||||
cur_frm.add_custom_button(wn._('Accounting Ledger'), function() {
|
||||
wn.route_options = {
|
||||
"voucher_no": me.frm.doc.name,
|
||||
"from_date": me.frm.doc.posting_date,
|
||||
|
||||
@@ -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('Grid "'+fort+'" does not exists');
|
||||
msgprint(wn._('Grid "')+fort+wn._('" does not exists'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,35 +5,35 @@ var get_filters = function(){
|
||||
return [
|
||||
{
|
||||
"fieldname":"period",
|
||||
"label": "Period",
|
||||
"label": wn._("Period"),
|
||||
"fieldtype": "Select",
|
||||
"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
|
||||
"default": "Monthly"
|
||||
},
|
||||
{
|
||||
"fieldname":"based_on",
|
||||
"label": "Based On",
|
||||
"label": wn._("Based On"),
|
||||
"fieldtype": "Select",
|
||||
"options": ["Item", "Item Group", "Supplier", "Supplier Type", "Project"].join("\n"),
|
||||
"default": "Item"
|
||||
},
|
||||
{
|
||||
"fieldname":"group_by",
|
||||
"label": "Group By",
|
||||
"label": wn._("Group By"),
|
||||
"fieldtype": "Select",
|
||||
"options": ["Item", "Supplier"].join("\n"),
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"fieldname":"fiscal_year",
|
||||
"label": "Fiscal Year",
|
||||
"label": wn._("Fiscal Year"),
|
||||
"fieldtype": "Link",
|
||||
"options":'Fiscal Year',
|
||||
"default": sys_defaults.fiscal_year
|
||||
},
|
||||
{
|
||||
"fieldname":"company",
|
||||
"label": "Company",
|
||||
"label": wn._("Company"),
|
||||
"fieldtype": "Link",
|
||||
"options": "Company",
|
||||
"default": wn.defaults.get_default("company")
|
||||
|
||||
@@ -5,35 +5,35 @@ var get_filters = function(){
|
||||
return[
|
||||
{
|
||||
"fieldname":"period",
|
||||
"label": "Period",
|
||||
"label": wn._("Period"),
|
||||
"fieldtype": "Select",
|
||||
"options": ["Monthly", "Quarterly", "Half-Yearly", "Yearly"].join("\n"),
|
||||
"default": "Monthly"
|
||||
},
|
||||
{
|
||||
"fieldname":"based_on",
|
||||
"label": "Based On",
|
||||
"label": wn._("Based On"),
|
||||
"fieldtype": "Select",
|
||||
"options": ["Item", "Item Group", "Customer", "Customer Group", "Territory", "Project"].join("\n"),
|
||||
"default": "Item"
|
||||
},
|
||||
{
|
||||
"fieldname":"group_by",
|
||||
"label": "Group By",
|
||||
"label": wn._("Group By"),
|
||||
"fieldtype": "Select",
|
||||
"options": ["Item", "Customer"].join("\n"),
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"fieldname":"fiscal_year",
|
||||
"label": "Fiscal Year",
|
||||
"label": wn._("Fiscal Year"),
|
||||
"fieldtype": "Link",
|
||||
"options":'Fiscal Year',
|
||||
"default": sys_defaults.fiscal_year
|
||||
},
|
||||
{
|
||||
"fieldname":"company",
|
||||
"label": "Company",
|
||||
"label": wn._("Company"),
|
||||
"fieldtype": "Link",
|
||||
"options": "Company",
|
||||
"default": wn.defaults.get_default("company")
|
||||
|
||||
@@ -6,7 +6,7 @@ var current_module;
|
||||
wn.provide('erpnext.startup');
|
||||
|
||||
erpnext.startup.start = function() {
|
||||
console.log('Starting up...');
|
||||
console.log(wn._('Starting up...'));
|
||||
$('#startup_div').html('Starting up...').toggle(true);
|
||||
|
||||
erpnext.toolbar.setup();
|
||||
@@ -20,16 +20,16 @@ erpnext.startup.show_expiry_banner = function() {
|
||||
var today = dateutil.str_to_obj(wn.boot.server_date);
|
||||
var expires_on = dateutil.str_to_obj(wn.boot.expires_on);
|
||||
var diff = dateutil.get_diff(expires_on, today);
|
||||
var payment_link = "<a href=\"https://erpnext.com/modes-of-payment.html\" target=\"_blank\">\
|
||||
Click here to buy subscription.</a>";
|
||||
var payment_link = "<a href=\"https://erpnext.com/modes-of-payment.html\" target=\"_blank\">"+
|
||||
wn._("Click here to buy subscription.")+"</a>";
|
||||
|
||||
var msg = "";
|
||||
if (0 <= diff && diff <= 10) {
|
||||
var expiry_string = diff==0 ? "today" : repl("in %(diff)s day(s)", { diff: diff });
|
||||
msg = repl('Your ERPNext subscription will <b>expire %(expiry_string)s</b>. %(payment_link)s',
|
||||
msg = repl(wn._('Your ERPNext subscription will')+'<b>expire %(expiry_string)s</b>. %(payment_link)s',
|
||||
{ expiry_string: expiry_string, payment_link: payment_link });
|
||||
} else if (diff < 0) {
|
||||
msg = repl('This ERPNext subscription <b>has expired</b>. %(payment_link)s', {payment_link: payment_link});
|
||||
msg = repl(wn._('This ERPNext subscription')+'<b>'+wn._('has expired')+'</b>. %(payment_link)s'), {payment_link: payment_link});
|
||||
}
|
||||
|
||||
if(msg) wn.ui.toolbar.show_banner(msg);
|
||||
|
||||
@@ -6,7 +6,7 @@ wn.require("app/js/stock_grid_report.js");
|
||||
erpnext.StockAnalytics = erpnext.StockGridReport.extend({
|
||||
init: function(wrapper, opts) {
|
||||
var args = {
|
||||
title: "Stock Analytics",
|
||||
title: wn._("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: "Plot", field: "check", width: 30,
|
||||
{id: "check", name: wn._("Plot"), field: "check", width: 30,
|
||||
formatter: this.check_formatter},
|
||||
{id: "name", name: "Item", field: "name", width: 300,
|
||||
{id: "name", name: wn._("Item"), field: "name", width: 300,
|
||||
formatter: this.tree_formatter},
|
||||
{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,
|
||||
{id: "brand", name: wn._("Brand"), field: "brand", width: 100},
|
||||
{id: "stock_uom", name: wn._("UOM"), field: "stock_uom", width: 100},
|
||||
{id: "opening", name: wn._("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: "Value or Qty", options:["Value", "Quantity"],
|
||||
{fieldtype:"Select", label: wn._("Value or Qty"), options:["Value", "Quantity"],
|
||||
filter: function(val, item, opts, me) {
|
||||
return me.apply_zero_filter(val, item, opts, me);
|
||||
}},
|
||||
{fieldtype:"Select", label: "Brand", link:"Brand",
|
||||
{fieldtype:"Select", label: wn._("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: "Warehouse", link:"Warehouse",
|
||||
{fieldtype:"Select", label: wn._("Warehouse"), link:"Warehouse",
|
||||
default_value: "Select Warehouse..."},
|
||||
{fieldtype:"Date", label: "From Date"},
|
||||
{fieldtype:"Label", label: "To"},
|
||||
{fieldtype:"Date", label: "To Date"},
|
||||
{fieldtype:"Select", label: "Range",
|
||||
{fieldtype:"Date", label: wn._("From Date")},
|
||||
{fieldtype:"Label", label: wn._("To")},
|
||||
{fieldtype:"Date", label: wn._("To Date")},
|
||||
{fieldtype:"Select", label: wn._("Range"),
|
||||
options:["Daily", "Weekly", "Monthly", "Quarterly", "Yearly"]},
|
||||
{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: "Reset Filters"}
|
||||
{fieldtype:"Button", label: wn._("Refresh"), icon:"icon-refresh icon-white", cssClass:"btn-info"},
|
||||
{fieldtype:"Button", label: wn._("Reset Filters")}
|
||||
],
|
||||
setup_filters: function() {
|
||||
var me = this;
|
||||
|
||||
@@ -326,7 +326,7 @@ 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((["On Previous Row Amount", "On Previous Row Total"].indexOf(tax.charge_type) != -1) &&
|
||||
if(([wn._("On Previous Row Amount"), wn._("On Previous Row Total")].indexOf(tax.charge_type) != -1) &&
|
||||
(!tax.row_id || cint(tax.row_id) >= tax.idx)) {
|
||||
var msg = repl(wn._("Row") + " # %(idx)s [%(doctype)s]: " +
|
||||
wn._("Please specify a valid") + " %(row_id_label)s", {
|
||||
|
||||
@@ -41,19 +41,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">Add Serial No</button>')
|
||||
var $btn = $('<button class="btn btn-sm btn-default">'+wn._("Add Serial No")+'</button>')
|
||||
.appendTo($("<div>")
|
||||
.css({"margin-bottom": "10px", "margin-top": "-10px"})
|
||||
.appendTo(grid_row.fields_dict.serial_no.$wrapper));
|
||||
|
||||
$btn.on("click", function() {
|
||||
var d = new wn.ui.Dialog({
|
||||
title: "Add Serial No",
|
||||
title: wn._("Add Serial No"),
|
||||
fields: [
|
||||
{
|
||||
"fieldtype": "Link",
|
||||
"options": "Serial No",
|
||||
"label": "Serial No",
|
||||
"label": wn._("Serial No"),
|
||||
"get_query": {
|
||||
item_code: grid_row.doc.item_code,
|
||||
warehouse: grid_row.doc.warehouse
|
||||
@@ -61,7 +61,7 @@ $.extend(erpnext, {
|
||||
},
|
||||
{
|
||||
"fieldtype": "Button",
|
||||
"label": "Add"
|
||||
"label": wn._("Add")
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user