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 in-page translation in release channel #2542

Merged
merged 5 commits into from
May 30, 2019

Conversation

yrliou
Copy link
Member

@yrliou yrliou commented May 30, 2019

Fix brave/brave-browser#4626

Submitter Checklist:

Test Plan:

  1. Visit https://www.deutschland.de/de/topic/politik/frauenrechte-deutschland-foerdert-gleichberechtigung-weltweit
  2. Translate bubble in the location bar should not be shown in release channel, but will be shown in any other channels.
  3. Right click in the page to open the context menu, Translate to English (or any other default language) shouldn't be shown in release channel but will be shown in any other channels.
  4. Open brave://settings/languages, open the language section, Offer to translate pages that aren't in a language you read switch should not be shown in release channel but will be shown in any other channels.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

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.

@yrliou yrliou added this to the 0.68.x - Nightly milestone May 30, 2019
@yrliou yrliou requested a review from emerick May 30, 2019 07:37
@yrliou yrliou self-assigned this May 30, 2019
@yrliou yrliou requested a review from bbondy May 30, 2019 08:19
emerick
emerick previously approved these changes May 30, 2019
Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one minor nit.

#include "brave/browser/translate/buildflags/buildflags.h"

namespace {
bool IsBraveTranslateEnable() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really really minor nitpick, but should it be called IsBraveTranslateEnabled?

emerick
emerick previously approved these changes May 30, 2019
Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yrliou
Copy link
Member Author

yrliou commented May 30, 2019

Locally went through the test plan on mac by building both development&debug build and stable&official build, and on windows & linux by changing the value of is_release_channel.
mac&linux CI passed in https://staging.ci.brave.com/job/brave-browser-build-pr/job/disable_translate_in_release/2/flowGraphTable/, failed browser tests are known.
I will wait for Windows CI pass before merging.

Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a feature flag for enabling translation
2 participants