From 5ba2e78ce9080fc2f2af490899485b8466b38e85 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved this patch for example usage to teh end of patch set and resolved minor conflict while applyin Signed-off-by: Marc VĂ©ron --- 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 c11a61e812..9449362a63 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2250,7 +2250,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 8848abb965..f9d74fb119 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -1,6 +1,7 @@ [% USE Koha %] [% USE Biblio %] [% USE KohaDates %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% IF BiblioDefaultViewmarc %] [% SET DetailPage="MARCdetail.pl" %] @@ -478,7 +479,7 @@ [% END %] - [% SEARCH_RESULT.items_count %] [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %] + [% SEARCH_RESULT.items_count %] [% tn('item', 'items', SEARCH_RESULT.item_count) %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount %] available:[% ELSE %], None available[% END %] [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %] -- 2.14.2