mozilla-extensions / firefox-voice

Firefox Voice is an experiment in a voice-controlled web user agent
Mozilla Public License 2.0
285 stars 122 forks source link

"Translate selection" not functional if made after a "Translate webpage" command #1090

Open alexandra-martin opened 4 years ago

alexandra-martin commented 4 years ago

Prerequisites:

Mic permission are enabled. "Allow" or "Don't Allow" button from “Allow Firefox Voice to Collect Voice Transcriptions” pop-up needs to be clicked. "A privacy reminder from Google" is reviewed and agreed and the yellow language pop-up is closed. A page that can be translated is opened and made the active tab, e.g. https://en.wikipedia.org/wiki/Lion.

STR:

  1. Use the shortcut or click on the mic icon from the browser toolbar.
  2. Say or write "Translate the webpage to Spanish".
  3. Select text from the translated page.
  4. Use the shortcut or click on the mic icon from the browser toolbar.
  5. Say or write "Translate the selection to French".

Expected result:

The selected text is translated to the desired language.

Actual result:

"No text selected" or "Internal error: Error: communicate is not defined" is displayed in the doorhanger.

Notes:

Reproduced on Mac 10.14 and Win10x64 with Firefox Release 73.0.1 and Nightly 75.0a1 (2020-02-26).

4

5

PascalUlor commented 4 years ago

@alexandra-martin I would love to thinker with this bug please

alexandra-martin commented 4 years ago

@ianb or @awallin can help with issues assignment.

ianb commented 4 years ago

@PascalUlor You are assigned!

PascalUlor commented 4 years ago

@ianb The problem here is that on translating a webpage the output is displayed in an iframe and the getSeletion() method used to select text does not work on iframes and thus the selected text can not be translated.

PascalUlor commented 4 years ago

I'm still trying to figure out a way to display the output the translated webpage output on another tab