View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
15520Bug reportsTranslationpublic2022-08-04 21:22
Reporterbebs Assigned Togabrieljenik  
PrioritylowSeveritytrivial 
Status feedbackResolutionopen 
Product Version3.19.1 
Summary15520: i18n issue: survey welcome message is not translated on registration page (theme and language registration)
Description

To make the registration page more user friendly I want to add the survey welcom message on top.

I copied the welcome div element from welcome.twig to register_messsage.twig
<div class="{{ aSurveyInfo.class.welcome }} text-primary" {{ aSurveyInfo.attr.welcome }}>
{{ processString(aSurveyInfo.welcome,1) }}
</div>

That displayed indeed the welcome message in the main survey language (FR in my case), but it does not get translated when I switch to another language (DE in my case)... whereas translation happens with no problem on the welcom page.

Denis suggested on the forum this might be an issue with language badly set in register.

Steps To Reproduce
  • create a survey with FR as main language, DE as second.
  • add any text as survey welcome message, different in both languages
  • edit the template registration message file to add the welcome message (your-theme/views/subviews/registration/register_message.twig), eg per sample given below for fruity.
  • activate survey, with token to activate registration page
  • try to register... and see that welcome message always displays in FR, even if you set language to DE.
Additional Information

sample content for your-theme/views/subviews/registration/register_message.twig, to test

{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.

(¯`·._.·(¯`·._.· Registration message._.·´¯)·._.·´¯)

If there is a message on the registration page, like &quot;Survey has not started, or Register now! here it is displayed

#}

{% if registerSuccess %}
<p {{ aSurveyInfo.attr.registermessageb }} >{{ gT("Thank you for registering. You will receive an email shortly.") }}</p>
{% else %}
<div class="{{ aSurveyInfo.class.welcome }} text-primary" {{ aSurveyInfo.attr.welcome }}>
{{ processString(aSurveyInfo.welcome,1) }}
</div>

{% if sStartDate %}
&lt;p {{ aSurveyInfo.attr.registermessagea }} > {{ gT(&quot;You may register for this survey but you have to wait for the {{sStartDate}} before starting the survey.&quot;) }}</p>
{% else %}
&lt;p  {{ aSurveyInfo.attr.registermessageb }} >{{ gT(&quot;You may register for this survey if you wish to take part.&quot;) }}</p>
{% endif %}
&lt;p  {{ aSurveyInfo.attr.registermessagec }} >{{ gT(&quot;Enter your details below, and an email containing the link to participate in this survey will be sent immediately.&quot;) }}</p>

{% endif %}

{% if not empty(aSurveyInfo.aErrors) %}
<ul class='{{ aSurveyInfo.class.maincoldivdivbul }} alert alert-danger list-unstyled' {{ aSurveyInfo.attr.maincoldivdivbul }}>
{% for key, error in aSurveyInfo.aErrors%}
<li>{{ error }}</li>
{% endfor %}
</ul>
{% endif %}

Tagssurvey translation, template, translation
Bug heat6
Complete LimeSurvey version number (& build)3.19.1+191009
I will donate to the project if issue is resolvedNo
Browserchromium
Database type & versionMwSQL
Server OS (if known)Linux
Webserver software & version (if known)
PHP Version7

Users monitoring this issue

User List bebs

Activities

bebs

bebs

2019-11-01 22:24

reporter   ~54339

issue has been discussed briefly at https://www.limesurvey.org/forum/design-issues/119563-template-issue-survey-welcome-message-is-not-translated-on-registration-page#190602

bebs

bebs

2019-11-01 22:47

reporter   ~54340

demonstration survey FR-DE

bebs

bebs

2019-11-01 22:53

reporter   ~54341

bug is visible online (temporiraly) at http://emfro.vunderatert.lu/index.php/863857?newtest=Y&amp;lang=de ... see the small text line in french... should be German.

bebs

bebs

2019-11-01 22:54

reporter   ~54342

sorry... forgot to mention you need to enable public registration for the bug to be visible... otherwise registration page is not displayed.

gabrieljenik

gabrieljenik

2022-08-04 21:22

manager   ~71336

Hello bebs,
This ticket has been open for quite some time.
Do you have any new info / feedback?
Can you please check if this issue still exists in the latest version of LimeSurvey and let us know?
Thank you!

Issue History

Date Modified Username Field Change
2019-11-01 22:23 bebs New Issue
2019-11-01 22:24 bebs Note Added: 54339
2019-11-01 22:47 bebs File Added: limesurvey_survey_863857.lss
2019-11-01 22:47 bebs Note Added: 54340
2019-11-01 22:48 bebs Tag Attached: translation
2019-11-01 22:48 bebs Tag Attached: survey translation
2019-11-01 22:48 bebs Tag Attached: template
2019-11-01 22:53 bebs Note Added: 54341
2019-11-01 22:54 bebs Note Added: 54342
2019-11-01 23:31 bebs Issue Monitored: bebs
2019-12-03 15:43 cdorin Assigned To => cdorin
2019-12-03 15:43 cdorin Status new => assigned
2021-02-08 19:14 cdorin Assigned To cdorin =>
2021-02-08 19:14 cdorin Priority none => low
2021-02-08 19:14 cdorin Status assigned => acknowledged
2022-08-04 21:22 gabrieljenik Assigned To => gabrieljenik
2022-08-04 21:22 gabrieljenik Status acknowledged => feedback
2022-08-04 21:22 gabrieljenik Note Added: 71336
2022-08-04 21:22 gabrieljenik Bug heat 4 => 6