From a6b2f669cd82fec4d14501541fe6fed1d1c743ff Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 5 May 2014 04:52:33 +0000 Subject: [PATCH] Bug 11668: make hardcoded strings in reports/borrowers_stats.pl translatable To test: [1] Generate the PO files for the language of your choice. [2] Supply translations for the "Total" and "TOTAL" strings in the $LANG-messages.op file. [3] Install the translation. [4] Change the staff interface to the chosen language. [5] Run the borrowers statistics report and export the results to CSV. [5] Verfiy that the strings "Total" and "TOTAL" are replaced with the translation made in step 2. Signed-off-by: Galen Charlton --- reports/borrowers_stats.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index 8181285..1c53add 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -36,6 +36,7 @@ use Date::Calc qw( Today Add_Delta_YM ); +use Koha::I18N; =head1 NAME @@ -96,7 +97,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "Total\n"; + print gettext("Total") . "\n"; foreach my $line ( @$lines ) { my $x = $line->{loopcell}; print $line->{rowtitle}.$sep; @@ -106,7 +107,7 @@ if ($do_it) { print $line->{totalrow}; print "\n"; } - print "TOTAL"; + print gettext("TOTAL"); $cols = @$results[0]->{loopfooter}; foreach my $col ( @$cols ) { print $sep.$col->{totalcol}; -- 1.7.10.4