Bug 19629

Summary: No translatable notification in overdue notices
Product: Koha Reporter: Sophie MEYNIEUX <sophie.meynieux>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19912
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Sophie MEYNIEUX 2017-11-15 16:29:57 UTC
If  PrintNoticesMaxLines is set and the number of overdue items is greater than this limit, then the phrase "List too long for form; please check your account online for a complete list of your overdue items." is added at the end of the letter.

But this is not translatable, and not necessarily at the right place.

Maybe it could be possible to use a placeholder (like <<items.content>>) to tell where to add this notification, and then make it translatable.
Comment 1 Jonathan Druart 2017-11-27 17:37:01 UTC
Will be easy to do using the TT syntax.
Comment 2 Victor Grousset/tuxayo 2017-12-07 11:10:59 UTC
(In reply to Jonathan Druart from comment #1)
> Will be easy to do using the TT syntax.

Is this solution implementable without a major rework of how the letter is built?

Relevant parts of the code:
http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=misc/cronjobs/overdue_notices.pl;h=a1b477c7317c140bd361540fc65086df6c7fb420;hb=HEAD#l687

http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=misc/cronjobs/overdue_notices.pl;h=a1b477c7317c140bd361540fc65086df6c7fb420;hb=HEAD#l708
Comment 3 Jonathan Druart 2017-12-07 12:08:51 UTC
Take a look at bug 17967, and then if we can access to Koha.Preference from the notice template. I think it does not work but it can be done easily with:

@ Letters.pm:1477 @ sub _process_tt {

     my $tt_params = { %{ _get_tt_params( $tables ) }, %{ _get_tt_params( $loops, 'is_a_loop' ) }, %$substitute };

-    $content = qq|[% USE KohaDates %]$content|;
+    $content = qq|[% USE Koha %][% USE KohaDates %]$content|;