Bug 15375 - Translatability: Fix issues on OPAC page 'Placing a hold'
Summary: Translatability: Fix issues on OPAC page 'Placing a hold'
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-15 08:34 UTC by Marc Véron
Modified: 2017-06-14 22:12 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15375 - Translatability: Fix issues on OPAC page 'Placing a hold' (9.20 KB, patch)
2015-12-15 10:29 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15375 - Translatability: Fix issues on OPAC page 'Placing a hold' (9.24 KB, patch)
2015-12-16 01:16 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15375 - Translatability: Fix issues on OPAC page 'Placing a hold' (9.41 KB, patch)
2016-01-14 02:20 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 15375 [QA Followup] - Remove refereces to biblio and biblionumber for patron messages (1.43 KB, patch)
2016-01-15 18:14 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15375 - Translatability: Fix issues on OPAC page 'Placing a hold' (9.46 KB, patch)
2016-01-15 18:26 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15375 [QA Followup] - Remove refereces to biblio and biblionumber for patron messages (1.43 KB, patch)
2016-01-15 18:26 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15375 [QA Followup] - Fix non-functional restriction message and date (2.95 KB, patch)
2016-01-15 18:26 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2015-12-15 08:34:28 UTC
Fix several issues with odd translations on opac-reserve.tt due to string splitting by tags.

Example in German: Entschuldigung, Sie können nichts vormerken, weil der Bibliothek Ihre aktuellen Kontaktinformation im Archiv.

Example in French: Désolé, vous ne pouvez pas faire de réservation, parce que la bibliothèque n'a de données à jour Information de contact sur fichier.
Comment 1 Marc Véron 2015-12-15 10:29:38 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2015-12-15 23:06:05 UTC
This mostly works, but a couple of comments:
- For the user with too many fines, there is no comment about the account being blocked as there are with other restrictions on the summary/main page. Maybe there should be? 
- For the user whose account is about to expire, the error message reads "i Sorry, none of these items can be placed on hold." and "No available items" which is untrue.
I'll be happy to sign off on this when these things are fixed. :)
Comment 3 Marc Véron 2015-12-16 01:13:03 UTC
(In reply to Aleisha Amohia from comment #2)


Thanks for testing, Aleisha
(...)
> - For the user with too many fines, there is no comment about the account
> being blocked as there are with other restrictions on the summary/main page.
> Maybe there should be? 

Link: [server]/cgi-bin/koha/opac-reserve.pl?biblionumber=1

Without patch, I get for somebody with a very high fine:
----
Sorry, you cannot place holds because you owe 10005.00. 
----

With patch, I get:
----
Sorry, you cannot place holds.

    - You have unpaid fines. Amount: 10,005.00.
----

> - For the user whose account is about to expire, the error message reads "i
> Sorry, none of these items can be placed on hold." and "No available items"
> which is untrue.

I found the stray 'i' and will remove it wit the next patch.

Ah, the test plan regarding "with user with an account that is about to expire" is obsolete, it simply is not tested. That makes sense, since while the card is not yet expired the patron should be able to place a hold.

Ok, i found out what happend regarding "No available items":

- Put a hold on a title -> OK
- Try to put a hold on the same item

Result (same with and without patch):
-----------
Sorry, none of these items can be placed on hold.

Breakfast blast , by Kalman, Bobbie.
You have already requested this title.
-----------

Do a search with results including the item above, in result list check several items, try to put a hold on the checked items, result:
List with the items, they are marked as available / not available ("You already have requested this title").
Comment 4 Marc Véron 2015-12-16 01:16:31 UTC Comment hidden (obsolete)
Comment 5 Koha Team University Lyon 3 2015-12-17 14:40:26 UTC
I followed the test plan.
Users with expired account can place a hold on OPAC, so I didn't see any message.

Blocked users with date and with comment : comment and date are displayed in the message. OK

Users Blocked users with date and without comment : date are not displayed in the message (Your account has been frozen.
Usually the reason for freezing an account is old overdues or damage fees. If shows your account to be clear, please contact the library. )

users who has his card marked as lost : ok, the reason appeared in the message. OK

users with uncertain address information : ok, the reason appeared in the message. OK

users who try to place more than the max number of reserve : the max of reserve is displayed iin the message. OK

Sorry, I can't test for users with fines, because there a strange behaviour on the sandbox.

It will be nice to add the restriction expiration date in the message.
Comment 6 Marc Véron 2015-12-17 15:59:56 UTC
(In reply to Koha Team Lyon 3 from comment #5)
(...)

> Users with expired account can place a hold on OPAC, so I didn't see any
> message.

MV: - I did string changes only, the overall behaviour should 
      not have changed.
    - Do you see the same behaviour as without patch?
    - Did you log in / log out the expired patron after setting
      the expiration date to make it expire?
    - Maybe it is related to the setting of syspref
      'BlockExpiredPatronOpacAction' and /or in
      the patron category (Setting 'Block expired patrons'
(...)
> 
> Users Blocked users with date and without comment : date are not displayed
> in the message (Your account has been frozen.
> Usually the reason for freezing an account is old overdues or damage fees.
> If shows your account to be clear, please contact the library. )
(...)
> It will be nice to add the restriction expiration date in the message.

MV: - Is it the same behaviour as without patch?
    - Note: The details page displays other text than the 'Placing a hold'
      page. I did not change it because in this bug I wanted to do
      string changes for translatability only. We can then later streamline
      the texts / behaviour of the detail page an the hold page.
(...)

> Sorry, I can't test for users with fines, because there a strange behaviour
> on the sandbox.

Thanks for testing! Looking forward to have correct translations!
Comment 7 Marc Véron 2016-01-02 10:00:10 UTC
Still applies on current master.
Note: This patch is about string changes only, it does not change the functionallity.
If you find an issue or want to suggest an enhancement regarding functionallity, please file a separate bug.
Comment 8 Aleisha Amohia 2016-01-12 23:48:50 UTC
Can't sign off on this yet, a few things:

Blocked/debarred user - the link to the account page did not work, even though I can see in the code that it should so I am not sure what happened there but it did not redirect me anywhere.

Uncertain address information - The link took me to opac-userupdate.pl which doesn't exist - should be to opac-memeberentry.pl
Comment 9 Marc Véron 2016-01-13 11:01:50 UTC
Hi Aleisha,

Blocked user:
I re-tested with patch applied. Logged in to OPAC with a user who has a manual debarrement. Searched a biblio and tried to put a hold (from the search result list). Got yellow info with message as expected with working link to the useres addount page.


Uncertain address / wrong link: If I do git grep 'opac-userupdate.pl', I get a result in:
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
I think this is a separate Bug. This patch is about koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt only.
Comment 10 Aleisha Amohia 2016-01-14 02:20:24 UTC Comment hidden (obsolete)
Comment 11 Aleisha Amohia 2016-01-14 02:41:32 UTC
(In reply to Aleisha Amohia from comment #8)
> Can't sign off on this yet, a few things:
> 
> Blocked/debarred user - the link to the account page did not work, even
> though I can see in the code that it should so I am not sure what happened
> there but it did not redirect me anywhere.
Patch for this on Bug 15577

> Uncertain address information - The link took me to opac-userupdate.pl which
> doesn't exist - should be to opac-memberentry.pl
Patch for this on Bug 15576
Comment 12 Jonathan Druart 2016-01-14 11:01:16 UTC
Marc, why do you replace div with li?
Comment 13 Marc Véron 2016-01-14 14:29:55 UTC
(In reply to Jonathan Druart from comment #12)
> Marc, why do you replace div with li?

Because it looks nicer if there are multiple messages.
Comment 14 Kyle M Hall 2016-01-15 18:05:25 UTC
(In reply to Marc Véron from comment #13)
> (In reply to Jonathan Druart from comment #12)
> > Marc, why do you replace div with li?
> 
> Because it looks nicer if there are multiple messages.

I think it's a great improvement!
Comment 15 Kyle M Hall 2016-01-15 18:14:56 UTC Comment hidden (obsolete)
Comment 16 Kyle M Hall 2016-01-15 18:26:08 UTC
Created attachment 46725 [details] [review]
Bug 15375 - Translatability: Fix issues on OPAC page 'Placing a hold'

Fix several issues with odd translations on opac-reserve.tt due to
string splitting by tags.
In addition, streamline messages to make them similar to the same
messages on the OPAC summary page (Bug 15374)

To test:
- Apply patch
- Log in to OPAC
  - with blocked /debarred user (with and without comment and date)
  - with user who has to much fines
  - with user who has his card marked as lost
  - with user with expired account
  - with user with uncertain address information
- Try to put holds
- Verify that message about why holds are not possible is correct
  and displays nicely and that links in messages work
- Carefully examine code
- Search for regressions

(Amended: stray i removed, test plan updated, removed account that
          is about to expire)

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

I am going to sign off on this because it works as it should and I think the problems I had in comment 8 are a separate bug.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 17 Kyle M Hall 2016-01-15 18:26:16 UTC
Created attachment 46726 [details] [review]
Bug 15375 [QA Followup] - Remove refereces to biblio and biblionumber for patron messages

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 18 Kyle M Hall 2016-01-15 18:26:18 UTC
Created attachment 46727 [details] [review]
Bug 15375 [QA Followup] - Fix non-functional restriction message and date

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 19 Brendan Gallagher 2016-01-27 05:26:11 UTC
Pushed to Master - Should be in the May 2016 release. Thanks!
Comment 20 Julian Maurice 2016-01-29 15:12:31 UTC
Patches pushed to 3.22.x, will be in 3.22.3
Comment 21 Frédéric Demians 2016-02-12 06:45:07 UTC
This patch has been pushed to 3.20.x, will be in 3.20.9.