- Posts: 8
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Message after registering to a survey not showing on the standard language
- cti_suzano
- Topic Author
- Offline
- New Member
Less
More
6 years 3 weeks ago #166758
by cti_suzano
Message after registering to a survey not showing on the standard language was created by cti_suzano
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!
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!
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
6 years 3 weeks ago #166759
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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.
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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
6 years 3 weeks ago #166760
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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).
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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
6 years 3 weeks ago #166761
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on 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.
The topic has been locked.
- cti_suzano
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
6 years 3 weeks ago #166762
by cti_suzano
Replied by cti_suzano on 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!
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!
The topic has been locked.
- cti_suzano
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
6 years 3 weeks ago #166763
by cti_suzano
Replied by cti_suzano on topic Message after registering to a survey not showing on the standard language
Here goes the screenshot!
Attachments:
The topic has been locked.
- cti_suzano
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
6 years 3 weeks ago #166764
by cti_suzano
Replied by cti_suzano on 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."));
./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."));
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
6 years 3 weeks ago #166765
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on 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.
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: cti_suzano
The topic has been locked.
- cti_suzano
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
6 years 3 weeks ago #166766
by cti_suzano
Replied by cti_suzano on 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!
I'll see what I manage to do!
Tomorrow I'll let you know!
Thank you!
The topic has been locked.
- cti_suzano
- Topic Author
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
6 years 2 weeks ago #166767
by cti_suzano
Replied by cti_suzano on 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!
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!
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
6 years 2 weeks ago #166768
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on 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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: cti_suzano
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
6 years 2 weeks ago - 6 years 2 weeks ago #166800
by tpartner
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:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Message after registering to a survey not showing on the standard language
It may work now but is prone to being overwritten when updating.I replaced the message on the Vanilla file with one in the translation file
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:
Code:
{% 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: 6 years 2 weeks ago by tpartner.
The following user(s) said Thank You: cti_suzano
The topic has been locked.