From 4004cecae2135dfcc4ce25502e76db3591f971fa Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 16 Dec 2015 01:25:44 +0100 Subject: [PATCH] Bug 15395: Example usage of I18N Template::Toolkit plugin --- C4/Search.pm | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index b895993..948fb92 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2242,7 +2242,6 @@ sub searchResults { } } $oldbiblio->{norequests} = 1 unless $can_place_holds; - $oldbiblio->{itemsplural} = 1 if $items_count > 1; $oldbiblio->{items_count} = $items_count; $oldbiblio->{available_items_loop} = \@available_items_loop; $oldbiblio->{onloan_items_loop} = \@onloan_items_loop; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index e011d1b..d0a30c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -1,4 +1,5 @@ [% USE Koha %] +[% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] Koha › Catalog › [% IF ( searchdesc ) %]Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -577,7 +578,7 @@ var holdForPatron = function () {
[% IF ( SEARCH_RESULT.items_count ) %][% SEARCH_RESULT.items_count %] - [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %] + [% tn('item', 'items', SEARCH_RESULT.items_count) %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %] [% IF ( SEARCH_RESULT.availablecount ) %]