Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable auto translate in Brave Translate #27040

Closed
rebron opened this issue Nov 29, 2022 · 4 comments · Fixed by brave/brave-core#16185
Closed

disable auto translate in Brave Translate #27040

rebron opened this issue Nov 29, 2022 · 4 comments · Fixed by brave/brave-core#16185
Assignees
Labels
brave-translate OS/Android Fixes related to Android browser functionality OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass-macOS QA/Yes release-notes/exclude

Comments

@rebron
Copy link
Collaborator

rebron commented Nov 29, 2022

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:

Screenshot 2022-11-23 at 3 22 41 PM

screenshot_2022-11-23_at_1 39 33_pm

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:

@kjozwiak
Copy link
Member

kjozwiak commented Dec 7, 2022

The above requires 1.46.138 or higher for 1.46.x verification 👍 I think one platform for both Desktop & Android is enough. Maybe run through macOS as I went through Win 11 x64 on Nightly as per brave/brave-variations#479 (comment). As per @rebron, we won't be pushing the Griffin study on the Release channel until we have more information from the Nightly & Beta channels.

@brave/qa-team can follow the STR/Cases outlined via brave/brave-variations#479 (comment) & brave/brave-variations#479 (comment) but use the flag mentioned via brave/brave-core#16185 (comment) rather than using Griffin staging like I did.

@LaurenWags
Copy link
Member

LaurenWags commented Dec 7, 2022

Verified with

Brave | 1.46.138 Chromium: 108.0.5359.94 (Official Build) (x86_64)
-- | --
Revision | 713576b895246504ccc6b92c2fb8ce2d60194074-refs/branch-heads/5359_71@{#3}
OS | macOS Version 12.6.1 (Build 21G217)

Per #27040 (comment), verifying cases from brave/brave-variations#479 (comment) using flag mentioned in brave/brave-core#16185 (comment).

Note - tested with staging env for Brave Translate due to production server side problems. See https://bravesoftware.slack.com/archives/C03MMJ4CHEZ/p1670421276597499 for additional context.

Test Case #1 - AutoTranslateDisabled once Always translate selected via context menu

  • launched 1.46.138 Chromium: 108.0.5359.94 using --args --enable-logging=stderr --translate-security-origin=https://translate.bravesoftware.com/ --translate-script-url=https://translate.bravesoftware.com/static/v1/element.js
  • visited https://fr.wikipedia.org/wiki and ensured that the Brave Translate icon appears within the URL
  • ensured that Always Translate French was being listed via the context menu under the Brave Translate button
  • enabled/selected Always Translate French and visited several other French pages and ensured they were being translated
  • closed/re-launched using --args --enable-logging=stderr --translate-security-origin=https://translate.bravesoftware.com/ --translate-script-url=https://translate.bravesoftware.com/static/v1/element.js --disable-features=BraveEnableAutoTranslate
  • Note: BraveAutoTranslateStudy:AutoTranslateDisabled is not displayed via brave://version as the griffin study is not rolled out to Release yet, and I used the command line flag to disable this
  • ensured that https://fr.wikipedia.org/wiki isn't being automatically translated anymore as Always Translate was disabled
  • ensured that you can still manual translate the page by switching between French & English
  • ensured that Choose another language, Never translate, Never translate this site & Page is not in French are working
Example Example Example Example Example
1 2 3 4 5

Test Case #2 - AutoTranslateDisabled once Always translate selected once it appears automatically in the button

  • launched 1.46.138 Chromium: 108.0.5359.94 using --args --enable-logging=stderr --translate-security-origin=https://translate.bravesoftware.com/ --translate-script-url=https://translate.bravesoftware.com/static/v1/element.js
  • visited https://fr.wikipedia.org/wiki and ensured that the Brave Translate icon appears within the URL
  • ensured that Always Translate French was being listed via the context menu under the Brave Translate button
  • visit several sites within https://fr.wikipedia.org/wiki until you see Always translate French under the targeted translations
  • enable/select Always translate French once it appears under the targeted translations
  • closed/re-launched using --args --enable-logging=stderr --translate-security-origin=https://translate.bravesoftware.com/ --translate-script-url=https://translate.bravesoftware.com/static/v1/element.js --disable-features=BraveEnableAutoTranslate
  • Note: BraveAutoTranslateStudy:AutoTranslateDisabled is not displayed via brave://version as the griffin study is not rolled out to Release yet, and I used the command line flag to disable this
  • ensured that https://fr.wikipedia.org/wiki isn't being automatically translated anymore as Always Translate was disabled
  • ensured that you can still manual translate the page by switching between French & English
  • ensured that Choose another language, Never translate, Never translate this site & Page is not in French are working
Example Example Example Example Example
1 2 3 4 5

Test Case #3 - Clean Install/Profile

  • launched 1.46.138 Chromium: 108.0.5359.94 using --args --enable-logging=stderr --translate-security-origin=https://translate.bravesoftware.com/ --translate-script-url=https://translate.bravesoftware.com/static/v1/element.js --disable-features=BraveEnableAutoTranslate
  • closed/re-launched using --args --enable-logging=stderr --translate-security-origin=https://translate.bravesoftware.com/ --translate-script-url=https://translate.bravesoftware.com/static/v1/element.js --disable-features=BraveEnableAutoTranslate
  • Note: BraveAutoTranslateStudy:AutoTranslateDisabled is not displayed via brave://version as the griffin study is not rolled out to Release yet, and I used the command line flag to disable this
  • visit https://fr.wikipedia.org/wiki and ensure that the Brave Translate is triggered and a translation is offered
  • ensure that Always Translate isn't visible/available via the context menu
  • ensured that Always translate French never appears under the targeted translation after visiting/translating several websites
  • ensured that you can still manual translate the page by switching between French & English
  • ensured that Choose another language, Never translate, Never translate this site & Page is not in French are working
Example Example Example
1 2 3

@LaurenWags LaurenWags added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Dec 7, 2022
@kjozwiak
Copy link
Member

kjozwiak commented Dec 7, 2022

Probably should exclude this from the notes as this will be enabled a bit after the release. @LaurenWags @rebron please re-add if you feel differently.

@srirambv
Copy link
Contributor

srirambv commented Dec 7, 2022

Verification passed on Oppo Reno 5 with Android 12 running 1.46.138 x64 build

Test Case 1: Auto Translate Disabled via flag

  • Clean install 1.46.138
  • Visit https://fr.wikipedia.org
  • Ensured Translate bar is shown
  • Ensured Always Translate setting is shown
  • Click on English to translate
  • Ensured page gets translated to English
  • Added command line args --disable-features:BraveEnableAutoTranslate
  • Restarted the browser
  • Visited https://fr.wikipedia.org
  • Ensured Translate bar is shown again
  • Click on menu, Always Translate pages in French option is removed
  • Verified still able to click on English to translate the page manually
  • Verified still able to translate the page when selecting Translate setting from menu

Test Case 2: Page Auto-Translate checked and then disabled via flag

  • Clean install 1.46.138
  • Visit https://fr.wikipedia.org
  • Ensured Translate bar is shown
  • Ensured Always Translate setting is shown
  • Click on English to translate
  • Ensured page gets translated to English
  • Repeat the above steps until you see notification about pages will be auto translated
  • Added command line args --disable-features:BraveEnableAutoTranslate
  • Restarted the browser
  • Visited https://fr.wikipedia.org
  • Ensured Translate bar is shown again
  • Click on menu, Always Translate pages in French option is removed
  • Verified still able to click on English to translate the page manually
  • Verified still able to translate the page when selecting Translate setting from menu
  • Verified manually translating the pages multiple times doesn't enable Auto-Translate again
Test Case 1 Test Case 2
27040-Case.1.mp4
27040-Case.2.mp4

@LaurenWags LaurenWags added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brave-translate OS/Android Fixes related to Android browser functionality OS/Desktop priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass-macOS QA/Yes release-notes/exclude
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants