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

Issue 855192 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 872096
Owner:
Closed: Aug 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

By default, Translate won't offer to translate pages in UI language

Project Member Reported by nicolaso@chromium.org, Jun 21 2018

Issue description

Chrome Version: 67.0.3396.87
OS: Linux

What steps will reproduce the problem?
(1) Open a new Chrome profile to have clean user settings.
(2) Go to chrome://settings/languages
(3) Add a non-English language to the language list, and leave your UI language (in my case, English) in the list.
(4) Try to check 'Offer to translate pages in this language' for your UI language

What is the expected result?

I would expect 'Offer to translate ...' to be allowed for your UI language when other languages are available.

This would allow webpages in your UI language to be translated to the next language in the list (or whatever LanguageModel thinks it should translate to).

What happens instead?

The 'Offer to  translate...' checkbox is greyed out. See attached screenshot.

This would be particularly important in countries like India, where a user may have the browser UI in English, but not be proficient enough to always browse the web in English.
 
Screenshot from 2018-06-21 16-22-51.png
21.4 KB View Download
Status: Assigned (was: Untriaged)
Labels: -Pri-3 Target-69 Pri-2
Merging into 68 would be even better given the IN experiment.
Labels: OS-Android OS-Chrome OS-Mac OS-Windows
Cc: michae...@chromium.org ranjitkan@chromium.org sureshkumari@chromium.org nyerramilli@chromium.org jmukthavaram@chromium.org rbasuvula@chromium.org msrchandra@chromium.org claudiomagni@chromium.org
 Issue 719435  has been merged into this issue.

Comment 6 Deleted

Project Member

Comment 7 by bugdroid1@chromium.org, Jul 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a819220a37ff400c8388e7e4f5a71b78230afc2d

commit a819220a37ff400c8388e7e4f5a71b78230afc2d
Author: Nicolas Ouellet-payeur <nicolaso@chromium.org>
Date: Mon Jul 09 18:37:43 2018

Add LanguageModelManager

This will be a KeyedService that could be used manage multiple LanguageModel objects (which are
not KeyedServices anymore).

This also gives us a place to put per-profile initialization logic for Translate.

Bug:  855192 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: If048ddcaacc91ae5b58a14d66020d5fe4db7d50f
Reviewed-on: https://chromium-review.googlesource.com/1121036
Reviewed-by: Michael Martis <martis@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573377}
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/BUILD.gn
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc
[rename] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/language/language_model_manager_factory.cc
[rename] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/language/language_model_manager_factory.h
[rename] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/language/language_model_manager_factory_unittest.cc
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/renderer_context_menu/render_view_context_menu.cc
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/browser/translate/chrome_translate_client.cc
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/chrome/test/BUILD.gn
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/components/language/core/browser/BUILD.gn
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/components/language/core/browser/language_model.h
[add] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/components/language/core/browser/language_model_manager.cc
[add] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/components/language/core/browser/language_model_manager.h
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/chrome/browser/browser_state/browser_state_keyed_service_factories.mm
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/chrome/browser/language/BUILD.gn
[rename] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/chrome/browser/language/language_model_manager_factory.cc
[rename] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/chrome/browser/language/language_model_manager_factory.h
[rename] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/chrome/browser/language/language_model_manager_factory_unittest.cc
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/chrome/browser/translate/BUILD.gn
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/chrome/browser/translate/chrome_ios_translate_client.mm
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/web_view/BUILD.gn
[rename] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/web_view/internal/language/web_view_language_model_manager_factory.cc
[rename] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/web_view/internal/language/web_view_language_model_manager_factory.h
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/web_view/internal/translate/web_view_translate_client.mm
[modify] https://crrev.com/a819220a37ff400c8388e7e4f5a71b78230afc2d/ios/web_view/internal/web_view_browser_state.mm

Is this fixed?
This patch is only a first step towards a fix, but doesn't fix the issue.

Turns out we have a bunch of places in the code that _assume_ they can't translate UI language to anything else. Respecting user preference while keeping the current default (UI language is blacklisted) probably requires adding logic at startup.

Mostly, this patch just adds a (clean) place to run code during Translate's startup (after prefs are initialized). So, it doesn't fix the bug.
Owner: anthonyvd@chromium.org
Reassigning to anthonyvd@
Mergedinto: 872096
Status: Duplicate (was: Assigned)
I think we should tackle this via 872096 (allowing users to toggle Offer to translate for the UI language IF they have another target language chosen) so duping this big into that one 
Cc: frechette@chromium.org

Sign in to add a comment