Bug 7313: Untranslatable strings in 'Search to hold' feature

Changed the javascript to include markup for translation _(...) in result
list and detail page tool bars.

Also changed the text shown for each result to match the text in the toolbar
to make things more consistent.

To test:
- Apply patch
- Run "perl translate update <your language code>"
- Open .po file for staff and check for "Place hold on" and "Forget"
- Translate those
- Run "perl translate install <your language code>"
- Activate "Search for hold" feature in patron account
- Do a search and check tool bar on top of result list
- Check link text shown in result list
- Check detail page

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Katrin Fischer 2011-12-03 09:55:44 +01:00 committed by Paul Poulain
parent 7698ce6e01
commit 8374ecbcd6
2 changed files with 8 additions and 8 deletions

View file

@ -161,8 +161,8 @@ function confirm_items_deletion() {
location.href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]";
}
var HoldForButtonMenu = [
{ text: "Place hold", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]" },
{ text: "Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]&findborrower=[% holdfor_cardnumber %]" }
{ text: _("Place hold"), url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]" },
{ text: _("Place hold for")+ " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]&findborrower=[% holdfor_cardnumber %]" }
];
// Instantiate a Split Button using the array of YAHOO.widget.MenuItem
@ -172,7 +172,7 @@ function confirm_items_deletion() {
var HoldForButton = new YAHOO.widget.Button({
id: "holdfor",
type: "split",
label: "Place hold",
label: _("Place hold"),
name: "holdfor",
menu: HoldForButtonMenu,
container: this,

View file

@ -194,13 +194,13 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
placeHold();
}
var HoldForButtonMenu = [
{ text: "Place hold", onclick: { fn: holdFor }},
{ text: "Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: holdForPatron }},
{ text: "Forget [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: forgetPatron }}];
{ text: _("Place hold"), onclick: { fn: holdFor }},
{ text: _("Place hold for") + " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: holdForPatron }},
{ text: _("Forget") + " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", onclick: { fn: forgetPatron }}];
var HoldForButton = new YAHOO.widget.Button({
type: "split",
label: "Place hold",
label: _("Place hold"),
name: "holdfor",
menu: HoldForButtonMenu,
container: "placeholdc",
@ -513,7 +513,7 @@ YAHOO.util.Event.onContentReady("searchheader", function () {
<span class="noholdstext">No holds allowed</span>
[% ELSE %]
<a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a>
[% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&amp;findborrower=[% holdfor_cardnumber %]">Hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
[% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&amp;findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
[% END %]
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
| <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Edit record</a>