Bug 9218 - intranet cart email broken for non english templates
Summary: intranet cart email broken for non english templates
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on: 11003
Blocks: 9189
  Show dependency treegraph
 
Reported: 2012-12-05 14:05 UTC by Fridolin Somers
Modified: 2015-06-04 23:23 UTC (History)
9 users (show)

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


Attachments
Bug 9218: intranet cart email broken for non english templates (9.06 KB, patch)
2013-10-07 12:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 9218: intranet cart email broken for non english templates (9.74 KB, patch)
2013-10-08 08:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
intranet cart email broken for non english templates (9.79 KB, patch)
2013-10-08 12:26 UTC, Paola Rossi
Details | Diff | Splinter Review
[PASSED QA] Bug 9218: intranet cart email broken for non english templates (10.00 KB, patch)
2013-10-20 23:36 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 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 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 ?