X-Git-Url: https://git.deb.at/?a=blobdiff_plain;ds=inline;f=templates%2Fhtml%2Fsearch.tmpl;h=31dd928081e89da21562917739e62dc7fdabc792;hb=eb7a14fed094e6a7629cf5154357ccf16c6163ff;hp=78b4786a2f8fc50bfee765a69ce3dd09f2c87dec;hpb=43b89ddd54b60021713101a0c61e58608e032014;p=deb%2Fpackages.git
diff --git a/templates/html/search.tmpl b/templates/html/search.tmpl
index 78b4786..31dd928 100644
--- a/templates/html/search.tmpl
+++ b/templates/html/search.tmpl
@@ -16,7 +16,7 @@
architectures_enc = html_encode(architectures_str);
-%]
[%- PROCESS 'html/head.tmpl'
- title_tag = "Package Search Results -- $keyword_enc"
+ title_tag = g("Package Search Results -- %s", keyword_enc)
print_search_field = 'packages'
search_field_values = {
keywords => search_keywords.join(' '),
@@ -25,21 +25,22 @@
architectures => params.values.arch.no_replace.join(','),
sections => params.values.section.no_replace.join(','),
}
- navigation = [ { name => 'Package Search Results' } ]
+ navigation = [ { name => g('Package Search Results') } ]
-%]
[% UNLESS results %]
-
You can try a different search on the Packages search page.
+
[% g('You can try a different search on the Packages search page.',
+ searchformurl) %]
[% 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 %]
[% IF opts.searchon == "names" && non_results %]
-
[% non_results %]
-results have not been displayed due to the search parameters.
+
[% g('%u results have not been displayed due to the search parameters.',
+ "$search_url$keyword_esc", non_results) %]
[% END %]
@@ -47,42 +48,42 @@ results have not been displayed due to the search parameters.
-[% suite_wording = suite_enc.match("^(default|all)$") ? "all suites" : "suite(s)
$suite_enc";
- section_wording = (section_enc == 'all') ? "all sections" : "section(s)
$section_enc";
- arch_wording = (architectures_enc == 'any') ? "all architectures" : "architecture(s)
$architectures_enc";
+[%# @translators: I'm really sorry :/ %]
+[% suite_wording = suite_enc.match("^(default|all)$") ? g("all suites") : g("suite(s)
$suite_enc");
+ section_wording = (section_enc == 'all') ? g("all sections") : g("section(s)
$section_enc");
+ arch_wording = (architectures_enc == 'any') ? g("all architectures") : g("architecture(s)
$architectures_enc");
IF opts.searchon == "names";
- source_wording = opts.source ? "source packages" : "packages";
- msg = "You have searched for $source_wording that names contain
$keyword_enc in $suite_wording, $section_wording, and $arch_wording .";
+ source_wording = opts.source ? g("source packages") : g("packages");
+ msg = g("You have searched for %s that names contain
%s in %s, %s, and %s.",
+ source_wording, keyword_enc, suite_wording, section_wording, arch_wording);
ELSE;
- exact_wording = opts.exact ? "" : " (including subword matching)";
- msg = "You have searched for
$keyword_enc in packages names and descriptions in $suite_wording, $section_wording, and $arch_wording$exact_wording .";
+ exact_wording = opts.exact ? "" : g(" (including subword matching)");
+ msg = g("You have searched for
%s in packages names and descriptions in %s, %s, and %s%s.",
+ keyword_enc, suite_wording, section_wording, arch_wording, exact_wording);
END %]
[% 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.
+
[% g('Your search was too wide so we will only display exact matches. At least %u results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords.',
+ too_many_hits) %]
[% END; END %]
[% UNLESS results %]
-
Sorry, your search gave no results
+
[% g('Sorry, your search gave no results') %]
[% END %]
[% FOREACH categories %]
[% "
$name
" IF name %]
[% FOREACH packages %]
-
Package [% pkg %]
+
[% g('Package %s', pkg) %]
[% FOREACH s IN suites;
suite = s.suite %]
@@ -92,7 +93,8 @@ Please consider using a longer keyword or more keywords.
[% version %] [%- IF archive != main_archive %] [[% archive %]][% END %]: [% architectures.join(' ') %]
[% END %]
[% IF s.providers %]
-
[% 'also ' IF s.versions.size > 0 %]provided by: [% FOREACH provider IN s.providers %][% provider %][% ', ' UNLESS loop.last %][% END %]
+
[% IF s.versions.size > 0; g('also provided by:'); ELSE; g('provided by:'); END %]
+ [% FOREACH provider IN s.providers %][% provider %][% ', ' UNLESS loop.last %][% END %]
[% END %]
[% END %]
@@ -100,7 +102,7 @@ Please consider using a longer keyword or more keywords.
[% END %]
[% FOREACH src_packages %]
- Source Package [% pkg %]
+ [% g('Source Package %s', pkg) %]
[% FOREACH origins %]
[% origin = (archive == main_archive) ? suite : "$suite/$archive";
@@ -108,9 +110,9 @@ Please consider using a longer keyword or more keywords.
- [% origin %] ([% subsection %]): [% version %]
[%- IF section %] [[% section %]][% END %]
[%- IF real_archive %] [[% real_archive %]][% END %]
-
Binary packages: [% FOREACH binary IN binaries %][% binary %][% ', ' UNLESS loop.last %][% END %]
+
[% g('Binary packages:') %] [% FOREACH binary IN binaries %][% binary %][% ', ' UNLESS loop.last %][% END %]
[% IF binaries.size > 10 %]
-
+
[% END %]
[% END %]
@@ -120,7 +122,8 @@ Please consider using a longer keyword or more keywords.
[% END %]
[% IF skipped %]
- [% 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 %]