Reset translate settings doesn't reset accept/denied/ignored counts |
|||||
Issue descriptionReset 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.
,
Jun 5 2017
,
Jun 5 2017
,
Jun 5 2017
,
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
,
Jun 26 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by martiw@chromium.org
, Jun 5 2017