From 1333e6ce19123b71488938700d79b1706d400496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sun, 7 Sep 2014 21:08:01 +0200 Subject: [PATCH] Bug 11668: Fix untranslatable "Total" in more files This patch fixes untranslatable "Total" in following files: reports/acquisitions_stats.pl reports/bor_issues_top.pl reports/borrowers_out.pl reports/cat_issues_top.pl reports/catalogue_stats.pl reports/issues_avg_stats.pl reports/issues_stats.pl reports/reserves_stats.pl To test follow test plan from first patch as appropiate. (Missing use Koha::I18N; added) Signed-off-by: Chris Cormack --- reports/acquisitions_stats.pl | 5 +++-- reports/bor_issues_top.pl | 5 +++-- reports/borrowers_out.pl | 5 +++-- reports/cat_issues_top.pl | 5 +++-- reports/catalogue_stats.pl | 5 +++-- reports/issues_avg_stats.pl | 5 +++-- reports/issues_stats.pl | 5 +++-- reports/reserves_stats.pl | 5 +++-- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl index b19bf8e..e7bc976 100755 --- a/reports/acquisitions_stats.pl +++ b/reports/acquisitions_stats.pl @@ -29,6 +29,7 @@ use C4::Circulation; use C4::Dates qw/format_date format_date_in_iso/; use C4::Branch; use C4::Biblio; +use Koha::I18N; =head1 NAME @@ -94,7 +95,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; @@ -104,7 +105,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}; diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index f8ee8e8..ad0c9bf 100755 --- a/reports/bor_issues_top.pl +++ b/reports/bor_issues_top.pl @@ -30,6 +30,7 @@ use C4::Members; use C4::Reports; use C4::Debug; use C4::Dates qw(format_date format_date_in_iso); +use Koha::I18N; =head1 NAME @@ -86,7 +87,7 @@ if ($do_it) { print @$results[0]->{line} ."/". @$results[0]->{column} .$sep; # Other header print join($sep, map {$_->{coltitle}} @$cols); - print $sep . "Total\n"; + print $sep . gettext("Total") . "\n"; # Table foreach my $line ( @$lines ) { my $x = $line->{loopcell}; @@ -96,7 +97,7 @@ if ($do_it) { print "\n"; } # footer - print "TOTAL"; + print gettext("TOTAL"); $cols = @$results[0]->{loopfooter}; print join($sep, map {$_->{totalcol}} @$cols); print $sep.@$results[0]->{total}; diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl index 9687234..5f87533 100755 --- a/reports/borrowers_out.pl +++ b/reports/borrowers_out.pl @@ -29,6 +29,7 @@ use C4::Circulation; use C4::Reports; use C4::Members; use C4::Dates qw/format_date_in_iso/; +use Koha::I18N; =head1 NAME @@ -83,7 +84,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "Total\n"; + print gettext("Total") . "\n"; # Table foreach my $line ( @$lines ) { my $x = $line->{loopcell}; @@ -96,7 +97,7 @@ if ($do_it) { print "\n"; } # footer - print "TOTAL"; + print gettext("TOTAL"); $cols = @$results[0]->{loopfooter}; foreach my $col ( @$cols ) { print $sep.$col->{totalcol}; diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index 893fd21..80680e6 100755 --- a/reports/cat_issues_top.pl +++ b/reports/cat_issues_top.pl @@ -30,6 +30,7 @@ use C4::Circulation; use C4::Reports; use C4::Dates qw/format_date format_date_in_iso/; use C4::Members; +use Koha::I18N; =head1 NAME @@ -89,7 +90,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "Total\n"; + print gettext("Total") . "\n"; # Table foreach my $line ( @$lines ) { my $x = $line->{loopcell}; @@ -101,7 +102,7 @@ if ($do_it) { print "\n"; } # footer - print "TOTAL"; + print gettext("TOTAL"); $cols = @$results[0]->{loopfooter}; foreach my $col ( @$cols ) { print $sep.$col->{totalcol}; diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index a19334a..31ea745 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -28,6 +28,7 @@ use C4::Output; use C4::Koha; use C4::Reports; use C4::Circulation; +use Koha::I18N; =head1 NAME @@ -86,7 +87,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; @@ -96,7 +97,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}; diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index 3781d37..f2d7838 100755 --- a/reports/issues_avg_stats.pl +++ b/reports/issues_avg_stats.pl @@ -30,6 +30,7 @@ use C4::Circulation; use C4::Reports; use C4::Dates qw/format_date format_date_in_iso/; use Date::Calc qw(Delta_Days); +use Koha::I18N; =head1 NAME @@ -91,7 +92,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "Total\n"; + print gettext("Total") . "\n"; # Table foreach my $line ( @$lines ) { my $x = $line->{loopcell}; @@ -103,7 +104,7 @@ if ($do_it) { print "\n"; } # footer - print "TOTAL"; + print gettext("TOTAL"); $cols = @$results[0]->{loopfooter}; foreach my $col ( @$cols ) { print $sep.$col->{totalcol}; diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index 0ab0143..1fbf11c 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -33,6 +33,7 @@ use C4::Circulation; use C4::Reports; use C4::Dates qw/format_date format_date_in_iso/; use C4::Members; +use Koha::I18N; =head1 NAME @@ -107,7 +108,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "Total\n"; + print gettext("Total") . "\n"; # Table foreach my $line ( @$lines ) { my $x = $line->{loopcell}; @@ -116,7 +117,7 @@ if ($do_it) { print $line->{totalrow}, "\n"; } # footer - print "TOTAL"; + print gettext("TOTAL"); $cols = @$results[0]->{loopfooter}; print map {$sep.$_->{totalcol}} @$cols; print $sep.@$results[0]->{total}; diff --git a/reports/reserves_stats.pl b/reports/reserves_stats.pl index 11fcb8e..bc4c25b 100755 --- a/reports/reserves_stats.pl +++ b/reports/reserves_stats.pl @@ -35,6 +35,7 @@ use C4::Dates qw/format_date format_date_in_iso/; use C4::Category; use List::MoreUtils qw/any/; use YAML; +use Koha::I18N; =head1 NAME @@ -115,7 +116,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "Total\n"; + print gettext("Total") . "\n"; # Table foreach my $line ( @$lines ) { my $x = $line->{loopcell}; @@ -124,7 +125,7 @@ if ($do_it) { print $line->{totalrow}, "\n"; } # footer - print "TOTAL"; + print gettext("TOTAL"); $cols = @$results[0]->{loopfooter}; print map {$sep.$_->{totalcol}} @$cols; print $sep.@$results[0]->{total}; -- 1.9.1