emvaized/selecton-extension

Please show more meaningful error message when translation service cannot be reached

p1otr opened this issue · 7 comments

p1otr commented

I always get "No translation found" tooltip whenever I try to translate selected text (on button hover). I tried all 4 translation services. My user language is: "pl". Note that LMB on the button works fine (i.e. it redirects me to the right service with right translation)

Hi!
Live translation feature uses Google Translate as a source. Maybe you denied the extension access to this website?

p1otr commented

I didn't. It also worked for few minutes once I disabled "Hide translate button for user's language" - I didn't change anything and it's not working again

Sorry, then I could not help with your issue. When I set "pl" as my user language in the extension settings, live translation works just fine — so my suggestion would be, that the extension could not access Google Translate service from your browser, maybe due to some network restrictions which your other extensions may have set.

p1otr commented

How can I debug it? Can I replace "No translation found" tooltip with an actual error message?

You can inspect the relevant code here, if you'd like

p1otr commented

You're right - it was blocked by Privacy Badger extension.

I'm changing bug title to "Please show more meaningful error message when translation service cannot be reached"

I doubt there's any way to make it much more meaningful that this. The request for translation either succeeds or fails – and there may be any reason why it fails, including the basic absence of internet connection. There might be some clues in the message, which gets printed in the developer console when "debug mode" is enabled in settings, but it's unlikely to be useful for a regular user or for me.

Usually when such problem occurs, it's just other extensions or network settings blocking all requests to Google servers by default. The same also may happen with search panel's favicons for websites