From: Pasi Kallinen Date: Tue, 27 Nov 2012 10:39:02 +0000 (+0200) Subject: LP#1082260: Update OPAC low search hits template for i18n X-Git-Tag: sprint4-merge-nov22~3656 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aaec5cd703f310b001670a93b90e207d987616c9;p=working%2FEvergreen.git LP#1082260: Update OPAC low search hits template for i18n The OPAC lowhits.tt2 template is only partially translatable, and the translatable part is impossible to make sound good for languages with different word order than English. This patch changes the already translatable part so there are 4 different phrases to translate (instead of two phrase fragments), and makes the search hints translatable. For English language, the patch does not introduce any visible differences. Signed-off-by: Pasi Kallinen Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/templates/opac/parts/result/lowhits.tt2 b/Open-ILS/src/templates/opac/parts/result/lowhits.tt2 index f6f39b2d73..238a1c8ab8 100644 --- a/Open-ILS/src/templates/opac/parts/result/lowhits.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/lowhits.tt2 @@ -4,44 +4,51 @@ [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
-

[% l('Sorry, no entries were found for') %] - [% IF is_advanced OR is_special; l('your search'); ELSE %] - [% CGI.param('query') | html %] - [% END %] - [% IF ctx.bookbag; - l('within') %] - [% ctx.bookbag.name | html %]. - [% END %] - +

[% qhtml = CGI.param('query') | html; + IF ctx.bookbag; + wbbag = ctx.bookbag.name | html; + fmt_bookbag = '' _ wbbag _ ''; + IF is_advanced OR is_special; + l('Sorry, no entries were found for your search within [_1].', fmt_bookbag); + ELSE; + l('Sorry, no entries were found for [_1][_2][_3] within [_4].', '', qhtml, '', fmt_bookbag); + END; + ELSE; + IF is_advanced OR is_special; + l('Sorry, no entries were found for your search.'); + ELSE; + l('Sorry, no entries were found for [_1][_2][_3].', '', qhtml, ''); + END; + END %]

[% INCLUDE "opac/parts/result/lowhits_purchase.tt2" %]

- Keyword Search Tips
- Try changing to Advanced Search. + [% l('Keyword Search Tips') %]
+ [% l('Try changing to [_1]Advanced Search[_2].', '', '') %]

- Adjacency
- Multiple words are not searched together as a phrase. They will - be found in various parts of the record. To search for a phrase, enclose your - search terms in quotation marks.
- (example: "garcia marquez") + [% l('Adjacency') %]
+ [% l('Multiple words are not searched together as a phrase. They will + be found in various parts of the record. To search for a phrase, enclose your + search terms in quotation marks.') %]
+ [% l('(example: [_1]"garcia marquez"[_2])', '', '') %]

- Truncation
- Words may be right-hand truncated using an asterisk. Use a single asterisk * - to truncate any number of characters.
- (example: environment* agency) + [% l('Truncation') %]
+ [% l('Words may be right-hand truncated using an asterisk. Use a single asterisk * + to truncate any number of characters.') %]
+ [% l('(example: [_1]environment* agency[_2])', '', '') %]

- Anchored Searching
- You may use ^ and $ to indicate "phrase begins with" and - "phrase ends with," respectively, within a search phrase - enclosed in quotation marks.
- (examples: "^harry" for phrases that begin with - the term harry. - "stone$" for phrases that end in stone.) + [% l('Anchored Searching') %]
+ [% l('You may use ^ and $ to indicate "phrase begins with" and + "phrase ends with," respectively, within a search phrase + enclosed in quotation marks.') %]
+ [% l('(examples: [_1]"^harry"[_2] for phrases that begin with + the term [_3]harry[_4]. + [_1]"stone$"[_2] for phrases that end in [_3]stone[_4].)', '', '', '', '') %]