From 727f33d858e50d26dfb60cec516533d0c4107d2a Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 16 Dec 2015 01:25:44 +0100 Subject: [PATCH] Bug 21789: Example usage of I18N Template::Toolkit plugin MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc VĂ©ron Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- 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 6e81497823..fac04b0079 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -2259,7 +2259,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 7c722b64ac..e2645731c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -3,6 +3,7 @@ [% USE Koha %] [% USE Biblio %] [% USE KohaDates %] +[% PROCESS 'i18n.inc' %] [% SET footerjs = 1 %] [% USE AuthorisedValues %] [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] @@ -489,7 +490,7 @@ [% END %] - [% SEARCH_RESULT.items_count | html %] [% IF ( SEARCH_RESULT.itemsplural ) %]items[% ELSE %]item[% END %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount | html %] available:[% ELSE %], None available[% END %] + [% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount | html %] available:[% ELSE %], None available[% END %] [% IF MaxSearchResultsItemsPerRecordStatusCheck && SEARCH_RESULT.items_count > MaxSearchResultsItemsPerRecordStatusCheck %] -- 2.11.4.GIT