New issue
Advanced search Search tips

Issue 808754 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: ----
Type: Feature



Sign in to add a comment

Make "Always translate" feature more visible to frequent translators

Project Member Reported by yyushkina@chromium.org, Feb 3 2018

Issue description

We should show the "Always translate" checkbox more visibly in the Translate Bubble UI after the user accepts a translation 3 times per language.

In the current MacUI we show the "Always translate" option in the primary UI (vs. just in the overflow) after a user has accepted a translation for that language 3 times, thus making the feature more visible to frequent translators. The Always translate functionality is valuable to frequent translators because it saves them time and attention spans (i.e. decisions) by allowing them to "set it and forget it". We should maintain this visibility of the feature for Mac users when we switch to the Translate Bubble UI with MacViews and also provide the same "Always translate" feature visibility for Windows, Linux and ChromeOS users.


 
Screen Shot 2018-02-02 at 6.37.38 PM.png
841 KB View Download
Labels: M-66
Cc: markchang@chromium.org
Mark: FYI

Comment 3 by pbos@chromium.org, Feb 9 2018

Cc: bsep@chromium.org
Heads up,  issue 637098  will likely take a lot of my time before branch point. +bsep@ fyi as this is something that used to work in the Mac-only dialog but doesn't have an equivalent in views.

https://cs.chromium.org/chromium/src/components/translate/core/browser/translate_infobar_delegate.cc?type=cs&q=ShouldShowAlwaysTranslateShortcut&l=288

If this threshold (3 on desktop) is met a user has accepted the translation 3 times (without denying it I believe), and we should surface an "Always translate <language>" checkbox in the bubble view main view, even if the option is available in the options.

I'm not sure how easy it is to bring the code out from "infobar land" into something easilly accessible by translate_bubble_view.cc. It might be fairly easy and decent bang per buck outside of Mac as well.
If there are challenges with bringing the counting logic to views, we can start with Mac, and punt on other platforms to M67.

Comment 5 by pbos@chromium.org, Feb 9 2018

If the translate infobar is going away in favor of the views bubble it'll need to be brought over. I believe there shouldn't be anything that makes it easier to only make it available on Mac at this point.

Comment 6 by bsep@chromium.org, Feb 9 2018

Cc: pbos@chromium.org
Owner: bsep@chromium.org

Comment 7 by bsep@chromium.org, Feb 15 2018

Screenshot for https://chromium-review.googlesource.com/c/chromium/src/+/917641
translate-bubble-w-shortcut.PNG
6.6 KB View Download
That looks great! bsep@ - do you mind hold on before committing the change for a few days?

Comment 9 by bsep@chromium.org, Feb 16 2018

#8: I'm landing the patch now as per our offline discussion. pbos@ can follow up with any necessary tweaks.
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 17 2018

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

commit 630f1a9fd79d0d8bb73588edc40e0f60b5a460ae
Author: Bret Sepulveda <bsep@chromium.org>
Date: Sat Feb 17 00:05:54 2018

Show "Always Translate" on initial translation prompt for Views.

On Cocoa and mobile platforms we would ask the user if they want to
enable "Always Translate" on the initial prompt after they accepted the
translation enough times. This patch adds that capability, in the form
of a checkbox on the translate bubble, to Views platforms.

Bug:  808754 
Change-Id: I70149c0e077d70d64a6b6e26f5599a6c39cefda4
Reviewed-on: https://chromium-review.googlesource.com/917641
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Rachel Blum <groby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537470}
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/chrome/browser/ui/translate/translate_bubble_model.h
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/chrome/browser/ui/translate/translate_bubble_model_impl.cc
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/chrome/browser/ui/translate/translate_bubble_model_impl.h
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/chrome/browser/ui/views/translate/translate_bubble_view.cc
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/chrome/browser/ui/views/translate/translate_bubble_view_unittest.cc
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/components/translate/core/browser/mock_translate_driver.cc
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/components/translate/core/browser/mock_translate_driver.h
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/components/translate/core/browser/translate_infobar_delegate.cc
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/components/translate/core/browser/translate_infobar_delegate.h
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/components/translate/core/browser/translate_prefs.h
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/components/translate/core/browser/translate_ui_delegate.cc
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/components/translate/core/browser/translate_ui_delegate.h
[modify] https://crrev.com/630f1a9fd79d0d8bb73588edc40e0f60b5a460ae/components/translate/core/browser/translate_ui_delegate_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment