Message after registering to a survey not showing on the standard language

More
8 months 2 weeks ago #166758 by cti_suzano
cti_suzano created the topic: Message after registering to a survey not showing on the standard language
Hello,

I have a survey set up to be publicly answerable. I can access the URL of the survey, fill in the Name/Surname/Email to register for the survey, and everything works fine, except that the message "Thank you ..." is shown in English.

Most of our users won't be able to comprehend this message, which prompt them to see their e-mails to get the link to answer the survey (actually, an enrollment requisition).

I need this message to use the pt-BR language file, which is the standard language of the survey. Where can I make this amend? Is there a hard coded string somewhere? I'm using the default fruity theme, and only found the message hard coded on the vanilla one... I get the URL basically like this limesurvey/index.php/registration/index.php?xxxxxx. (or something similar)

I'm using version Versão 3.6.1+180329, just updated yesterday to solve another problem!

Thank you for the attention!

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166759 by holch
holch replied the topic: Message after registering to a survey not showing on the standard language
Same answer as for your other questions: You need to adapt the translation file. I don't think it is hard coded (but I would not want to rule this out completely).

Currently Brazilian Portuguese is just 87% translated for version 3.x ( translate.limesurvey.org/projects/limesurvey-3/ ). We could definitely could need some help to get this to 100%. So ideally you login on the translation page (same login as for the forum) and add it there. However, it will take some time until it is approved and then included into the next version of Limesurvey. You can update your language files via po-edit, as described in the manual page on translating.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166760 by holch
holch replied the topic: Message after registering to a survey not showing on the standard language
However, I just searched for "Thank you" within the translation system and I couldn't find any section that might match your description.
translate.limesurvey.org/projects/limesu...y&sort%5Bhow%5D=desc

Could you post a screenshot of the page where you receive it? Ideally showing the URL where it appears. Maybe it IS hard coded (shouldn't be, but hey, things happen).

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166761 by tpartner
tpartner replied the topic: Message after registering to a survey not showing on the standard language
Where did you find it hard-coded in vanilla? Fruity is an extension of vanilla so you should be able to localize and edit that file.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166762 by cti_suzano
cti_suzano replied the topic: Message after registering to a survey not showing on the standard language
Hello!

I looked into the translation file (translate.limesurvey.org/projects/limesurvey-3/) for the message in English, but didn't find it!
The message is "Thank you for registering. You will receive an email shortly."
I tried only "Thank you for registering." to be sure, but didn't find it either. There is "Thank you for registering to participate in this survey." ...

Is there any other possibility of source to this message other than the locale files?

Thank you again!

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166763 by cti_suzano
cti_suzano replied the topic: Message after registering to a survey not showing on the standard language
Here goes the screenshot!
Attachments:

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166764 by cti_suzano
cti_suzano replied the topic: Message after registering to a survey not showing on the standard language
Well, I actually found it inside a gT(), so I believe Lime is trying to translate it, isn't it? I "grep" my limesurvey folder on the console and got this:

./themes/survey/vanilla/views/subviews/registration/register_message.twig: <p {{ aSurveyInfo.attr.registermessageb }} >{{ gT("Thank you for registering. You will receive an email shortly.") }}</p>
./tmp/assets/5713af3a/views/subviews/registration/register_message.twig: <p {{ aSurveyInfo.attr.registermessageb }} >{{ gT("Thank you for registering. You will receive an email shortly.") }}</p>
./tmp/runtime/twig_cache/5d/5d3001173f524ba4b3c9ac705f09fbe2948a189d5e9ec1de55d241df871c7cbb.php: echo $this->env->getExtension('Twig_Extension_Sandbox')->ensureToStringAllowed(gT("Thank you for registering. You will receive an email shortly."));

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166765 by tpartner
tpartner replied the topic: Message after registering to a survey not showing on the standard language
Yes, the gt() is a translation function but I cannot find that string in the .po file for your language either.

I don't have time tonight but if you're still stuck tomorrow I will describe how to create a custom theme where you can hard-code your own strings for that.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: LouisGac, cti_suzano

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166766 by cti_suzano
cti_suzano replied the topic: Message after registering to a survey not showing on the standard language
Ok!

I'll see what I manage to do!
Tomorrow I'll let you know!

Thank you!

Please Log in or Create an account to join the conversation.

More
8 months 2 weeks ago #166767 by cti_suzano
cti_suzano replied the topic: Message after registering to a survey not showing on the standard language
Hello!

I replaced the message on the Vanilla file with one in the translation file: "An email has been sent to the address you provided with access details for this survey. Please follow the link in that email to proceed."

It appeared translated and is very sufficient at the moment! But if you still have time tomorrow, I'll be glad to learn the procedure about custom themes!

Thank you very much for the help!

Please Log in or Create an account to join the conversation.

More
8 months 1 week ago #166768 by holch
holch replied the topic: Message after registering to a survey not showing on the standard language
I think this deserves a bug report, wouldn't it? The string should show up in the po file and in the translation tool.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: LouisGac, cti_suzano

Please Log in or Create an account to join the conversation.

More
8 months 1 week ago - 8 months 1 week ago #166800 by tpartner
tpartner replied the topic: Message after registering to a survey not showing on the standard language

I replaced the message on the Vanilla file with one in the translation file

It may work now but is prone to being overwritten when updating.

To do this in an update-proof custom theme...

1) Extend a core theme as described here - manual.limesurvey.org/New_Template_System_in_LS3.x

2) Copy the file /themes/survey/vanilla/views/subviews/registration/register_message.twig to the directory /upload/themes/survey/yourThemeName/views/subviews/registration/.

3) Edit /upload/themes/survey/yourThemeName/views/subviews/registration/register_message.twig as necessary.


If you need language-specific strings, you can do something like this in register_message.twig:

{% set registerMsg1 = {
        'en':		'Thank you for registering. You will receive an email shortly.', 
        'pt-BR':	'Portuguese-Br Thank you for registering...' 
    } 
%}
{% set registerMsg2 = {
        'en':		'You may register for this survey but you have to wait for the {{sStartDate}} before starting the survey.', 
        'pt-BR':	'Portuguese-Br You may register for this survey but you have to...' 
    } 
%}
{% set registerMsg3 = {
        'en':		'You may register for this survey if you wish to take part.', 
        'pt-BR':	'Portuguese-Br You may register for this survey if you wish...' 
    } 
%}
{% set registerMsg4 = {
        'en':		'Enter your details below, and an email containing the link to participate in this survey will be sent immediately.', 
        'pt-BR':	'Portuguese-Br Enter your details below...' 
    } 
%}
 
{% set lang = aSurveyInfo.sLanguage %}
 
{% if registerSuccess %}
    <p {{ aSurveyInfo.attr.registermessageb }} >{{ registerMsg1[lang] }}</p>
{% else %}
    {% if sStartDate %}
    <p {{ aSurveyInfo.attr.registermessagea }} > {{ registerMsg2[lang] }}</p>
    {% else %}
    <p  {{ aSurveyInfo.attr.registermessageb }} >{{ registerMsg3[lang] }}</p>
    {% endif %}
    <p  {{ aSurveyInfo.attr.registermessagec }} >{{ registerMsg4[lang] }}</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 %}

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 8 months 1 week ago by tpartner.
The following user(s) said Thank You: LouisGac, cti_suzano

Please Log in or Create an account to join the conversation.

More
8 months 1 week ago #166907 by holch
holch replied the topic: Message after registering to a survey not showing on the standard language
This seems to be happening in a few languages, so I created a bug report (couldn't find anything related in the bug tracker):
bugs.limesurvey.org/view.php?id=13577

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: cti_suzano

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!