From 434d2f828d21c1998a5f3d9168bd2e246da3b9b9 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 7 Jan 2023 02:11:48 +0000 Subject: [PATCH] Bug 32588: Make filters on 'items with no checkouts' report translatable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the filters on top of the 'items with no checkouts' report translatable. The descriptions of the filters used the wrong terms and were also pulled from the .pl file, making them untranslatable. To test: * Without patch: Run the 'items with no checkouts' report with various settigs. * Verify, that the display on top doesn't use standard terminology Doc type = item type, Branch = library * Apply patch * Verify display is improved and standard terminology is used If you know how to, you can also confirm strings show up nicely in translations: https://wiki.koha-community.org/wiki/Translating_Koha#Updating_the_po_files_in_your_installation Signed-off-by: Frédéric Demians --- .../prog/en/modules/reports/catalogue_out.tt | 45 ++++++++++++------- reports/catalogue_out.pl | 4 +- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt index 73060fdb0c..cc4262d7d6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt @@ -40,24 +40,35 @@ [% FOREACH mainloo IN mainloop %] [% IF ( mainloo.loopfilter ) %]

Filtered on:

- [% FOREACH loopfilte IN mainloo.loopfilter %] - [% IF ( loopfilte.err ) %] -

Error: - [% ELSE %] -

- [% END %] - [% IF ( loopfilte.sql ) %] - - [% loopfilte.crit | html %] = [% loopfilte.filter | html %] - - [% ELSE %] - [% loopfilte.crit | html %] = [% loopfilte.filter | html %] - [% IF ( loopfilte.crit == "by" ) %] - [% group_by = loopfilte.filter %] +

[% END %] [% IF ( mainloo.looptables ) %] @@ -78,7 +89,7 @@ [% ELSIF ( group_by=="homebranch" ) %] [% Branches.GetName( looptable.coltitle ) | html %] [% ELSE %] - [% looptable.coltitle | html %] + Ungrouped [% END %] diff --git a/reports/catalogue_out.pl b/reports/catalogue_out.pl index 51961790a8..c03dcb2d80 100755 --- a/reports/catalogue_out.pl +++ b/reports/catalogue_out.pl @@ -76,8 +76,8 @@ sub calculate { if ( ( $i == 1 ) and ( @$filters[ $i - 1 ] ) ) { $cell{err} = 1 if ( @$filters[$i] < @$filters[ $i - 1 ] ); } - $cell{crit} = "Branch" if ( $i == 0 ); - $cell{crit} = "Doc Type" if ( $i == 1 ); + $cell{crit} = "homelibrary" if ( $i == 0 ); + $cell{crit} = "itemtype" if ( $i == 1 ); push @loopfilter, \%cell; } } -- 2.34.1