Bug 16478 - Translation breaks display of Checkout history in tab Checkouts / On-site-checkouts
Summary: Translation breaks display of Checkout history in tab Checkouts / On-site-che...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on: 10860 13234
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-09 16:07 UTC by Marc Véron
Modified: 2017-12-07 22:17 UTC (History)
3 users (show)

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


Attachments
Screenshots with broken display (112.48 KB, image/png)
2016-05-09 16:11 UTC, Marc Véron
Details
Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts (2.17 KB, patch)
2016-05-09 16:41 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts (2.24 KB, patch)
2016-05-09 17:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16478: Fix checkout history tabs - intranet (3.25 KB, patch)
2016-05-09 17:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16478: Fix checkout history tabs - intranet (3.39 KB, patch)
2016-05-09 18:01 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 16478: Translation breaks display of Checkout history in tab Checks / On-site-checkouts (2.30 KB, patch)
2016-05-18 22:03 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 16478: Fix checkout history tabs - intranet (3.45 KB, patch)
2016-05-18 22:03 UTC, Katrin Fischer
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 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 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