From f2d147918fa44d3ee81e83163731de192000576d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 17 Jul 2025 13:12:34 +0000 Subject: [PATCH] Bug 40287: Fix untranslatable strings in more statistics wizards This patch makes some updates to the acquisitions, patrons, and catalog statistics wizards in order to make more information translatable. To test apply the patch and go to Reports. - Under "Statistics wizards," test the acquisitions, patrons, circulation, and catalog statistics reports: - Test setting some or all options in the "Filter column" and running the report. - At the top of the results there should be a list of the filter options you selected and their values. - All the filter labels should be correct, and the filter values should be in their full/description form rather than in code form (e.g. library, item type, collection code, sorting field, etc.) Sponsored-by: Athens County Public Libraries --- .../en/modules/reports/acquisitions_stats.tt | 81 ++++++++++-------- .../en/modules/reports/borrowers_stats.tt | 82 +++++++++++++++++-- .../en/modules/reports/catalogue_stats.tt | 50 ++++++++++- .../prog/en/modules/reports/issues_stats.tt | 9 +- reports/borrowers_stats.pl | 21 +++-- reports/issues_stats.pl | 14 +++- 6 files changed, 200 insertions(+), 57 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt index 8ecc7a3f2e6..51bf25d1c44 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt @@ -1,5 +1,9 @@ [% USE raw %] [% USE Koha %] +[% USE Branches %] +[% USE ItemTypes %] +[% USE KohaDates %] +[% USE AuthorisedValues %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -46,38 +50,51 @@ [% IF ( do_it ) %] [% FOREACH mainloo IN mainloop %] [% IF ( mainloo.loopfilter.size ) %] -

Filtered on:

- [% FOREACH loopfilte IN mainloo.loopfilter %] -

- [% SWITCH loopfilte.crit %] - [% CASE '0' %] - Placed on (from) - [% CASE '1' %] - Placed on (to) - [% CASE '2' %] - Received on (from) - [% CASE '3' %] - Received on (to) - [% CASE '4' %] - Vendor - [% CASE '5' %] - Home library - [% CASE '6' %] - Collection - [% CASE '7' %] - Item type - [% CASE '8' %] - Fund - [% CASE '9' %] - Sort1 - [% CASE '10' %] - Sort2 - [% CASE %] - Unknown filter - [% END %] - : [% loopfilte.filter | html %] -

- [% END %] +

Filtered on:

+ [% END %]
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 4a488a78134..9f1746d1767 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 @@ -2,6 +2,10 @@ [% USE Branches %] [% USE Koha %] [% USE Asset %] +[% USE Categories %] +[% USE KohaDates %] +[% USE AuthorisedValues %] +[% USE ExtendedAttributeTypes %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -56,11 +60,75 @@

Patrons statistics

[% IF ( do_it ) %] [% FOREACH mainloo IN mainloop %] - [% IF ( mainloo.loopfilter.size>0 ) %] -

Filtered on:

- [% FOREACH loopfilte IN mainloo.loopfilter %] -

[% loopfilte.crit | html %] = [% loopfilte.filter | html %]

- [% END %] + [% IF ( mainloo.loopfilter.size > 0 ) %] +

Filtered on:

+ [% END %]
@@ -227,7 +295,7 @@ @@ -244,7 +312,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt index 53362b7c7a3..92f8d7fc818 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt @@ -1,6 +1,8 @@ [% USE raw %] [% USE Koha %] [% USE Branches %] +[% USE ItemTypes %] +[% USE AuthorisedValues %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -46,12 +48,52 @@

Catalog statistics

[% IF ( do_it ) %] [% FOREACH mainloo IN mainloop %] - [% IF ( mainloo.loopfilter ) %] -

Filtered on:

+

Filtered on:

+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt index 53036c74e5b..7a361c84c86 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt @@ -3,7 +3,9 @@ [% USE Branches %] [% USE Categories %] [% USE ItemTypes %] +[% USE KohaDates %] [% USE AuthorisedValues %] +[% USE ExtendedAttributeTypes %] [% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] @@ -55,7 +57,7 @@ [% IF ( do_it ) %] [% FOREACH mainloo IN mainloop %] [% IF ( mainloo.loopfilter ) %] -

Filtered on:

+

Filtered on: