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

Issue 742669 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug



Sign in to add a comment

Translation bar not shown for the page after following a link

Project Member Reported by ichikawa@chromium.org, Jul 14 2017

Issue description

Chrome 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.

 

Comment 1 by jzw@chromium.org, Jul 14 2017

If I reload a translated page, it is shown in the native language with the translation prompt again.
jzw@: Hmm it didn't for me. did you try the exact same page? It might be page dependent.

Comment 3 by pkl@chromium.org, Jul 17 2017

Cc: michaeldo@chromium.org eugene...@chromium.org
michaeldo & eugenebut, please help triage this.
Cc: -michaeldo@chromium.org
Components: -UI>Browser>Translate -UI>Browser>Language>Translate Mobile>iOSWebView
Owner: michaeldo@chromium.org
Status: Assigned (was: Untriaged)

Comment 5 by jzw@chromium.org, 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.

Comment 6 by jzw@chromium.org, 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 :)


Comment 7 by jzw@chromium.org, Aug 8 2017

Owner: droger@chromium.org

Comment 8 by jzw@chromium.org, 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?
A specific case of crbug.gcom/795573
Cc: droger@chromium.org
Components: UI>Browser>Language>Translate
Owner: ----
Status: Available (was: Assigned)
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.
Cc: sdefresne@chromium.org

Comment 12 by jzw@chromium.org, 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.
Cc: yyushkina@chromium.org anthonyvd@chromium.org
Labels: -Pri-2 Pri-3

Comment 14 by jzw@chromium.org, Mar 8 2018

Cc: jzw@chromium.org
Labels: -Pri-3 Pri-2
Labels: Hotlist-TranslateiOS
Owner: ghendel@chromium.org
Status: Assigned (was: Available)
Bulk assigning iOS-specific Translate bugs to ghendel@ for triage as per our discussion.

Sign in to add a comment