Bug 9140 - Untranslatable strings in item circulation history
Summary: Untranslatable strings in item circulation history
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Paul Poulain
URL: /cgi-bin/koha/circ/bookcount.pl?&bibl...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-25 22:39 UTC by Katrin Fischer
Modified: 2013-05-23 06:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
screenshot, untranslatable terms highlighted (31.46 KB, image/png)
2012-11-25 22:39 UTC, Katrin Fischer
Details
Bug 9140 - Untranslatable strings in item circulation history (3.26 KB, patch)
2012-11-26 15:32 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 9140: Followup removes the useless variable $message (2.24 KB, patch)
2012-12-04 15:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9140 - Untranslatable strings in item circulation history (3.27 KB, patch)
2012-12-07 16:56 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9140: Followup removes the useless variable $message (2.29 KB, patch)
2012-12-07 16:57 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9140: Followup removes the useless variable $message (2.34 KB, patch)
2012-12-21 15:48 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 9140 - Untranslatable strings in item circulation history (3.27 KB, patch)
2012-12-21 15:48 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 9140: Followup removes the useless variable $message (2.34 KB, patch)
2012-12-21 15:48 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2012-11-25 22:39:11 UTC
Created attachment 13663 [details]
screenshot, untranslatable terms highlighted

There are some untranslatable terms on the item circulation history page.

- Never
- Item has no branch transfers record

1) Create a record with an item
2) Circulate the item a few times, don't transfer to other branches
3) Go to the record detail page
4) Open tab 'items'
5) Open item circulation history by clicking on 'View item's checkout history'
6) Switch to an installed translation (German, French...)

Or take a look at the screenshot.
Comment 1 Katrin Fischer 2012-11-25 22:51:50 UTC
bookcount.pl
115 return ( 0, "Item has no branch transfers record" ) if not $date;
> Needs to be moved into the template

bookcount.tt
53 [% ELSE %]Never
> Probably needs to be put inside an HTML tag
Comment 2 Owen Leonard 2012-11-26 02:17:58 UTC
(In reply to comment #1)

> bookcount.tt
> 53 [% ELSE %]Never
> > Probably needs to be put inside an HTML tag

Does whitespace affect a problem like this? How do I test if a chnage to the template fixes the problem?
Comment 3 Katrin Fischer 2012-11-26 05:58:55 UTC
Hi Owen, 
the way I test it is change the template, then run "perl translate update <lang>" from misc/translator, then check if the string shows up in the po file. I suspect wrapping it in a <span> shoudl probably do the trick. Thx for working on this!
Comment 4 Owen Leonard 2012-11-26 15:32:27 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2012-12-04 15:57:29 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2012-12-07 16:56:57 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2012-12-07 16:57:14 UTC Comment hidden (obsolete)
Comment 8 Paul Poulain 2012-12-21 15:48:00 UTC
QA comment
  * passes koha-qa.pl
  * no side effect risk
  * clean some code, ++

passed QA
Comment 9 Paul Poulain 2012-12-21 15:48:22 UTC Comment hidden (obsolete)
Comment 10 Paul Poulain 2012-12-21 15:48:35 UTC
Created attachment 14238 [details] [review]
Bug 9140 - Untranslatable strings in item circulation history

This patch removes the text of a message from the script
to the template. The lastmove sub now returns either the date
or 0, and the template displays the "no transfers" message
if the date doesn't exist.

To test, view the circulation history for items which
do and do not have a transfer history. A date should be displayed
for items which have a transfer history. A messages should
be displayed for those which do not.

This patch also adds a <span> around the text "Never" which
was not getting picked up by the translation script. To test
this change, run "perl translate update <lang>" from misc/translator,
then check if the string shows up in the po file. (Thanks kf!)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Paul Poulain 2012-12-21 15:48:58 UTC
Created attachment 14239 [details] [review]
Bug 9140: Followup removes the useless variable $message

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 12 Jared Camins-Esakov 2012-12-22 21:03:27 UTC
This patch has been pushed to master.
Comment 13 Chris Cormack 2012-12-26 19:42:45 UTC
Pushed to 3.10.x, will be in 3.10.2
Comment 14 Chris Cormack 2012-12-26 19:57:28 UTC
Pushed to 3.8.x, will be in 3.8.9