Translation bar not shown for the page after following a link |
|||||||||||
Issue descriptionChrome Version: 59.0.3071.102 (Official build) stable (64-bit) OS: iOS 10.3.3 (beta) What steps will reproduce the problem? (1) Set your device language to English (2) Navigate to https://ja.m.wikipedia.org/wiki/Yahoo!_JAPAN -> Translation bar offers to translate from Japanese to English (3) Tap [Translate] in the translation bar -> The page is translated into English (4) Tap any link (e.g., [portal site]) in the page What is the expected result? The second page is automatically translated into English, and it shows a translation bar to allow me to see the page in the original language (Japanese). Screenshot: https://photos.app.goo.gl/eHky4wwEHj9DwDiK2 What happens instead? The second page is automatically translated into English, but it doesn't show a translation bar. So I cannot revert the page back to Japanese. Even if I reload the page, it is still automatically translated into English.
,
Jul 14 2017
jzw@: Hmm it didn't for me. did you try the exact same page? It might be page dependent.
,
Jul 17 2017
michaeldo & eugenebut, please help triage this.
,
Jul 17 2017
,
Jul 17 2017
Yeah for me it always auto translates the second page without showing any translate UI. If I reload the page it'll be native again and show the initial translate UI.
,
Jul 21 2017
I investigated slightly and this is what I've found. Language detection is done in two ways: 1. HTML headers. content-lang and lang. 2. CLD (Chrome Language Detector?). This works by looking at a portion of the text in the page. In an untranslated page these two match and the language can be determined. But if a page is already translated, which happens when you go back to a cached page, the two methods now disagree and the language code is determined to be "und" (undetermined). This would prevent any UI from being presented. If navigating back is a cache miss, then the entire page is loaded again and now both methods match and the UI is presented normally. Hopefully this helps whoever looks at this from the translate team :)
,
Aug 8 2017
,
Aug 8 2017
Hey droger@, it seems you are most familiar with language_detection_util.cc, would you be able to advise on this issue?
,
Jan 30 2018
A specific case of crbug.gcom/795573
,
Jan 31 2018
Do you know if this is specific to iOS? If the analysis in comment #6 is right, then one solution could be to save the translation status of the page (including the original language probably) in the history, and use that when navigating back. This looks like relatively low priority, and I don't have time to work on this now unfortunately. Marking as available for now.
,
Jan 31 2018
,
Jan 31 2018
I believe this is iOS specific. If we can make it so after navigating back to a cached page, it initiates translation with state AFTER_TRANSLATE, then we'd be able to present to the user that the page has been translated.
,
Mar 7 2018
,
Mar 8 2018
,
Jul 19
,
Jul 19
,
Oct 29
Bulk assigning iOS-specific Translate bugs to ghendel@ for triage as per our discussion. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by jzw@chromium.org
, Jul 14 2017