Fix translate general_ledger.js

This commit is contained in:
Bárbara Perretti 2013-09-30 17:26:51 -03:00
parent 5d19387756
commit 26b13a8a45

View File

@ -4,7 +4,7 @@
wn.pages['general-ledger'].onload = function(wrapper) { wn.pages['general-ledger'].onload = function(wrapper) {
wn.ui.make_app_page({ wn.ui.make_app_page({
parent: wrapper, parent: wrapper,
title: 'General Ledger', title: wn._('General Ledger'),
single_column: true single_column: true
}); });
@ -16,7 +16,7 @@ wn.pages['general-ledger'].onload = function(wrapper) {
erpnext.GeneralLedger = wn.views.GridReport.extend({ erpnext.GeneralLedger = wn.views.GridReport.extend({
init: function(wrapper) { init: function(wrapper) {
this._super({ this._super({
title: "General Ledger", title: wn._("General Ledger"),
page: wrapper, page: wrapper,
parent: $(wrapper).find('.layout-main'), parent: $(wrapper).find('.layout-main'),
appframe: wrapper.appframe, appframe: wrapper.appframe,
@ -54,11 +54,11 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
}, },
filters: [ 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) { filter: function(val, item, opts) {
return item.company == val || val == opts.default_value; return item.company == val || val == opts.default_value;
}}, }},
{fieldtype:"Link", label: "Account", link:"Account", {fieldtype:"Link", label: wn._("Account"), link:"Account",
filter: function(val, item, opts, me) { filter: function(val, item, opts, me) {
if(!val) { if(!val) {
return true; return true;
@ -68,22 +68,22 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
return me.is_child_account(val, item.account); return me.is_child_account(val, item.account);
} }
}}, }},
{fieldtype:"Data", label: "Voucher No", {fieldtype:"Data", label: wn._("Voucher No"),
filter: function(val, item, opts) { filter: function(val, item, opts) {
if(!val) return true; if(!val) return true;
return (item.voucher_no && item.voucher_no.indexOf(val)!=-1); return (item.voucher_no && item.voucher_no.indexOf(val)!=-1);
}}, }},
{fieldtype:"Date", label: "From Date", filter: function(val, item) { {fieldtype:"Date", label: wn._("From Date"), filter: function(val, item) {
return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date); return dateutil.str_to_obj(val) <= dateutil.str_to_obj(item.posting_date);
}}, }},
{fieldtype:"Label", label: "To"}, {fieldtype:"Label", label: wn._("To")},
{fieldtype:"Date", label: "To Date", filter: function(val, item) { {fieldtype:"Date", label: wn._("To Date"), filter: function(val, item) {
return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date); return dateutil.str_to_obj(val) >= dateutil.str_to_obj(item.posting_date);
}}, }},
{fieldtype: "Check", label: "Group by Ledger"}, {fieldtype: "Check", label: wn._("Group by Ledger")},
{fieldtype: "Check", label: "Group by Voucher"}, {fieldtype: "Check", label: wn._("Group by Voucher")},
{fieldtype:"Button", label: "Refresh", icon:"icon-refresh icon-white", cssClass:"btn-info"}, {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() { setup_filters: function() {
this._super(); this._super();
@ -160,7 +160,7 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
var to_date = dateutil.str_to_obj(this.to_date); var to_date = dateutil.str_to_obj(this.to_date);
if(to_date < from_date) { if(to_date < from_date) {
msgprint("From Date must be before To Date"); msgprint(wn._("From Date must be before To Date"));
return; return;
} }