Bugzilla – Attachment 36794 Details for
Bug 11668
Untranslatable "Total" in borrowers stats and other reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11668: another approach
Bug-11668-another-approach.patch (text/plain), 3.06 KB, created by
Bernardo Gonzalez Kriegel
on 2015-03-11 14:15:52 UTC
(
hide
)
Description:
Bug 11668: another approach
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2015-03-11 14:15:52 UTC
Size:
3.06 KB
patch
obsolete
>From 7c3deea5610a0a4a08af7b3a49718e0c4434ea45 Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Wed, 11 Mar 2015 10:46:49 -0300 >Subject: [PATCH] Bug 11668: another approach > >In this patch I pass the messages to be printed >as hidden parameters that are set using JQuery, >and translated in the usual way. > >To test: >1) Apply the patch >2) Update and install de-DE (works with this lang) >3) Go to Reports > Patron statistics >4) Select Patron category in row, Library as column >(just an example), export as CSV >5) Switch to German and repeat 4 >6) Check translated 'Total/TOTAL' in german CSV > >Just a idea, if you like it, can be extended to >the other cases >--- > .../prog/en/modules/reports/borrowers_stats.tt | 15 +++++++++++++++ > reports/borrowers_stats.pl | 6 ++++-- > 2 files changed, 19 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >index 200ce24..09a72fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >@@ -11,6 +11,19 @@ > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] > >+<script type="text/javascript"> >+//<![CDATA[ >+var NTOTALMSG = _("Total"); >+var UTOTALMSG = _("TOTAL"); >+ >+$(document).ready(function() { >+ $('input[name=ntotal]').val(NTOTALMSG); >+ $('input[name=utotal]').val(UTOTALMSG); >+}); >+ >+//]]> >+</script> >+ > <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> › <a href="/cgi-bin/koha/reports/borrowers_stats.pl">Patrons statistics</a>[% IF ( do_it ) %] › Results[% END %]</div> > > <div id="doc3" class="yui-t2"> >@@ -283,6 +296,8 @@ > <input type="submit" value="Submit" /> > <input type="hidden" name="report_name" value="[% report_name %]" /> > <input type="hidden" name="do_it" value="1" /> >+ <input type="hidden" name="ntotal" value="" /> >+ <input type="hidden" name="utotal" value="" /> > </fieldset> > </form> > [% END %] >diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl >index 0280a86..ab3d6e2 100755 >--- a/reports/borrowers_stats.pl >+++ b/reports/borrowers_stats.pl >@@ -64,6 +64,8 @@ my $basename = $input->param("basename"); > our $sep = $input->param("sep"); > $sep = "\t" if ($sep and $sep eq 'tabulation'); > my $selected_branch; # = $input->param("?"); >+my $ntotal = $input->param("ntotal"); >+my $utotal = $input->param("utotal"); > > our $branches = GetBranches; > >@@ -96,7 +98,7 @@ if ($do_it) { > foreach my $col ( @$cols ) { > print $col->{coltitle}.$sep; > } >- print "Total\n"; >+ print "$ntotal\n"; > foreach my $line ( @$lines ) { > my $x = $line->{loopcell}; > print $line->{rowtitle}.$sep; >@@ -106,7 +108,7 @@ if ($do_it) { > print $line->{totalrow}; > print "\n"; > } >- print "TOTAL"; >+ print "$utotal"; > $cols = @$results[0]->{loopfooter}; > foreach my $col ( @$cols ) { > print $sep.$col->{totalcol}; >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11668
:
27936
|
31425
|
31438
|
31512
|
31513
|
32698
|
32699
|
32711
|
32712
|
32713
| 36794