brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.68k stars 2.31k forks source link

[Speedreader] Toolbar gets a wrong preferences #34485

Closed boocmp closed 10 months ago

boocmp commented 10 months ago

Description

Steps to Reproduce

  1. Open speedreader tooblar
  2. Open new tab with chrome://inspect
  3. Go to 'Other' then find 'chrome://brave-speedreader.top-chrome/' and click inspect
  4. Open console in the window that appears at 3
  5. Execute navigator.languages
  6. *** The voice list on the TTS panel should corresponds with languages

Actual result:

Command prints en-US

Expected result:

Command should print the actual settings from the chrome://settings/languages

stephendonner commented 10 months ago

Verification PASSED using

Brave | 1.62.97 Chromium: 120.0.6099.56 (Official Build) beta (x86_64)
-- | --
Revision | 9561bb49dc23c407275af722586f045356609329
OS | macOS Version 14.2 (Build 23C63)

Steps:

  1. installed 1.62.97
  2. launched Brave using --enable-features=Speedreader:tts/true
  3. added Spanish and Russian to brave://settings/languages
  4. loaded https://www.vice.com/en/article/wxjbnb/fentanyl-deal-us-china-biden
  5. clicked on the Speedreader icon in the URL bar
  6. clicked on the Headphones icon in the Speedreader toolbar
  7. opened a new tab
  8. opened chrome://inspect
  9. clicked on Other and then chrome://brave-speedreader.top-chrome/
  10. clicked Inspect
  11. opened the Console
  12. typed navigator.languages and pressed return

Confirmed array of ['en-US', 'en', 'es', 'ru']

example example example example Voices dropdown
Screenshot 2023-12-06 at 11 44 23 AM Screen Shot 2023-12-06 at 12 18 27 PM Screenshot 2023-12-06 at 11 44 27 AM Screenshot 2023-12-06 at 11 44 42 AM Screenshot 2023-12-06 at 11 45 06 AM
MadhaviSeelam commented 10 months ago

Verification PASSED using

Brave | 1.62.99 Chromium: 120.0.6099.62 (Official Build) beta (64-bit)
-- | --
Revision | 0f3e892de210168e788b3418961f94c4d0c5942a
OS | Windows 11 Version 22H2 (Build 22621.2715)

Steps:

  1. installed 1.62.97
  2. launched Brave using --enable-features=Speedreader:tts/true
  3. added Hindi, Japanese, German(Germany), Chinese Simplified, China) and French(France) to brave://settings/languages
  4. loaded https://www.azcentral.com/story/money/real-estate/2023/11/30/phoenix-flagstaff-metro-areas-among-the-priciest-u-s-areas-to-rent/71745441007/
  5. clicked on the Speedreader icon in the URL bar
  6. clicked on the Headphones icon in the Speedreader toolbar
  7. opened a new tab
  8. opened chrome://inspect
  9. clicked on Other and then chrome://brave-speedreader.top-chrome/
  10. clicked Inspect
  11. opened the Console
  12. typed navigator.languages and pressed return
  13. return to article tab and click `Voice dropdown

Confirmed array of ['en-US', 'en', 'hi', 'fr-FR', 'de-DE', 'zh-CN', 'ja']

step 3 step 6 step 12 step 13 OS voices
image image image image image image

PS: Install voices via OS to view the languages in Voices dropdown in the Speedreader TTS panel

example example
image image
kjozwiak commented 10 months ago

Removing the QA Pass labels as we'll need to re-verify the above via 1.61.x. The above was uplifted in the hopes of fixing https://bravesoftware.slack.com/archives/C01LKMP6X36/p1702012350736979 so Speedreader TTS can be pushed out via Griffin on release via https://github.com/brave/brave-variations/pull/846.

kjozwiak commented 10 months ago

The above requires 1.61.102 or higher for 1.61.x verification 👍

GeetaSarvadnya commented 10 months ago

Verification PASSED on

Brave | 1.61.102 Chromium: 120.0.6099.71 (Official Build) (64-bit)
-- | --
Revision | 6ab908cff79418b5aece089de7f6f53dec19331c
OS | Windows 10 Version 22H2 (Build 19045.3693)

Steps:

  1. installed 1.61.102
  2. launched Brave using --enable-features=Speedreader:tts/true
  3. added English (Australia), French (France) and Dutch to brave://settings/languages
  4. loaded https://www.vice.com/en/article/wxjbnb/fentanyl-deal-us-china-biden
  5. clicked on the Speedreader icon in the URL bar
  6. clicked on the Headphones icon in the Speedreader toolbar
  7. opened a new tab
  8. opened chrome://inspect
  9. clicked on Other and then chrome://brave-speedreader.top-chrome/
  10. clicked Inspect
  11. opened the Console
  12. typed navigator.languages and pressed return
  13. return to article tab and click `Voice dropdown

Confirmed array of `['en-US', 'en', 'en-AU', 'fr-FR', 'nl']

step 3 step 6 step 12 step 13 OS voices
image image image image