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

Issue 728930 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Reset translate settings doesn't reset accept/denied/ignored counts

Project Member Reported by martiw@chromium.org, Jun 2 2017

Issue description

Reset translate settings doesn't reset accept/denied/ignored counts.

Steps to reproduce: 
1. The system language of my device is English and Chinese.
2. In Chrome, I browse a Japanese website
3. use the translate infobar to translate the website to English.
   (TranslationAcceptedCount of Japanese is incremented to 1.)
4. I then reset Translate Settings by:
   Chrome Overflow menu -> Settings -> Site settings ->
   Google Translate -> Reset Translate Settings.

Observed behavior:
only the TranslationAcceptedCount of Chinese and English
was reset to 0.
TranslationAcceptedCount of Japanese still remains 1.

Expected behavior:
TranslationAcceptedCount of Japanese should be reset to 0.

Root cause:
In translate_prefs.cc, ResetToDefaults()
Only the counters in the language of GetLanguageList will be reset.
However, GetLanguageList gets languages from accept_languages_pref_
(Chinese, English) instead of all the languages ever translated
(Japanese in the case above).

Same issue happens to TranslationDeniedCount and TranslationIgnoredCount.
 
Summary: Reset translate settings doesn't reset accept/denied/ignored counts (was: Reset translate settings doesn't take effect on Nexus 5)
Status: Started (was: Untriaged)
Description: Show this description
Description: Show this description
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 25 2017

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

commit c09df0ce5984176ea0590a779ab15c6ce54e4731
Author: martiw <martiw@chromium.org>
Date: Sun Jun 25 06:30:31 2017

Reset counters for all language when reset translate settings.

When I reset translate settings,
(menu -> Settings -> Site settings -> Translate -> Reset)
The accepted/denied/ignored counters of all languages should
be reset to 0.

However, currently, only the counters of the languages in accept_languages_pref_ will be reset.

Accepted languages means "languages the user understands or does not want translated".

But Denied, Ignored, Accepted counters are for those languages user might not understand.  That's why some counters are not reset in that For-loop.

BUG= 728930 

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

[modify] https://crrev.com/c09df0ce5984176ea0590a779ab15c6ce54e4731/components/translate/core/browser/translate_prefs.cc

Comment 6 by martiw@chromium.org, Jun 26 2017

Labels: -Pri-1 Pri-3
Status: Fixed (was: Started)

Sign in to add a comment