View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
08686Bug reportsTranslationpublic2014-02-26 13:32
Reporterpmonstad Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.05+ 
Summary08686: line feed trouble when translating e.g. mail templates in translation system
Description

When translating e.g. mail templates in www.translate.limesurvey.org there are problems with the line feeds. The original English text has arrow symbols to indicate line feeds. I have not found a way to enter line feeds in the translated text. The result can be found if I edit a mail template. The template might look like:

Hei {FIRSTNAME}!<br /><br />For en stund siden ble du invitert til å delta/svare på en elektronisk undersøkelse.<br /><br />Vi ser at du foreløpig ikke har besvart denne, og vi ønsker å minne deg om at du fortsatt har muligheten til å delta/svare - noe vi håper du vil.<br /><br />Undersøkelsen det gjelder er:<br />"Kompetansekartlegging 2011"<br /><br />"<div><span class="343265113-10022011" /><span class="343265113-10022011"><br />
</span></div>"<br /><br />For å delta/svare, vennligst klikk på lenken under.<br /><br />Med hilsen<br /><br />Administrator (postmaster@hkskole.no)<br /><br />----------------------------------------------<br />Klikk her for å delta/svare på undersøkelsen:<br />{SURVEYURL}<br /><br />Hvis du ikke vil delta i denne undersøkelsen og heller ikke vil motta invitasjoner til andre undersøkelse, vennligst klikk på følgende lenke:<br />{OPTOUTURL}

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)140204
I will donate to the project if issue is resolvedNo
Browserall
Database type & versionall
Server OS (if known)all
Webserver software & version (if known)all
PHP Versionall

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2014-02-11 20:37

administrator   ~28630

I do not see a problem - a linefeed is entered by pressing ENTER ?

pmonstad

pmonstad

2014-02-11 20:46

updater   ~28633

Here is a screenshot of the "problem" : http://awesomescreenshot.com/0be2c6jbfe

When I reset the mail template strings are picked from translation files but the line feed is missing and some html codes are put in. I can't see how it is possible to insert line feeds in the translation system at www.translate.limesurvey.com. The original English text contains some arrows to indicate a line feed but I can not see how to put them in the translated language. Copy/paste don't help.

c_schmitz

c_schmitz

2014-02-12 16:02

administrator   ~28653

Last edited: 2014-02-12 17:22

I can't see a problem on the screenshot.

You are using HTML email which does not use linebreaks anyway. The linebreaks entered in the translation are automatically translated to (br/) tags if you switch to HTML email mode. If you switch your emails to text mode then the line breaks are properly used and shown.

pmonstad

pmonstad

2014-02-12 18:34

updater   ~28661

Hm, It it correct if I choose inline HTML. HTML popup shows nothing (another bug?). Plain text shows the enclosed screenshot, e.g. HTML codes in text and no line feeds. I thought it should be more or less the same wether I choose html og plain ascii text. Wrong?

c_schmitz

c_schmitz

2014-02-12 20:09

administrator   ~28666

??? Your screenhot is HTML popup, the edit icon can be seen beside the edit field.

If you switch the format to either HTML or plain text you have to use the 'Set default' button to pull the correctly formatted text.

The translated text is ASCII but if you switch to HTML and pull the default text the line breaks are converted automatically to (br/).

pmonstad

pmonstad

2014-02-12 21:54

updater   ~28693

Have you tested this with e.g. Norwegian bokmål user interface? The icon to the html pop up window only shows a new window without any strings at all. See enclosed screenshot.

pmonstad

pmonstad

2014-02-12 22:15

updater   ~28694

The html popup window works fine if I use in in question editing, but not here...

c_schmitz

c_schmitz

2014-02-12 23:43

administrator   ~28697

I can reproduce the HTML popup issue and I can see that the 'Use default' button does not work in HTML mode. I will fix the latter one.

c_schmitz

c_schmitz

2014-02-12 23:49

administrator   ~28698

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=13882

c_schmitz

c_schmitz

2014-02-12 23:51

administrator   ~28699

Last edited: 2014-02-12 23:51

Tony, can you check please why the HTML popup editor is broken in email templates?
I can see that the view \application\views\admin\htmleditor\pop_nofields_view.php for email templates is used which is practically empty.

pop_nofields_view was originally intended for CKeditor using only the basic replacement fields (like in email templates) and \application\views\admin\htmleditor\pop_editor_view.php for the rest (like questions, labels, answer options, etc). Maybe we can adjust \application\views\admin\htmleditor\pop_editor_view.php so it covers both?

tpartner

tpartner

2014-02-17 15:38

partner   ~28789

Carsten, I'm confused...

In 2.0, as far as I can see, pop_editor_view was used for everything including the email templates. The only difference I can see between the editors was the LS replacement fields available and this is controlled by limereplacementfields.php.

Now, in 2.05, for some reason unknown to me, the pop_nofields_view is triggered for email templates. I don't see how that view could ever have worked and why it is required at all.

What editor differences (aside from LS replacement fields) should there be between email templates and other uses?

Having said all of that, if there are no real differences and we go with pop_editor_view.php for all uses, we will need to fix some bugs in limereplacementfields.php. Some of the $fieldtype values are different in 2.05 so the switch on $fieldtype doesn't work for 'email-inv' and 'email-rem' (and perhaps some other values).

Thoughts?

c_schmitz

c_schmitz

2014-02-20 21:36

administrator   ~28845

Tony, you are right. I found the issue in a completely different place and fixed it. I don't understand the $fieldtype problem you are mentioning. Can you check if this is still a issue with my fix applied?

c_schmitz

c_schmitz

2014-02-20 21:36

administrator   ~28846

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=13918

tpartner

tpartner

2014-02-21 18:28

partner   ~28866

No, the problem still exists, there are no replacement fields available in the email templates.

See my screenshot - no_replacement_fields_for_emails.png.

tpartner

tpartner

2014-02-21 18:29

partner   ~28867

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=13920

tpartner

tpartner

2014-02-21 18:29

partner   ~28868

How about this fix?

c_schmitz

c_schmitz

2014-02-21 21:03

administrator   ~28869

Tony, that looks great to me, nicely done! I guess we can close this issue now.

c_schmitz

c_schmitz

2014-02-26 13:32

administrator   ~28943

2.05+ Build 140226 released

Related Changesets

LimeSurvey: master bacf9a1f

2014-02-12 22:18:40

c_schmitz

Details Diff
Fixed issue 08686: Defaults email template texts not working with HTML templates Affected Issues
08686
mod - application/views/admin/emailtemplates/email_language_template_tab.php Diff File
mod - application/views/admin/htmleditor/pop_nofields_view.php Diff File
mod - scripts/admin/emailtemplates.js Diff File

LimeSurvey: master 9cc9b0fc

2014-02-20 20:33:47

c_schmitz

Details Diff
Fixed issue 08686: HTML popup editor not working in email templates Affected Issues
08686
mod - application/views/admin/emailtemplates/email_language_template_tab.php Diff File

LimeSurvey: master a14b789b

2014-02-21 17:28:32

tpartner

Details Diff
Fixed issue 08686: line feed trouble when translating e.g. mail templates in translation system
Dev: Correct $fieldtype values
Affected Issues
08686
mod - application/controllers/admin/limereplacementfields.php Diff File

Issue History

Date Modified Username Field Change
2014-02-07 22:09 pmonstad New Issue
2014-02-08 00:34 c_schmitz Assigned To => c_schmitz
2014-02-08 00:34 c_schmitz Status new => assigned
2014-02-11 20:37 c_schmitz Note Added: 28630
2014-02-11 20:37 c_schmitz Status assigned => feedback
2014-02-11 20:46 pmonstad Note Added: 28633
2014-02-11 20:46 pmonstad Status feedback => assigned
2014-02-12 16:02 c_schmitz Note Added: 28653
2014-02-12 16:02 c_schmitz Status assigned => feedback
2014-02-12 17:22 c_schmitz Note Edited: 28653
2014-02-12 18:34 pmonstad Note Added: 28661
2014-02-12 18:34 pmonstad Status feedback => assigned
2014-02-12 20:09 c_schmitz Note Added: 28666
2014-02-12 21:54 pmonstad Note Added: 28693
2014-02-12 21:55 pmonstad File Added: Skjermbilde 2014-02-12 kl. 21.53.46.png
2014-02-12 22:15 pmonstad Note Added: 28694
2014-02-12 23:43 c_schmitz Note Added: 28697
2014-02-12 23:45 c_schmitz Assigned To c_schmitz => tpartner
2014-02-12 23:49 c_schmitz Changeset attached => LimeSurvey master bacf9a1f
2014-02-12 23:49 c_schmitz Note Added: 28698
2014-02-12 23:49 c_schmitz Assigned To tpartner => c_schmitz
2014-02-12 23:49 c_schmitz Resolution open => fixed
2014-02-12 23:49 c_schmitz Assigned To c_schmitz => tpartner
2014-02-12 23:51 c_schmitz Note Added: 28699
2014-02-12 23:51 c_schmitz Note Edited: 28699
2014-02-17 15:38 tpartner Assigned To tpartner => c_schmitz
2014-02-17 15:38 tpartner Note Added: 28789
2014-02-20 21:36 c_schmitz Note Added: 28845
2014-02-20 21:36 c_schmitz Assigned To c_schmitz => tpartner
2014-02-20 21:36 c_schmitz Changeset attached => LimeSurvey master 9cc9b0fc
2014-02-20 21:36 c_schmitz Note Added: 28846
2014-02-20 21:36 c_schmitz Assigned To tpartner => c_schmitz
2014-02-20 21:36 c_schmitz Assigned To c_schmitz => tpartner
2014-02-21 18:25 tpartner File Added: no_replacement_fields_for_emails.png
2014-02-21 18:28 tpartner Assigned To tpartner => c_schmitz
2014-02-21 18:28 tpartner Note Added: 28866
2014-02-21 18:29 tpartner Changeset attached => LimeSurvey master a14b789b
2014-02-21 18:29 tpartner Note Added: 28867
2014-02-21 18:29 tpartner Assigned To c_schmitz => tpartner
2014-02-21 18:29 tpartner Note Added: 28868
2014-02-21 19:48 tpartner Assigned To tpartner => c_schmitz
2014-02-21 21:03 c_schmitz Note Added: 28869
2014-02-21 21:03 c_schmitz Status assigned => resolved
2014-02-21 21:03 c_schmitz Fixed in Version => 2.05+
2014-02-26 13:32 c_schmitz Note Added: 28943
2014-02-26 13:32 c_schmitz Status resolved => closed