732 points · by PaulKeeble · 4y ago · 178 comments
It's not nearly as speedy as Google Translate, but I'll take that happily if it means keeping it local.
It sounds like after Bergamot funding ended there were some communication issues and the Translate Locally group that was working with the Firefox Translate group stopped working together and now have their own extension, as mentioned in another comment:
https://news.ycombinator.com/item?id=33795141
That one can be installed outside the browser and would likely give better performance, although I haven't tried that yet.
The other interesting open source translation software I've seen is Apertium:
I don't think they have a browser extension unfortunately but it is an entirely rule based translation rather than AI models. I haven't tried this one yet either but hope to soon. I did try their web interface a few times:
Then this came along. All those nits are gone. Personally I find the translations easier to understand than Google's. (When you're overseas easier to understand trumps grammaticality perfect every time.) I'm not a fan of the banner at the top - the could move it to a tool bar icon like Ublock Origin does, but apart from that - it's damned good.
Now we need a replacement for Google Lens. For all it's flaws, Lens seems near magical to me.
I also think that the domain and the type of language used on Wikipedia is pretty consistent which will help a lot with unseen sentences.
By no means are these models bad! It’s just that Wikipedia is a particularly easy test for them.
> called Project Bergamot. The ultimate goal of this consortium was to build a set of neural machine translation tools that would enable Mozilla to develop a website translation add-on that operates locally, i.e. the engines, language models and in-page translation algorithms would need to reside and be executed entirely in the user’s computer, so none of the data would be sent to the cloud, making it entirely private.
> In addition to that, two novel features needed to be introduced. The first was translation of forms, to allow users to input text in their own language that is dynamically translated on-the-fly to the page’s language. The second feature was quality estimation of the translations where low confidence translations should be automatically highlighted on the page, in order to notify the user of potential errors.
https://blog.mozilla.org/en/mozilla/local-translation-add-on...
you can see the model sizes here: https://gist.github.com/jelmervdl/1a48816e4c3643ff5d9e1fd682...
they are like 15MB per language pair each way
Google is a bit better of course with many common expressions but I'm sure that can run locally too if they'd want to. Mozilla just has don't catching up to do because they don't monetize our data. So less budget to work with.
https://github.com/marian-nmt/marian-dev/
It’s compiled c++ running using wasm.
This is still using Google's cloud to host the models and your browser has to repeatedly download them on demand. We shouldn't need to depend on Google at all, but with Firefox Translations we still do and they're still collecting data about us.
So many things can be unclouded, and provide a better user experience for it (which is how we win).
But I agree that this local experience should be the future. It’s good to have the control and independence.
A better user experience was never the goal of cloud services. Providing translation and other services in the cloud gives companies massive amounts of data about you that they can leverage to their advantage and gives them opportunities to control and shape what we're allowed to do or see. As long as that stays true there will always be a push for users to give up more control and become more dependent on third parties.
I want to live in a future where more things are done locally and independently, but things are headed in the other direction and there's a lot of money and power behind preventing the pendulum from swinging back. I'll do what I can to fight the trend though, and if this add-on really works as advertised I'll gladly use it.
Previously there was a manual translate button. Now you can only set up automatic translation with an exception list.
This is really annoying for me, I'm learning Spanish and I like to switch between the original and the translation. Now that option is suddenly gone.
Ps: I'm on FreeBSD for which mozilla doesn't make a version so I'm using a community release. It's been working totally fine though for years with the exception of D Hardware DRM which is just not supported on FreeBSD (and I agree with that)
Also, it would be great if the models were cached. If I don't click "translate this tab automatically as I browse" I'll download the whole model on every page load. Not great if you're tethered to your phone :(
React pages are especially tricky to translate as the framework does not take kindly on external JavaScript swapping out text nodes. There’s code in the extension to work around that.
It's a shame; I'd like to use FF Translate instead of Google Translate. But Mozilla's telemetry and frequent style changes that break my Userchrome.css styling are a bit of a dealbreaker.
I maintain a forked version of the Firefox extension[^1] that doesn’t use any private apis (or telemetry). It is slightly different[^2], but uses the same libraries.
Disclosure: I work for one of the project partners and contributed to the Mozilla extension.
[^1]: https://addons.mozilla.org/en-GB/firefox/addon/translateloca...
[^2]: https://github.com/jelmervdl/translatelocally-web-ext#differ...
It is a bit of a question whether this is the way to go. You're downloading about 20mb to get all the plumbing + translation models necessary to translate a page. It would be okay if it were widespread enough that we can assume everyone already has these in their browser cache, but the trend is moving away from that model of caching[3].
* given your browser support wasm SIMD. So an x86 processor with SSE4.1, although M1 also seems to work. And no Safari, because they haven't implemented wasm SIMD[4].
[1] https://translatelocally.com/web/
[2] https://github.com/jelmervdl/translatelocally-web-ext/blob/m...
[3] https://developer.chrome.com/en/blog/http-cache-partitioning...
Are you talking about Firefox or Chrome?
Apart from that, I assume it's quite difficult for anyone to help you based on the error description "doesn't work".
FWIW, the "TranslateLocally for Firefox" add-on recommended by another user here works great for me.
as noted in [0], the models are hosted on storage.googleapis.com and downloaded on demand. this still seems to be the case [1]
0: https://news.ycombinator.com/item?id=31604095
1: https://github.com/mozilla/firefox-translations/blob/main/ex...
The first release translated endless twitter scroll inline perfectly. Unfortunately, this stopped working for me - either a Firefox update or a translations update - so I actually have to use this box often.
This is the right behavior and it's still working for me. Could you please file an issue to: https://github.com/mozilla/firefox-translations/issues with your STRs?
Add to that local translation! FF is the best it has ever been and somehow it is losing user share faster than ever. I used to get all the hate, but now at days... I'm just not sure. I'd love to know why.
I'm also a long time fan of firefox, but it does seem like there's always something I have to disable or fix with every major update.
Firefox has always claimed to be very pro-privacy, but they don't always live up to that with their actions (From a privacy perspective perhaps the biggest slap in the face was Pocket). Even here "local translation" means that Firefox needs to repeatedly ping Google's servers in order to download the models. Still better than letting Google translate the contents of a page, but far from ideal from a privacy standpoint.
As it stands I have modifications to over 100 settings in about:config that have to be made with each fresh install of firefox to get it locked down properly. Firefox is still the best browser out there because it gives you the ability to disable all that stuff, but its still a pain.
User share is always going to suffer because for most people their phones come with something else already, their PCs and tablets do too, and they don't know any better. They don't see or understand the problems with using chrome so why look for a browser that gives them better solutions?
I use firefox because I care about my security and privacy. If I didn't care about that I'd use Chrome or whatever Microsoft is shipping these days too because I know sites will make sure their stuff works in those browsers. All the hate I have for firefox comes from a place of love. I care about firefox. I depend on it. I want firefox to be better. Often that means I'm calling them out on their bullshit, bitching about the extra work they're giving me after updates, or just mentioning how they could have done better.
Firefox users complain about firefox because if they didn't care enough to complain they'd just be using chrome.
I disable things like service workers, normandy, shield, pocket, the new tab page, WebRTC, searching from the address bar, prefetch, WebGL, push notifications, WebAssembly, and lots of dom. options
You can backup your user.js but updates tend to add/rename/remove preferences so that gets ugly fast. I've also seen firefox reset prefs I've set but didn't lock. I've been meaning to automate monitoring the file for changes and notifying me for lines that were added or modified, but I haven't gotten around to it yet.
Basically, reputation builds at glacial speed, and it is rapidly destroyed.
Complaints and reports of bad user experience linger for years, if not decades, and reversing consumer trends requires humongous good will.
They say there's only one chance for a good impression. But there's also basically no chance at all for a second bad impression.
well as an individual data point, I recently threw in the hat because both my regional bank's website and my health insurance page stopped working at all on Firefox. Not really something I can do without and it seems to be getting worse for companies with smaller web presences.
It's interesting that they have Icelandic, a language spoken by 350,000 people. I'm often surprised seeing Icelandic has a full audio dub on a Disney or Netflix movies, above languages spoken by 100X or more speakers. That can't be an economic decision.
Anyone know why Icelandic punches above its own weight? Or is it because it has so few speakers that people do dubs to help preserve it?
Downside is that the language I mainly need it for is not in the list yet.
The lack of working translation was the biggest reason to use Chromium instead of Firefox.
And being local is great, and the quality even seems quite good.
Regular cloud translation: https://github.com/FilipePS/Traduzir-paginas-web
I would be fine using it, with ugly UI, not optimized for mobile ..
Maybe it will get implemented
I see both an icon on the right end of the address bar I can click to manually translate pages, and the ability to click on the addon from the extensions list in the toolbar to open a popup to translate arbitrary text.
https://addons.mozilla.org/en-US/firefox/addon/simple-transl...
Great for a web-based RSS reader with feeds in multiple languages onscreen...
The website isn’t pretty but it’s the same tech as the browser extension. It came out of the same research project.
But because its optimised native code, and not limited by single threaded wasm, waaay faster!
Edit disclosure: I worked on that project, and this software.
It might not be the more technically impressive browser, but in every way that really matters it is strictly better.
(lets you manually upload/manage the models and perform translations in page)
There also doesn't seem to be a way to highlight parts that were poorly-translated and then 'report' them.
Can it be extended to Asian languages? Most of the supported languages have common roots.
Many webpages write 10 minute articles that contain 30 seconds worth of information. An add on that can summarize wall-of-text comments and entire articles would be very valuable to people like me.
I’ve been using Firefox since it was Firebird.
It’s critically important thing like this be done offline whenever possible.
(Trust me.)
Would it be possible to show the original and the tranlation side by side (on desktop)? I suppose you can do this manually with two windows etc but an option to render them automatically next to each other could be a great language learning tool.
Obviously. Replacing text is a huge CPU intensive task.
It’s because the translation engine requires at least SSSE3.1 instructions[1]. These are translated to wasm SIMD instructions[2] which are only enabled by browsers if the underlying hardware is there to execute these at least somewhat efficient.
[1] https://github.com/browsermt/bergamot-translator/issues/418
I recently compared various translators including Bing, Yandex, Baidu Fanyi and who knows what else and my result was DeepL beating everyone with their neural MT (which I don't think can be done offline), followed by pretty much tie between Google Translate and Reverso (which also use neural MT, same as DeepL and also their website is also confusingly very similar to DeepL, almost like clone).
Sometimes GT is better than DeepL, sometimes Reverso, but most of the time DeepL delivers the best translation, followed by GT, which is usually followed by Reverso.
But considering 2 of these use neural MT I can't imagine how good/bad is Firefox with offline translation.
https://www.androidpolice.com/firefox-beta-107-android-insta...
[0] https://addons.mozilla.org/addon/dictionary-anyvhere/
[1] https://addons.mozilla.org/addon/english-popup-dictionary/
[2] https://addons.mozilla.org/addon/lumetrium-definer/I see that the main comment is about why Firefox is hated/losing market share. Let me try and share my guess/assumption. I could be wrong. So do share any counter opinions you may have.
People really do forget that Firefox is more than just a piece of software. Firefox stands for privacy, ethics and a lot more. It's user base and the community around it is looking for something that is far more than a piece of software based on technical merit. Keep this in mind as you read the rest.
When Firefox quantum was released, I had just moved to Chrome finally. It had just been a month or so. Before quantum, Firefox was horrible, slow and bulky. Firefox lost majority of the "average" users around this point. Because many websites broke with important things like Google Meet not working.
This left Firefox with a user base of enthusiasts and privacy nerds or power users. For good chunk of the userbase who are very local. Firefox has been ignoring the community and things like MDN layoff while CEO is getting paid is not a good mark.
How community volunteers are ignored is a good thing to keep in mind. I will not go there. Research them. A lot of community volunteers have posts about it. Keep in mind that Mozilla is still spending a crazy amount and wasting money on these events while ignoring what made it good. Money that they don't have.
And now, Firefox enthusiasts are perplexed on why Firefox is not gaining any ground. We should stop looking at it from technical merit alone. Then you will have the answer.
I don't see Firefox as some great movement for freedom anymore due to current leadership. While I understand the need for a browser with a different browser engine, I am not at all invested on Firefox emotionally. A lot of the conversations I recently have with others says the same. They like me are ready to ditch Firefox any day.
That being said, let me clarify that Firefox is really good these days. But I do think it might be really late to get a noticeable amount of general audience.