Brave Team Disabled it:
opened 04:09PM - 29 Nov 22 UTC
closed 06:57PM - 05 Dec 22 UTC
QA Pass-macOS
priority/P2
QA/Yes
release-notes/exclude
OS/Android
QA Pass - Android ARM
OS/Desktop
brave-translate
<!-- Have you searched for similar issues? Before submitting this issue, please … check the open issues and add a note before logging a new issue.
PLEASE USE THE TEMPLATE BELOW TO PROVIDE INFORMATION ABOUT THE ISSUE.
INSUFFICIENT INFO WILL GET THE ISSUE CLOSED. IT WILL ONLY BE REOPENED AFTER SUFFICIENT INFO IS PROVIDED-->
## Description
Temporarily disable auto translate in Brave Translate by hiding the ui checkbox and menu option as well as disabling the setting for those who have previously checked the setting to on.
Place auto translate feature behind a flag that where rollout of the feature can be controlled via griffin.
## Expected result:
1. Visit a page that invokes a Brave Translate
2. Ensure the checkbox and options to translate are not available.
## Current result:
<img width="346" alt="Screenshot 2022-11-23 at 3 22 41 PM" src="https://user-images.githubusercontent.com/5951041/204581733-e8dbf1e9-87e4-41de-912b-7143067e2eb1.png">
<img width="504" alt="screenshot_2022-11-23_at_1 39 33_pm" src="https://user-images.githubusercontent.com/5951041/204581736-e71c940e-980b-47c3-8574-bcb622e4736b.png">
## Desktop Brave version:
Targeted for 1.46.x
## Android Device details:
- Install type (ARM, x86):
- Device type (Phone, Tablet, Phablet):
- Android version:
## Version/Channel Information:
- Can you reproduce this issue with the current release? yes
- Can you reproduce this issue with the beta channel? yes
- Can you reproduce this issue with the nightly channel? yes
## Other Additional Information:
- Does the issue resolve itself when disabling Brave Shields? n/a
- Does the issue resolve itself when disabling Brave Rewards? n/a
- Is the issue reproducible on the latest version of Chrome? n/a
## Miscellaneous Information:
but they never added the flag to enable it or control it, and they never added the option to do it from the UI like it seems they would have done based on this:
brave:master
← brave:add-flag-to-control-autotranslate
opened 02:52PM - 01 Dec 22 UTC
Resolves https://github.com/brave/brave-browser/issues/27040
## Submitter Che… cklist:
- [x] I confirm that no security/privacy review [is needed](https://github.com/brave/brave-browser/wiki/Security-reviews), or that I have [requested](https://github.com/brave/security/issues/new/choose) one
- [x] There is a [ticket](https://github.com/brave/brave-browser/issues) for my issue
- [x] Used Github [auto-closing keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) in the PR description above
- [x] Wrote a good [PR/commit description](https://google.github.io/eng-practices/review/developer/cl-descriptions.html)
- [x] Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
- [x] Added appropriate labels (`QA/Yes` or `QA/No`; `release-notes/include` or `release-notes/exclude`; `OS/...`) to the associated issue
- [ ] Checked the PR locally: `npm run test -- brave_browser_tests`, `npm run test -- brave_unit_tests`, `npm run lint`, `npm run gn_check`, `npm run tslint`
- [x] Ran `git rebase master` (if needed)
## Reviewer Checklist:
- [ ] A security review [is not needed](https://github.com/brave/brave-browser/wiki/Security-reviews), or a link to one is included in the PR description
- [ ] New files have MPL-2.0 license header
- [ ] Adequate test coverage exists to prevent regressions
- [ ] Major classes, functions and non-trivial code blocks are well-commented
- [ ] Changes in component dependencies are properly reflected in `gn`
- [ ] Code follows the [style guide](https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md)
- [ ] Test plan is specified in PR before merging
## After-merge Checklist:
- [ ] The associated issue milestone is set to the smallest version that the
changes has landed on
- [ ] All relevant documentation has been updated, for instance:
- [ ] https://github.com/brave/brave-browser/wiki/Deviations-from-Chromium-(features-we-disable-or-remove)
- [ ] https://github.com/brave/brave-browser/wiki/Proxy-redirected-URLs
- [ ] https://github.com/brave/brave-browser/wiki/Fingerprinting-Protections
- [ ] https://github.com/brave/brave-browser/wiki/Brave%E2%80%99s-Use-of-Referral-Codes
- [ ] https://github.com/brave/brave-browser/wiki/Custom-Headers
- [ ] https://github.com/brave/brave-browser/wiki/Web-Compatibility-Exceptions-in-Brave
- [ ] https://github.com/brave/brave-browser/wiki/QA-Guide
- [ ] https://github.com/brave/brave-browser/wiki/P3A
## Test Plan:
A new feature `BraveEnableAutoTranslate` is introduced. The feature is **enabled** by default.
The feature controls: 1) core logic that triggers auto-translate 2) UI elements on Desktop&Android.
Only one out of 3 desktop platform could be checked (the code is common).
The scenarios:
**Default** (Desktop & Android) nothing should be changed in auto-translate if the feature is enabled(the default). Auto-translation works, UI elements are shown.
**UI elements** (Desktop & Android) With the feature disabled the UI elements in the translate bubble **related to auto-translation** should be hidden. The option named "never translate <lang>" should be still visible and works.
**Auto-translate is enabled before** (Desktop & Android)
1. Launch the browser without feature disabled (default);
2. Enable auto-translate `fr => en` (via the translate bubble on fr.wikipedia.org for example);
3. Close the tab and open it again, check that auto-translate works for fr.wikipedia.org;
4. Relaunch the browser with the feature disabled (`--disable-features=BraveEnableAutoTranslate`);
5. Check that auto-translate doesn't work for fr.wikipedia.org.
**Auto enabling auto-translate** (Android)
1. Launch the browser without feature disabled (default);
2. Auto-translate some French page 3 times (for example 3 tabs with fr.wikipedia.org) and check that auto-translation for `fr=> <your lang>` has been enabled automatically on the 3rd attempt;
3. Clean the app data;
4. Launch the browser with the feature disabled (`--disable-features=BraveEnableAutoTranslate`);
5. Repeat step 2 and check that auto-translation wasn't enabled.
The screenshots of related UI elements:
<img width="427" alt="Screenshot 2022-11-24 at 18 14 07" src="https://user-images.githubusercontent.com/45488748/205645906-1d90201a-7bc9-4d9d-9aa2-c864987f1aad.png">
<img width="324" alt="Screenshot 2022-12-02 at 19 29 31" src="https://user-images.githubusercontent.com/45488748/205645911-a7e37418-2ea8-49c1-bc1e-3647bca695a8.png">
rg (=user's action is required to translate the page).
<img width="552" alt="Screenshot 2022-11-24 at 18 12 53" src="https://user-images.githubusercontent.com/45488748/205645895-529edfad-42cb-44cf-84be-bb6be4bcd2c4.png">
Anyway, you can enable it back if you start brave with --enable-features=BraveEnableAutoTranslate
But for example, they roll features with ‘variations’ and example, my brave://version will say BraveAutoTranslateStudy:AutoTranslateDisabled
opened 02:59PM - 06 Dec 22 UTC
b-c issue: https://github.com/brave/brave-browser/issues/27040
The feature shou… ld be gradually enabled for 100% users.
The first step: nightly/beta 100%
and not much to do, it is mean to be this way, for now, at least.
Anyway, there is a flag chrome://flags/#desktop-detailed-language-settings where you can get a better UI for brave://settings/languages it has the way to add languages to automatically translate but doesn’t work, so not much to do but wait.
About Translate failing sometimes, well, it is not perfect and also some pages fail if you don’t enable this flag on both Desktop and Android.
chrome://flags/#enable-translate-sub-frames
There is also a Flag in Android to change the Translation UI so it is a popup and not a bar on the bottom, if you are interested in that one.
1 Like