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
65 stars 3 forks source link

Native Messaging detect 0.7.1+ #62

Closed VladimirChalanov closed 1 year ago

VladimirChalanov commented 1 year ago

Hi,

I am using translateLocally version v0.0.2+136745e I installed this from the Arch User Repository (found this way on translatelocally.com). It works fine.

translateLocally create file /home/USERNAME/.mozilla/native-messaging-hosts/translatelocally.json

{ "allowed_extensions": [ "{c9cdf885-0431-4eed-8e18-967b1758c951}" ], "description": "Fast and secure translation on your local machine, powered by marian and Bergamot.", "name": "translatelocally", "path": "/usr/bin/translateLocally", "type": "stdio" }

I also use an addon. Firefox addon version higher than 0.7.1 doesn't work on my system (translateLocally choice is not available). I tried Firefox Developer Edition (for use unsigned addon), it doesn't work either.

Version 0.7.1 downloaded from the addons.mozilla.org does not work. translateLocally 0.7.1 downloaded from github works well, but requires internet to display addon menu.

Is there a problem with the addon or my installation?

jelmervdl commented 1 year ago

@VladimirChalanov that extension id seems to be the old one before I changed it. Newer versions of translateLocally ship with both, but @ XapaJIaMnu may not have updated the Arch package yet since I changed that.

I think your version of translateLocally already supports adding extra ids. You should be able to allow the new ID by running this. The translatelocally.json manifest should then automatically be updated.

translateLocally --allow-client "{2fa36771-561b-452c-b6c3-7486f42c25ae}"
VladimirChalanov commented 1 year ago

@jelmervdl yes allow-client command fix this.

Another question: When I try to translate an html file without an internet connection(addon ver 0.8.2), instead of button "Translate Page", there is an inscription "Downloading list of available language models". Does offline translation work?

jelmervdl commented 1 year ago

Oh hmm, ironically that isn't a scenario I've tested thoroughly.

Ideally it should indeed, but the extension does ask translateLocally for a model list including the models that aren't downloaded. That request might be failing because translateLocally can't access the remote model list. I'll look into it.

VladimirChalanov commented 1 year ago

In any case, thanks for the help, I hope this project will not be abandoned.

jelmervdl commented 1 year ago

I'll close this issue for now. I've moved the offline issue to upstream.

TranslateLocally is used by us to demonstrate research and make it more widely available. I think at least the desktop software will stay funded/around for a while. This extension isn't directly funded atm, and I'm mostly maintaining it because I enjoy it. So its future is a little less certain.