-
- my $suite_wording = $suites_enc =~ /^(default|all)$/ ? _g("all suites")
- : sprintf(_g("suite(s) <em>%s</em>", $suites_enc) );
- my $section_wording = $sections_enc eq 'all' ? _g("all sections")
- : sprintf(_g("section(s) <em>%s</em>", $sections_enc) );
- my $arch_wording = $archs_enc eq 'any' ? _g("all architectures")
- : sprintf(_g("architecture(s) <em>%s</em>", $archs_enc) );
- if ($searchon eq "names") {
- my $source_wording = $opts->{source} ? _g("source packages") : _g("packages");
- # sorry to all translators for that one... (patches welcome)
- msg( sprintf( _g( "You have searched for %s that names contain <em>%s</em> in %s, %s, and %s." ),
- $source_wording, $keyword_enc,
- $suite_wording, $section_wording, $arch_wording ) );
- } else {
- my $exact_wording = $opts->{exact} ? "" : _g(" (including subword matching)");
- msg( sprintf( _g( "You have searched for <em>%s</em> in packages names and descriptions in %s, %s, and %s%s." ),
- $keyword_enc,
- $suite_wording, $section_wording, $arch_wording,
- $exact_wording ) );
- }
-
- if ($Packages::Search::too_many_hits) {
- error( sprintf( _g( "Your search was too wide so we will only display exact matches. At least <em>%s</em> results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords." ), $Packages::Search::too_many_hits ) );
- }
-
- if (!@Packages::CGI::fatal_errors && !@results) {
- if ($searchon eq "names") {
- unless (@non_results) {
- error( _g( "Can't find that package." ) );
- } else {
-# hint( _g( "Can't find that package." )." ".
-# sprintf( _g( '<a href="%s">%s</a>'.
-# " results have not been displayed due to the".
-# " search parameters." ), "$SEARCH_URL/$keyword_esc" ,
-# $#non_results+1 ) );
- }
-
- } else {
- if (($suites_enc eq 'all')
- && ($archs_enc eq 'any')
- && ($sections_enc eq 'all')) {
- error( _g( "Can't find that string." ) );
- } else {
- error( sprintf( _g( "Can't find that string, at least not in that suite (%s, section %s) and on that architecture (%s)." ),
- $suites_enc, $sections_enc, $archs_enc ) );
- }
-
- if ($opts->{exact}) {
- hint( sprintf( _g( 'You have searched only for words exactly matching your keywords. You can try to search <a href="%s">allowing subword matching</a>.' ),
- encode_entities(make_search_url('',"keywords=$keyword_esc",{exact => 0})) ) );
- }
- }
-# hint( sprintf( _g( 'You can try a different search on the <a href="%s">Packages search page</a>.' ), "$SEARCH_PAGE#search_packages" ) );
-
- }