X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;ds=inline;f=templates%2Fhtml%2Fsearch.tmpl;h=3cd004c94910f66c9fe5f8ee7bba6dff107b4862;hb=ba6fa55e176be2e079c8a46a8c6fdd5e06184e21;hp=0bc23e6e4dd71144d7a5bf4cbd47c0b1b4990c07;hpb=22b1fee44984273bcfdb3d212514228ca7c04415;p=deb%2Fpackages.git diff --git a/templates/html/search.tmpl b/templates/html/search.tmpl index 0bc23e6..3cd004c 100644 --- a/templates/html/search.tmpl +++ b/templates/html/search.tmpl @@ -1,18 +1,5 @@ [%- PROCESS 'config/archive_layout.tmpl' -%] -[%- PROCESS 'html/head.tmpl' - title_tag = 'Debian Package Search Results' - print_search_field = 'packages' - search_field_values = { - keywords => search_keywords.join(' '), - searchon => opts.searchon_form, - suite => params.values.suite.no_replace.join(','), - architectures => params.values.arch.no_replace.join(','), - sections => params.values.section.no_replace.join(','), - } - navigation = [ { name => 'Package Search Results' } ] --%] - -[% keyword_str = search_keywords.join(' '); +[%- keyword_str = search_keywords.join(' '); keyword_esc = uri_escape(keyword_str); keyword_enc = html_encode(keyword_str); @@ -27,20 +14,60 @@ architectures_str = params.values.arch.no_replace.join(', '); architectures_esc = uri_escape(architectures_str); architectures_enc = html_encode(architectures_str); -%] +-%] +[%- PROCESS 'html/head.tmpl' + title_tag = g("Package Search Results -- %s", keyword_enc) + print_search_field = 'packages' + search_field_values = { + keywords => search_keywords.join(' '), + searchon => opts.searchon_form, + suite => params.values.suite.no_replace.join(','), + architectures => params.values.arch.no_replace.join(','), + sections => params.values.section.no_replace.join(','), + } + navigation = [ { name => g('Package Search Results') } ] +-%] +[%- PROCESS 'html/util.inc' -%]
You can try a different search on the Packages search page.
- [% IF opts.searchon != "names" && opts.exact %] -You have searched only for words exactly matching your keywords. - You can try to search allowing subword matching +
[% g('You have searched only for words exactly matching your keywords. You can try to search allowing subword matching.', + make_search_url('',"keywords=$keyword_esc",'exact',0) ) %]
+ [% END %] +[% END %] + +[% g('Search in specific suite:') %] +[% FOREACH s IN all_suites %] + [% IF s != suite_str %] + [[% s %]] + [% ELSE %] + [[% s %]] [% END %] [% END %] +[% IF search_suites.size == 1 %] +
[% g('Search in all suites', + make_search_url('',"keywords=$keyword_esc",'suite','all')) %] +[% END %] + +
[% g('Limit search to a specific architecture:') %] +[% FOREACH a IN all_architectures %] + [% IF a != arch_str %] + [[% a %]] + [% ELSE %] + [[% a %]] + [% END %] +[% END %] +[% IF search_architectures.size == 1 %] +
[% g('Search in all architectures', + make_search_url('',"keywords=$keyword_esc",'arch','any')) %] +[% END %] + +
[% non_results %] -results have not been displayed due to the search parameters.
+[% g('Some results have not been displayed due to the search parameters.', + "$search_url?keywords=$keyword_esc") %]
[% END %] @@ -48,50 +75,60 @@ results have not been displayed due to the search parameters.[% msg %] [% IF results %] -Found [% results %] matching packages.
+[% g('Found %u matching packages.', results) %] [% END %] [% IF too_many_hits %] [% IF opts.searchon != "names" %] -Note that this only shows the best matches, sorted by relevance. -If the first few packages don't match what you searched for, try using more keywords or alternative -keywords.
+[% g("Note that this only shows the best matches, sorted by relevance. If the first few packages don't match what you searched for, try using more keywords or alternative keywords.") %]
[% ELSE %] -Your search was too wide so we will only display exact matches. -At least [% too_many_hits %] results have been omitted and will not be displayed. -Please consider using a longer keyword or more keywords.
+
+[%- IF results %]
+[% g("Your keyword was too generic, for optimizing reasons some results might have been suppressed.
Please consider using a longer keyword or more keywords.") %]
+[%- ELSE -%]
+[% g("Your keyword was too generic.
Please consider using a longer keyword or more keywords.") %]
+[% END -%]
+
Sorry, your search gave no results
+[% UNLESS results || too_many_hits %] +[% g('Sorry, your search gave no results') %]
[% END %] [% FOREACH categories %] [% "[% skipped %] results have not been displayed because you requested only exact matches. +
[% g('%u results have not been displayed because you requested only exact matches.', + make_search_url('',"keywords=$keyword_esc",'exact', 0), skipped) %] [% END %]