From 6004b2492bc945739fd95bb55955ca1fe3f0483b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Tue, 3 Mar 2015 11:49:29 +0100 Subject: [PATCH] Bug 13351 - Untranslatable javascript in members.tt This patch streamlines the page title text for search results in Home > Patrons to make it translateable (and more readable). To test: - Apply patch - Select Englsh language - Apply filter wit several values or click on a letter for "Browse by last name" - Verify that the title makes sense - Translate to your language and select this language - Verify that the text appears properly in your language Signed-off-by: Mirko Tietgen Signed-off-by: Katrin Fischer Works as described, no problems found. http://bugs.koha-community.org/show_bug.cgi?id=13352 Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/en/modules/members/member.tt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt index f1f0fa8363..ea90bfd790 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt @@ -221,26 +221,25 @@ $(document).ready(function() { // Update the string "Results found ..." function update_searched(){ - var searched = ""; - searched += "on " + $("#searchfieldstype_filter").find("option:selected").text().toLowerCase() + " fields"; + var searched = $("#searchfieldstype_filter").find("option:selected").text(); if ( $("#searchmember_filter").val() ) { if ( $("#searchtype_filter").val() == 'start_with' ) { searched += _(" starting with "); } else { searched += _(" containing "); } - searched += $("#searchmember_filter").val(); + searched += "'" + $("#searchmember_filter").val() + "'"; } if ( $("#firstletter_filter").val() ) { - searched += _(" begin with ") + $("#firstletter_filter").val(); + searched += _(" begins with ") + "'" + $("#firstletter_filter").val() +"'"; } if ( $("#categorycode_filter").val() ) { - searched += _(" with category ") + $("#categorycode_filter").find("option:selected").text(); + searched += _(" with category ") + "'" + $("#categorycode_filter").find("option:selected").text() + "'"; } if ( $("#branchcode_filter").val() ) { searched += _(" in library ") + $("#branchcode_filter").find("option:selected").text(); } - $("#searchpattern").text("for patron " + searched); + $("#searchpattern").text(searched); } // Redraw the table @@ -327,7 +326,7 @@ function filterByFirstLetterSurname(letter) {
-

Results found [% IF searchmember %] for '[% searchmember %]'[% END %]

+

Patrons found for: [% IF searchmember %] for '[% searchmember %]'[% END %]

[% IF CAN_user_tools_manage_patron_lists %]
-- 2.39.5