Translation through Standalone should wait for page to finish loading

When a translator is incompatible with Chrome (or Safari), the page is sent to Standalone for translation (this is probably also broken on server). Standalone loads the page and appears to immediately start translation. However, as we've seen previously with automatic translation testing, some pages load a precursor page with little to no content. Standalone translation should wait a bit before translating the page.


Currently breaks in Chrome on

(there's no reason for the translator to be incompatible with Chrome, but it illustrates the problem)

Adding some debug code, I see that the following page is being translated by Standalone

<head>[...omitted...]</head><body><div style="visibility: hidden; height: 1px; width: 1px; position: absolute; z-index: 100000;" id="_atssh"><iframe id="_atssh227" title="AddThis utility frame" style="height: 1px; width: 1px; position: absolute; z-index: 100000; border: 0px; left: 0px; top: 0px;" src="//;tmr=load%3D1361949377996%26core%3D1361949378072%26main%3D1361949378149%26ifr%3D1361949378154&amp;cb=0&amp;cdn=0&amp;chr=UTF-8&amp;kw=&amp;ab=-&amp;;;;dt=NASA%20Technical%20Reports%20Server%20-%20Study%20of%20thermal-expansion-molded%2C%20graphite-epoxy%20hat-stiffened%20sandwich%20panels&amp;dbg=0&amp;md=0&amp;cap=tc%3D0%26ab%3D0&amp;inst=1&amp;irt=0&amp;jsl=6&amp;prod=undefined&amp;lng=en-US&amp;ogt=&amp;pc=men&amp;pub=nasacasi&amp;ssl=0&amp;sid=512db2c25b1d842f&amp;srpl=0.00001&amp;srd=0&amp;srf=0.02&amp;srp=0.2&amp;srl=1&amp;srx=1&amp;ver=250&amp;xck=1&amp;xtr=0&amp;og=&amp;rev=119513&amp;ct=1&amp;xld=1&amp;xd=1"></iframe></div><script type="text/javascript" src=""></script></body>; looks like it might be a pretty popular service, so we are likely to run into this issue in the future. Even with compatible translators, this is probably an issue with the bookmarklet.

Introducing a general delay might be unnecessary (and depending on the delay would probably be quite annoying), so maybe we can add a translator property similar to "delay: true" for automatic testing. Or perhaps there is a way to detect when, say, no HTTP requests have been made (and none are active) from the page for a set amount of time before we begin translation.
Sign In or Register to comment.