Check out the LimeSurvey source code on GitHub!

Translation not taking

More
6 years 2 weeks ago #56527 by bmdavis
I've tested this a number of ways and I cannot get the translation for the javascript mandatory question alert to display my updated translation (for vietnamese - vi). I'm using POedit per the instructions on the translation page, updating the translations then uploading to the correct location. The other fields I've tried changing work immediately (e.g. "Next" button), but I cannot get the mandatory question popup to update.

The stock English text is always showing up:
"One or more mandatory questions have not been answered. You cannot proceed until these have been completed"

Curiously, the final period does not show up either. I'm at a loss as to what is going on. I'm using LS 1.80 (6506). I'm sure I'll hear that version is two years old and you should update, but heavy customizations I've made make that impossible right now. Any suggestions?

Please Log in to join the conversation.

More
6 years 2 weeks ago #56535 by DenisChenu
Hello, did you upload the po AND the mo files ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
6 years 2 weeks ago #56556 by Mazi
Please check PHP files group.php, question.php, qanda.php and survey.php if the string is enclosed in the clang->gT function so it will be translated properly, e.g.:
echo "<p><span class='errormandatory'>" . $clang->gT("One or more mandatory questions have not been answered. You cannot proceed until these have been completed.") . "</span></p>";


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: bmdavis

Please Log in to join the conversation.

More
6 years 2 weeks ago #56634 by bmdavis
Thanks Mazi! Your suggestion was right on. I found the string in qanda.php. The issue was the last period mission, so it couldn't make a match with the string in the translation file. Once those two strings matched, everything worked. I grabbed updated translation files and I'm all set. Thanks again for the help!

Please Log in to join the conversation.

More
6 years 2 weeks ago #56653 by Mazi
Thanks for your feedback. Can you post the original line and the updated line of code so we can check if the problem still exists and we can fix it!?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
6 years 2 weeks ago #56744 by bmdavis

Mazi wrote: Thanks for your feedback. Can you post the original line and the updated line of code so we can check if the problem still exists and we can fix it!?


Here is the chunk of original code from the file qanda.php, lines 670-674 from version 1.80 (6506):
$popup="<script type=\"text/javascript\">\n
   <!--\n $(document).ready(function(){
      alert(\"".$clang->gT("One or more mandatory questions have not been answered. You cannot proceed until these have been completed", "js")."\");});\n //-->\n
   </script>\n";
      $mandatorypopup="Y";

All I changed to get my translations working was adding the final "." after the word "completed", then made sure all my relevant translation files had the same exact sting, including the final period. Apparently some of the translation files (some new and some old) implemented that string with or without the final period. Proper grammar (at least the European languages I'm familiar with) dictates a sentence should end in a period.

Please Log in to join the conversation.

More
6 years 2 weeks ago #56777 by Mazi
Fixed at 1.90...


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form