FilipePS / Traduzir-paginas-web

Translate your page in real time using Google or Yandex
https://addons.mozilla.org/pt-BR/firefox/addon/traduzir-paginas-web/
Mozilla Public License 2.0
4.58k stars 554 forks source link

[BUG] Context menu's translation opens a new tab for some reason #790

Closed TsukiZero closed 9 months ago

TsukiZero commented 9 months ago

Body

And it is known to also open a mini window in the current tab where the translation happens. Any ideas?

Edit: Found the cause: it was using DeepL, which somehow has to create a new tab entirely just to translate and send the result to the source tab.

What did you just do?

TsukiZero commented 8 months ago

On that note, if it is not possible to translate with DeepL without opening a new tab, could you add a prompt about it?

FilipePS commented 8 months ago

If you have a credit card in one of the countries accepted by DeepL. https://www.deepl.com/pt-BR/pro-api?cta=header-pro-api You can create a key for DeepL API Free. After creating a key, in the extension's experimental settings you paste this key and then the text translation with DeepL will not open new tabs.

TsukiZero commented 8 months ago

Then yeah, it would be a good idea to add a prompt to inform the user that it will be opening a tab for DeepL.

FilipePS commented 8 months ago

Then yeah, it would be a good idea to add a prompt to inform the user that it will be opening a tab for DeepL.

The first time you click to define DeepL as a text translation service, a confirmation message appears. And from version 10.x (awaiting approval by the Mozilla team) there is a fixed message in the DeepL tab.

TsukiZero commented 8 months ago

Ah I see. Either the prompt never appeared for me before or I forgot it did. But yes, thanks for getting this sorted.