Browse Source

Bug 32588: Make filters on 'items with no checkouts' report translatable

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 <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23.05.x
Katrin Fischer 9 months ago
committed by Tomas Cohen Arazi
parent
commit
74f2b83255
Signed by: tomascohen GPG Key ID: 0A272EA1B2F3C15F
  1. 45
      koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt
  2. 4
      reports/catalogue_out.pl

45
koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt

@ -40,24 +40,35 @@
[% FOREACH mainloo IN mainloop %]
[% IF ( mainloo.loopfilter ) %]
<p>Filtered on:</p>
[% FOREACH loopfilte IN mainloo.loopfilter %]
[% IF ( loopfilte.err ) %]
<p class="error">Error:
[% ELSE %]
<p>
[% END %]
[% IF ( loopfilte.sql ) %]
<span class="sql">
[% loopfilte.crit | html %] = [% loopfilte.filter | html %]
</span>
[% ELSE %]
<span>[% loopfilte.crit | html %] = [% loopfilte.filter | html %]</span>
[% IF ( loopfilte.crit == "by" ) %]
[% group_by = loopfilte.filter %]
<ul>
[% FOREACH loopfilte IN mainloo.loopfilter %]
[% IF ( loopfilte.err ) %]
<p class="error">Error: [% loopfilte.filter | html %]</p>
[% ELSIF ( loopfilte.sql ) %]
<span class="sql">
[% loopfilte.crit | html %] = [% loopfilte.filter | html %]
</span>
[% ELSE %]
[% SWITCH loopfilte.crit %]
[% CASE 'homelibrary' %]<li>Home library: [% Branches.GetName( loopfilte.filter ) | html %]</li>
[% CASE 'itemtype' %]<li>Item type: [% ItemTypes.GetDescription( loopfilte.filter ) | html %]</li>
[% CASE 'limit' %]<li>Limit: [% loopfilte.filter | html %]</li>
[% CASE 'by' %]
<li>By:
[% group_by = loopfilte.filter %]
[% IF ( group_by == "homebranch") %]
Home library
[% ELSIF ( group_by == "itype" ) %]
Item type
[% ELSE %]
None
[% END %]
</li>
[% CASE %]<li>[% loopfilte.crit %]: [% loopfilte.filter | html %]</li>
[% END %]
[% END %]
[% END %]
</p>
[% END %]
</ul>
[% END %]
[% IF ( mainloo.looptables ) %]
@ -78,7 +89,7 @@
[% ELSIF ( group_by=="homebranch" ) %]
<a href="#table[% looptable.coltitle | uri %]">[% Branches.GetName( looptable.coltitle ) | html %]</a>
[% ELSE %]
<a href="#table[% looptable.coltitle | uri %]">[% looptable.coltitle | html %]</a>
<a href="#table[% looptable.coltitle | uri %]">Ungrouped</a>
[% END %]
</td>
<td>

4
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;
}
}

Loading…
Cancel
Save