New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 854403 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocked on:
issue 46566



Sign in to add a comment

Disabling JavaScript or NoScript previews break translate functionality

Project Member Reported by sclit...@chromium.org, Jun 19 2018

Issue description

Chrome Version: 69.0.3457.4, although this bug probably exists in previous versions of Chrome too
OS: Android

What steps will reproduce the problem?
(1) Either:
- Disable JavaScript in Chrome's site settings, or
- Set chrome://flags to force NoScript previews to activate: "Previews Allowed"="Enabled", "NoScript previews"="Enabled", "Override effective connection type"="Slow 2G", "Optimization Hints"="Disabled"
(2) Load a page that has some foreign text on it, e.g. cartolafc.globo.com
(3) Click on the "English" option in the translate infobar that pops up

What is the expected result?

Page gets translated eventually.

What happens instead?

The spinner on the translate infobar spins forever, never translating anything.

I'd guess that this is because the translate feature works by injecting JavaScript into the page, which doesn't work when script is disabled.
 
Blockedon: 46566
Cc: anthonyvd@chromium.org
Looks like an old known issue for user disabling JS: https://bugs.chromium.org/p/chromium/issues/detail?id=46566

But this breaking for NoScript Preview as well may make this old issue more important to resolve if we want to fully launch NoScript.
Just a heads up that the Translate team is currently much smaller than it used to and that bug is pretty low on our list. I'll happily help guide someone who wants to tackle this but waiting on it to be fixed might not be realistic for the NoScript Preview timeline.

Comment 3 by bengr@chromium.org, Jun 20 2018

For previews, it might make sense to reload the original page whenever the user chooses to translate.
Re #3: Loading the original page if the user clicks translate would be an inconsistent user experience with how translate normally works, so that's probably not ideal.

I wonder if it's possible to just temporarily enable scripts on the page if the user clicks the translate infobar.
Labels: -Pri-3 Pri-2
Another approach for the list would be to disable translate for the Preview (if that is readily possible). It would have a side benefit of not having competing info bars.
@c5 - but then the user will not be able to translate preview content into a language they actually understand. That doesn't sound like a good idea to me.
Does the translation feature work when JavaScript is disabled by the user in Chrome settings?
Tarun, no it doesn't. That is how Scott first discovered it and there is a known bug on that - 46566. 

yyushkina, for a Preview, it may make more sense to load the original page if the user expresses such interest in the page which is what bengr@ suggested in c3. So maybe ideally selecting the translate action would both load original page and trigger translate. The suggestion in c5 is more about only providing the Show Original action which if the user presses, they will then see the translate infobar on the original page. Perhaps less ideal but at least user has a workable path.
Cc: dougarnett@chromium.org
Owner: aposner@chromium.org
Ariel, we could use some Previews product guidance on this issue - how should Translate and Previews interact? This bug is about a specific issue with NoScript Preview not working with Translate (since Translate uses JS). But I also wonder more generally would we want to let the user translate a Preview? Or should we take whatever user interest we have to load the original page which could be subject to translation?
Is it possible to temporarily enable scripts for Translate only? I think it'd also be a strange experience if other scripts worked temporarily and then the page changed state to not interactive again.
Maybe. There is some mention in the associated known-issue 46566 (see comment 14) that translate.js is run in its own v8 context. 

If so, would we want to try to do that for the Previews use case - to allow Previews to be translated? That is, invest more network resources on the Preview instead of working toward the original page? Seems like a pretty interesting question.
Ah, it seems like this is just once case where Translate doesn't work for users who have JS disabled. Would fixing https://bugs.chromium.org/p/chromium/issues/detail?id=46566 fix this bug also?
Yes, fixing it should allow the Preview to be translated. That bug has been open since 2010 and perhaps the use case of a user disabling script was not strong enough case to prioritize fixing it. The NoScript Preview is a new use case so fixing that bug is one approach - especially if it makes sense for Previews to be translated from a product point of view. If translating a Preview doesn't particularly make sense in a slow network preview-triggering situation, then there are a couple other ideas listed in this bug. This product feature trade-off is what I'm seeking guidance on.

Comment 14 Deleted

I think it's be a bit of a mental leap for users to tie disabling JS with Translate not working, so if they express an intent to translate, I think it makes sense to override that setting. 

Requesting to translate seems like a separable intent from Show Original, which means the page UI is broken in some way besides it just not being in your language. I think it might be strange to tie the two actions together, so if a user taps translate, it should translate but not load the original, and vice versa. 

My hunch is that we should avoid conflating the two - @Yana, does this seem reasonable?
Cc: yyushkina@chromium.org
Sorry Ariel - I wasn't cc'ed on the bug so didn't see your comment.  I agree with you. Translations and showing original vs. preview should not be conflated, and translation should still work.
Ok, sounds like 46566 should be fixed in order to resolve this issue then.
Refreshed during triage.
Cc: aposner@chromium.org
Owner: dougarnett@chromium.org
Reassigning to you Doug since product decision here has been settled, though feel free to reassign if there is a more suitable owner here!
Blocked on crbug.com/46566
Refreshed during triage
Labels: -Pri-2 Pri-3
Blocking bug is P3, so it seems we should make this P3 too.

Comment 23 by tbansal@chromium.org, Jan 18 (4 days ago)

Labels: -Pri-3 M-74 Pri-2
Lets add UKM/UMA to understand what's the impact.

Sign in to add a comment