Bug 19629 - No translatable notification in overdue notices
Summary: No translatable notification in overdue notices
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-15 16:29 UTC by Sophie MEYNIEUX
Modified: 2023-10-01 15:37 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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|;