Bug 9218

Summary: intranet cart email broken for non english templates
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: bgkriegel, eric.begin, francois.charbonnier, gmcharlt, jonathan.druart, paola.rossi, sophie.meynieux, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8368
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8062
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 11003    
Bug Blocks: 9189    
Attachments: Bug 9218: intranet cart email broken for non english templates
Bug 9218: intranet cart email broken for non english templates
intranet cart email broken for non english templates
[PASSED QA] Bug 9218: intranet cart email broken for non english templates

Description Fridolin Somers 2012-12-05 14:05:38 UTC
Bug 8062 corrected a bug on sending basket by email. But it corrects only OPAC.
Same problem exists in intranet.

Same problem exists for sending list by email, reported by bug 8368.
Comment 1 Katrin Fischer 2013-10-07 09:36:03 UTC
Hi Fridolyn, please also take a look at bug 10605 - it's still waiting for a sign off (*hint*) and a correction to the encoding that will also be needed for the intranet I think :)
Comment 2 Jonathan Druart 2013-10-07 12:41:23 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2013-10-07 12:48:49 UTC
Hi Jonathan,

hm not sure, but why not copy the OPAC solution 1:1? I think normal HTML is used there and stripped out using some TT magic:

   5 [% USE HtmlToText %]
   6 [% myhtml FILTER html2text(leftmargin => 0, rightmargin => 0) %]
   7 [% myhtmltext | html2text %]

http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tt;h=dc6929da2c3b357f92d90af5ef6f505152bf3bd6;hb=b9c85431ddf967ecadf88ee9d2cbe14ac95d5be4
Comment 4 Jonathan Druart 2013-10-07 13:45:43 UTC
(In reply to Katrin Fischer from comment #3)
> Hi Jonathan,
> 
> hm not sure, but why not copy the OPAC solution 1:1?

Pfff, I don't know...
quick_and_dirty--
Comment 5 Jonathan Druart 2013-10-08 08:55:42 UTC Comment hidden (obsolete)
Comment 6 Paola Rossi 2013-10-08 12:26:10 UTC Comment hidden (obsolete)
Comment 7 Paola Rossi 2013-10-08 12:26:42 UTC
I sign off the patch
Comment 8 Katrin Fischer 2013-10-20 23:36:00 UTC
Created attachment 22136 [details] [review]
[PASSED QA] Bug 9218: intranet cart email broken for non english templates

This patch adapts the method from OPAC to the staff interface (cf bug 8062).

Test plan:
- add somes notices to the cart
- try to send the cart by email
- the email should be the same as before
- translate templates and retry with another language. Before this patch,
  the email was empty. With this patch, it contains the list of records
  and items.

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Passes all tests and QA script.
Fixes quite a bad translation problem, tested with German templates
and umlauts in the message and records.
Comment 9 Galen Charlton 2013-10-31 23:55:19 UTC
Pushed to master.  Thanks, Jonathan!
Comment 10 Tomás Cohen Arazi (tcohen) 2013-12-05 19:00:49 UTC
This patch has been pushed to 3.12.x, will be in 3.12.8.

Thanks Jonathan!
Comment 11 Sophie MEYNIEUX 2013-12-17 11:33:52 UTC
Will it be in 3.10.x too ?
Comment 12 Eric Bégin 2014-01-29 12:21:55 UTC
The 'à' character I write in my message (in .po file) or in the comment are not encoded correctly and shows as � even with that patch.

It's weird because this seems to be only with that character Other characters (î ç ï û) are ok.

Anyone noticed that ?