Bug 16478

Summary: Translation breaks display of Checkout history in tab Checkouts / On-site-checkouts
Product: Koha Reporter: Marc Véron <veron>
Component: OPACAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, julian.maurice, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 10860, 13234    
Bug Blocks:    
Attachments: Screenshots with broken display
Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts
Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts
Bug 16478: Fix checkout history tabs - intranet
Bug 16478: Fix checkout history tabs - intranet
[PASSED QA] Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts
[PASSED QA] Bug 16478: Fix checkout history tabs - intranet

Description Marc Véron 2016-05-09 16:07:13 UTC
In koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt the filter for the tabs 'Checkouts' and 'On-site checkouts' uses text that is exposed to translation.

If they are translated, the tabs will be empty on translated pages. (Note: Enable syspref OnSiteCheckuts for testing)

See opac-readingrecord.tt line 83ff:
[% IF issue.onsite_checkout %]
    onsite
[% ELSE %]
    checkout
[% END %]

E.g. in German (/de-DE/modules/opac-readingrecord.tt), it translates to:
[% IF issue.onsite_checkout %] vor Ort [% ELSE %] ausgeliehen [% END %]

It should be the same as in the English version. A very dirty workaround would be not to translate 'onsite' and 'checkout' in Pootle.

Most problably other language will fall into this trap as well.
Comment 1 Marc Véron 2016-05-09 16:11:46 UTC
Created attachment 51334 [details]
Screenshots with broken display
Comment 2 Marc Véron 2016-05-09 16:41:36 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-05-09 17:01:47 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2016-05-09 17:01:51 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2016-05-09 18:01:56 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2016-05-18 22:03:11 UTC
Created attachment 51602 [details] [review]
[PASSED QA] Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts

To test:
- Make sure that syspref OnsiteCheckouts is enabled
- Log in to OPAC as a patron who has checkouts, online checkouts and checkout history enabled
- Go to 'your reading history' (in English)
- Display all three tabs
- Apply patch
- Reload page, display oll three tabs again, there should be no difference
- Examine source code changes to verify that the words 'checkout' and 'onsite' no longer
  will be exposed to translation.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2016-05-18 22:03:55 UTC
Created attachment 51603 [details] [review]
[PASSED QA] Bug 16478: Fix checkout history tabs - intranet

Test plan:
Same as before for the intranet.
And please retest the OPAC => I have changed the filter's values to
match OPAC/intranet

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Kyle M Hall (khall) 2016-05-23 17:23:00 UTC
Pushed to master for 16.05, thanks Marc, Jonathan!
Comment 9 Julian Maurice 2016-05-25 09:19:31 UTC
Patches pushed to 3.22.x, will be in 3.22.7