Welcome, Guest
Username: Password: Remember me

TOPIC: Translation not taking

Translation not taking 3 years 9 months ago #56527

  • bmdavis
  • bmdavis's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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?
The administrator has disabled public write access.

Re: Translation not taking 3 years 9 months ago #56535

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
Hello, did you upload the po AND the mo files ?
The administrator has disabled public write access.

Re: Translation not taking 3 years 9 months ago #56556

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5426
  • Thank you received: 307
  • Karma: 252
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)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: bmdavis

Re: Translation not taking 3 years 9 months ago #56634

  • bmdavis
  • bmdavis's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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!
The administrator has disabled public write access.

Re: Translation not taking 3 years 9 months ago #56653

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5426
  • Thank you received: 307
  • Karma: 252
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Translation not taking 3 years 9 months ago #56744

  • bmdavis
  • bmdavis's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 17
  • Karma: 0
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.
The administrator has disabled public write access.

Re: Translation not taking 3 years 9 months ago #56777

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5426
  • Thank you received: 307
  • Karma: 252
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)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.217 seconds
Donation Image