jelmervdl / translatelocally-web-ext

TranslateLocally for the Browser is a web-extension that enables client side in-page translations for web browsers.
https://addons.mozilla.org/en-GB/firefox/addon/translatelocally-for-firefox/
Mozilla Public License 2.0
66 stars 3 forks source link

translateLocally as backend not working for non-downloaded models #24

Closed jerinphilip closed 2 years ago

jerinphilip commented 2 years ago

So I'm running the translateLocally backend using addon options.

I have a pre-downloaded es-en model (using GUI). Works on fresh request to translate.

I did not have a de-en downloaded, and the translating appeared to take forever (did not finish). Downloaded through GUI, but still didn't work.

Restarted Firefox Nightly after downloading through GUI (most probably launching a new NativeMessaging instance?) and it works.

Tried with czech (not already downloaded) again, consistent behaviour.

There's no feedback (even logs) w.r.t what's happening in the console, when it's a fresh, undownloaded model. Something here would be nice.

jelmervdl commented 2 years ago

Aah, crap. Should be fixed now. The popup shows a "Download & Translate" button for the language pairs that are not available locally yet. But the check for that was borked.

Since translations happen in the background script, the errors will go into the general browser console, not the page specific one.

It's still broken for the Ukrainian models because of uk <-> ukr confusion. I need to improve that bit on the extension side of things. translateLocally already accepts unique model identifiers instead of ambiguous language tags, but I haven't implemented that bit yet in this extension. I'll open a new issue to track that one: #25

jerinphilip commented 2 years ago

Aah, crap. Should be fixed now. The popup shows a "Download & Translate" button for the language pairs that are not available locally yet.

I can see the new button and it works now.