[1] https://addons.mozilla.org/firefox/addon/firefox-translation...
[1] https://addons.mozilla.org/firefox/addon/firefox-translation...
as an aside, pretty sad to see the project page, https://browser.mt/ , requiring not just javascript but specifically google connections to work. to 5 different google properties, no less.
(Of course technically the work was out there in the open already, since it's Mozilla.)
Agreed about the Bergamot website. I suspect it's not by Mozilla, but I'll see if I can ask someone to take a look, as I don't think all those connections should be necessary.
edit: and for the actual translations https://github.com/mozilla/bergamot-translator
you know a simple setting "always translate this website" and an option to hide the bar
I'm also immediately curious about using it headless outside the browser
I was experimenting with running the wasm version of bergamot-translator (the translation engine used by the addon) in node [2].
However, if you want more performance, using the Python library [3] or the native C++ interface [4] gets you further because the wasm build is limited to a single thread and thus a blocking interface, and can't use all the processor specific optimisations that are in the native builds.
EDIT: Another option is using translateLocally [5], which is a Qt desktop app based on bergamot-translator. It has a native messaging API that is designed as a much faster alternative to the wasm build for browser extensions, but it can also be used from Python [6].
[1] https://github.com/mozilla/firefox-translations-training
[2] https://gist.github.com/jelmervdl/a4c8b6b92ad88a885e1cbd51c6...
[3] https://colab.research.google.com/drive/1AHpgewVJBFaupwAbZq0...
[4] https://github.com/browsermt/bergamot-translator/blob/main/a...
[5] https://github.com/XapaJIaMnu/translateLocally
[6] https://github.com/XapaJIaMnu/translateLocally/blob/master/s...