From ee64d19fab61bc2e4f4e78e698802cf3d4bc3d1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Fri, 11 Dec 2015 18:06:10 +0100 Subject: [PATCH] Bug 15355: Translatability: Fix issues on check in page This patch fixes translatability issues on checkin page, due to sentence splitting by html tags at several places and ambiguous word 'to'. Additionally, fix message related to syspref AllowReturnToBranch set to 'only the library where the item is checked out from' (it wrongly displays the home library instead of the holding library), and streamline the display of similar messages to look more consistent. To test: - Apply patch - Go to Home > Circulation > Check in - Do check ins with different expected results / messages - Verify that the messages are meaningful and display nicely - Play with items checked out / checked in at different branches (home branch, holding branch, other branch) and different settings for syspref 'AllowREturnToBranch' and verify that the messages display properly (with correct home rsp. holding branch) - Carfully review code changes. Signed-off-by: Aleisha Signed-off-by: Katrin Fischer Signed-off-by: Brendan A Gallagher --- circ/returns.pl | 2 + .../prog/en/modules/circ/returns.tt | 63 ++++++++++++------- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index f7fb52ca7f..21e7abd0c0 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -280,6 +280,7 @@ if ($barcode) { $template->param( title => $biblio->{'title'}, homebranch => $biblio->{'homebranch'}, + holdingbranch => $biblio->{'holdingbranch'}, returnbranch => $returnbranch, author => $biblio->{'author'}, itembarcode => $biblio->{'barcode'}, @@ -373,6 +374,7 @@ if ( $messages->{'NeedsTransfer'} ){ if ( $messages->{'Wrongbranch'} ){ $template->param( wrongbranch => 1, + rightbranch => $messages->{'Wrongbranch'}->{'Rightbranch'}, ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 5895b60902..a56b8e6016 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -133,7 +133,11 @@ $(document).ready(function () { [% END %] [% IF ( collectionItemNeedsTransferred ) %] -
This item is part of a rotating collection and needs to be transferred to [% collectionBranch %]
+
+

Please transfer item to: [% collectionBranch %]

+

[% itembarcode |html %]: [% title |html %]

+

This item is part of a rotating collection.

+
[% END %] @@ -165,11 +169,19 @@ $(document).ready(function () { [% END %] [% IF ( wrongbranch ) %] -

Cannot check in

This item must be checked in at its home library. NOT CHECKED IN

-
+

Cannot check in

+

[% itembarcode |html %]: [% title |html %]

+

NOT CHECKED IN

+

This item must be checked in at following library: [% Branches.GetName( rightbranch ) %]

+
[% END %] -[% IF ( WrongTransfer ) %]

Please return [% title |html %] to [% Branches.GetName( TransferWaitingAt ) %]

Print slip or Cancel transfer

+[% IF ( WrongTransfer ) %] +
+ +

Please return item to: [% Branches.GetName( TransferWaitingAt ) %]

+

[% itembarcode |html %]: [% title |html %]

+ [% IF ( wborcnum ) %]
Hold for:
  • [% borsurname %], [% borfirstname %] ([% borcnum %])
  • @@ -202,7 +214,8 @@ $(document).ready(function () {
    -

    Hold found (item is already waiting): [% title |html %]

    +

    Hold found (item is already waiting)

    +

    [% itembarcode |html %]: [% title |html %]

    [% IF ( reservenotes ) %]

    Notes: [% reservenotes %]

    [% END %]

    Hold for:

      @@ -250,7 +263,8 @@ $(document).ready(function () { [% IF ( diffbranch ) %]
      -

      Hold needing transfer found: [% title |html %]

      +

      Hold needing transfer found

      +

      [% itembarcode |html %]: [% title |html %]

      Hold for:

      • [% borsurname %], [% borfirstname %] ([% borcnum %])
      • @@ -294,7 +308,9 @@ $(document).ready(function () { [% IF ( transfer ) %]
        -

        Please return [% title or "item" |html %] to [% Branches.GetName( returnbranch ) %]
        ( Print slip )

        +

        Please return item to: [% Branches.GetName( returnbranch ) %]

        +

        [% itembarcode |html %]: [% title |html %]

        +
        [% END %] @@ -356,7 +372,8 @@ $(document).ready(function () {
        -

        Hold found: [% title |html %]

        +

        Hold found

        +

        [% itembarcode |html %]: [% title |html %]

        [% IF ( reservenotes ) %]

        Notes: [% reservenotes %]

        [% END %]
        Hold for:
          @@ -408,21 +425,24 @@ $(document).ready(function () { [% IF ( errmsgloop ) %]

          Check in message

          + [% IF itembiblionumber %] +

          [% itembarcode |html %]: [% title |html %]

          + [% END %] [% FOREACH errmsgloo IN errmsgloop %] [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]

          - Not for loan status updated - from + Not for loan status updated. +
          Old value: [% IF errmsgloo.NotForLoanStatusUpdated.from %] - [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %] + [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %]. [% ELSE %] - being available for loan + Available for loan. [% END %] - to +
          New value: [% IF errmsgloo.NotForLoanStatusUpdated.to %] - [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %] + [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %]. [% ELSE %] - being available for loan + Available for loan. [% END %]

          [% END %] @@ -430,7 +450,7 @@ $(document).ready(function () {

          No item with barcode: [% errmsgloo.msg %]

          [% END %] [% IF ( errmsgloo.ispermanent ) %] -

          Please return to [% errmsgloo.msg %]

          +

          Please return item to: [% errmsgloo.msg %]

          [% END %] [% IF ( errmsgloo.notissued ) %]

          Not checked out.

          @@ -443,25 +463,26 @@ $(document).ready(function () { [% IF ( LostItemFeeRefunded ) %]

          A refund has been applied to the borrowing patron's account.

          [% ELSE %] -

          Any lost item fees for this item will remain on the patron's account

          +

          Any lost item fees for this item will remain on the patron's account.

          [% END %] [% END %] [% IF ( errmsgloo.withdrawn ) %] [% IF BlockReturnOfWithdrawnItems %]
          Cannot check in
          -

          Item is withdrawn. NOT CHECKED IN

          +

          NOT CHECKED IN

          +

          Item is withdrawn.

          [% ELSE %]

          Item is withdrawn.

          [% END %] [% END %] [% IF ( errmsgloo.debarred ) %] -

          [% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %]) is now debarred until [% errmsgloo.debarred | $KohaDates %]

          +

          [% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %]) is now debarred until [% errmsgloo.debarred | $KohaDates %].

          [% END %] [% IF ( errmsgloo.prevdebarred ) %] -

          Reminder: Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %]

          +

          Reminder: Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].

          [% END %] [% IF ( errmsgloo.foreverdebarred ) %] -

          Reminder: Patron has an indefinite restriction

          +

          Reminder: Patron has an indefinite restriction.

          [% END %] [% END %] -- 2.39.5