Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Translate Interface stuck on Loading translations...

Translate Interface stuck on Loading translations... 2 years 6 months ago #75130

  • mmirasol
  • mmirasol's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Karma: 0
Hello,

I have a survey which only displays Loading translations... when I try to do a quick translate.

The survey is done in the english language so I added French and tried to do a quick translate of all the fields, but the translate interface does not load.

My guess is that this happens because of the custom .js in questions because after I took out the .js code, the translate interface loaded quickly.

Please advise. I'm currently using Version 1.91+ Build 12416. Thanks.
The administrator has disabled public write access.

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75135

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Sorry, it is a more fundamental problem. The Google Translate API is no longer free, so the connections to the free service no longer work.

Google Translate does offer a paid service, but LS would need to be tweaked to let you enter your Google Translate account information so that you could connect in that fashion.
The administrator has disabled public write access.

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75136

  • mmirasol
  • mmirasol's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Karma: 0
So it has to connect to Google Translate first before the pages load up? I mean the tabs and pages do not show at all. I'm not referring to the auto-translate function.

I'm stuck after I click Tools > Quick translation unless I take out the .js in the questions first.
Last Edit: 2 years 6 months ago by mmirasol.
The administrator has disabled public write access.

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75150

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6277
  • Thank you received: 801
  • Karma: 241
TMSWhite wrote:
Sorry, it is a more fundamental problem. The Google Translate API is no longer free, so the connections to the free service no longer work.

Google Translate does offer a paid service, but LS would need to be tweaked to let you enter your Google Translate account information so that you could connect in that fashion.
Something i don't understand : google translate don't have to be called at page show, only after a "Auto translate" button ?

I don't like to call google each time i open this page.

mmirasol :
Please test if the problem still exists at the latest release. If so please open a ticket at the bugtracker and...
  1. Give as much information as possible
  2. Attach your survey. You can mark your ticket "private" so that only the developers will be able to take a look at it.
  3. Provide step-by-step instructions how to reproduce the problem.
  4. If possible/helpful please provide screenshots

Afterwards please post the link to the bugtracker so we can follow the progress.

Thanks!

:)
The administrator has disabled public write access.

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75188

  • mmirasol
  • mmirasol's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Karma: 0
Hello Shnoulle,

Thanks for replying. =) I updated my version of lime to Version 1.91+ Build 120226 and still experienced the same thing.

I reviewed my code and saw that it only does this if the .js involves jquery manipulation of objects which are not displayed in the translate interface.

This is the part of my code that made the translate interface stick to Loading translations...
if(error_log == ''){
$('div.q3 td.answer input.radio')[0].checked = true;
}
else{
$('div.q3 td.answer input.radio')[1].checked = true;
$('div.q3 p.comment textarea').val(error_log);
}
I use this code to indicate whether the respondent passes the screening test and to populate the comment box with the reason if the respondent is not qualified. please see attached image.
Attachments:
Last Edit: 2 years 6 months ago by mmirasol.
The administrator has disabled public write access.

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75192

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6277
  • Thank you received: 801
  • Karma: 241
Oh yes !

We don(t have to translate script by default i think. Scripting in HTML editor can make very bad think.

I think the best is to deactivate HTML editor for user if you use a lot of scripting. See Default HTML editor mode: in global settings.

Denis
The administrator has disabled public write access.

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75213

  • mmirasol
  • mmirasol's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Karma: 0
Yes, Shnoulle. I still can't load the translate interface after changing the default html editor. Any suggestions on how I could separate the code from the text properly?

Can this be considered a bug?
The administrator has disabled public write access.

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75235

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4139
  • Thank you received: 767
  • Karma: 349
I don't think it's a bug with LimeSurvey.

Try this for your JavaScript:
if(error_log == ''){
	$('div.q3 td.answer input.radio:eq(0)').attr('checked', true);
}
else{
	$('div.q3 td.answer input.radio:eq(1)').attr('checked', true);
	$('div.q3 p.comment textarea').val(error_log);
}
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 6 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: mmirasol

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75321

  • mmirasol
  • mmirasol's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Karma: 0
Hello tpartner. Thank you. This code works. =) Can you explain what's different about this code and why it doesn't cause the issue in the translate interface?
The administrator has disabled public write access.

Re: Translate Interface stuck on Loading translations... 2 years 6 months ago #75325

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4139
  • Thank you received: 767
  • Karma: 349
Your code seems to be a mixture of pure JavaScript and jQuery which could cause JavaScript errors preventing the execution of any following JavaScript. The quick translate requires JavaScript to work.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: mmirasol
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.160 seconds
Donation Image