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

Issue 649551 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug


Sign in to add a comment

MD Settings: Need setting to enable/disable Translate

Project Member Reported by michae...@chromium.org, Sep 23 2016

Issue description

Options has a checkbox in Languages to enable/disable Translate when the Translate API is available:

"Offer to translate pages that aren't in a language you read."

We need something similar for MD Settings. Just not sure where to put it as the Languages section doesn't have a very natural spot for it.

(This is different from the per-language Translate setting; normally, adding a language means we won't translate it even if the user has Translate enabled, so we give the option to explicitly whitelist an added language for translation.)


 

Comment 1 by ftang@chromium.org, Sep 26 2016

sorry, what is MD Settings?
the new Material Design Settings page in Chrome, to be launched fairly soon. chrome://md-settings

The Translate option just needs to be added here, for parity with the existing chrome://settings page (which we tend to call "Options" for disambiguation with "MD Settings").
Blockedon: -614588 -614589
Blocking: 671375 614588 614589
whoops

Comment 4 by dbeam@chromium.org, Jan 10 2017

Cc: bettes@chromium.org
Labels: -Pri-2 -OS-All Hotlist-MD-Settings-Languages OS-Linux OS-Mac OS-Windows Pri-1
Owner: dbeam@chromium.org
yeah, this is a big deal
@bettes, can this just be a toggle switch at the bottom of the Languages section?
Labels: M-58

Comment 7 by dbeam@chromium.org, Jan 24 2017

Cc: -bettes@chromium.org dbeam@chromium.org
Owner: bettes@chromium.org
Blocking: 684849
Labels: OS-Chrome

Comment 9 by bettes@chromium.org, Jan 30 2017

Owner: michae...@chromium.org
Assigning this back to Michael. An additional row in the languages drawer SGTM. Mocks attached.*

I've commented in the design audit (row 72) that the "Order your languages..." string shouldn't be indented anymore, so I've updated the mocks to reflect that. Not sure if scott or you would address this but just an fyi. 

https://folio.googleplex.com/chrome-ux-specs-and-sources/Chrome%20Inner%20Pages/03-Settings/preview/cards#%2FPREVIEW-Language-1.png%3Fz=width&c=show

Audit:
https://docs.google.com/spreadsheets/d/17uvG_CTZ7N16B7hSdobwSc8VQO6xFPk2Q3Hz4dbKrx4/edit#gid=0
Screen Shot 2017-01-30 at 1.49.07 PM.png
47.6 KB View Download

Comment 10 by dbeam@chromium.org, Jan 30 2017

Owner: scottchen@chromium.org
Status: Started (was: Assigned)
michaelpg@, dbeam@ while I'm working on this bug, I came across your previous CL: https://chromium.googlesource.com/chromium/src/+/c3b245a46107e57dd0ef8ace954adf648a900ab4

..I want to double check the logic here:
See here: https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/languages_page/languages_page.html?type=cs&q=languages_page&sq=package:chromium&l=234

1) It seems like you've coded it such that "offer translation for this language" to only show up when `prefs.translate.enabled` is true, which implies that `prefs.translate.enabled` controls all translations, regardless of whether the user added it to the list or not.
2) The old language page has the input bound to "prefs=translate.enabled" and the label text says "offer translations for pages that aren't in the languages you read", i.e. "enable this pref = controls translations of languages that aren't in this list"

It seems to me that 1) and 2) contradict each other? I feel like either
- the "hidden$=" for the "translate this lang" shouldn't be bound to prefs.translate.enabled, or
- the label for that toggle on the old settings page is wrong; it should be "do you want any translations at all?" or something.

..or I'm missing something. Thoughts?

On second thought, I guess the label and hidden would make sense, if when user says "no, don't translate the languages I don't read", we automatically assume they also don't want us to translate languages that they do read.
Pseudocode for the omnibox feature would be:

  if "translate.enabled" pref == true:
    if current_page.language not in translate_blocked_languages:
      ShowTranslatePrompt()

The "translate.enabled" pref enables or disables the prompt in the omnibox offering to translate a page. The "translate_blocked_languages" pref is a list of languages we should never show that prompt for. In JS we apply it to each language's model.[1]

When you add a language to your language list, we assume you read that language, so we add it to a list of languages to never offer to translate. Similarly, if you get that prompt for a language you don't have and choose "Never offer to translate this language", we add that language to your language list.

Your comment in #13 is correct but that's not really how we look at it. Really, the label would be more accurate if it said "Offer translations for pages that aren't in the languages you read (as well as languages you do read, if you specify below that you want them translated as an exception)".

[1] https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/languages_page/languages.js?type=cs&q=translate.*blocked&sq=package:chromium&l=249-265
Project Member

Comment 15 by bugdroid1@chromium.org, Feb 2 2017

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

commit 4adbb6c12faa2a355d080b12f832d82a7543153e
Author: scottchen <scottchen@chromium.org>
Date: Thu Feb 02 00:58:01 2017

MD Settings: Migrate enable-translation toggle from non-MD settings page.

Add a toggle on the language page to enable translation of pages, which existed on the old settings page.

BUG= 649551 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2663083002
Cr-Commit-Position: refs/heads/master@{#447663}

[modify] https://crrev.com/4adbb6c12faa2a355d080b12f832d82a7543153e/chrome/app/settings_strings.grdp
[modify] https://crrev.com/4adbb6c12faa2a355d080b12f832d82a7543153e/chrome/browser/resources/settings/languages_page/languages_page.html
[modify] https://crrev.com/4adbb6c12faa2a355d080b12f832d82a7543153e/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
[modify] https://crrev.com/4adbb6c12faa2a355d080b12f832d82a7543153e/chrome/test/data/webui/settings/languages_page_browsertest.js

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified on 9426.0.0 / 59.0.3055.0 ChromeOS
Components: -UI>Browser>Translate UI>Browser>Language>Translate

Sign in to add a comment