From 82359534187f32052534bcbd64a1fdef3868c271 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 27 Nov 2012 12:39:02 +0200 Subject: [PATCH] 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 --- .../src/templates/opac/parts/result/lowhits.tt2 | 61 ++++++++++++---------- 1 file changed, 34 insertions(+), 27 deletions(-) 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].)', '', '', '', '') %]

-- 2.11.0