<div dir="ltr"><div>Hey everyone, if you are interested in the progress and current status of our Automatic Translation project, here's an update describing the various core pieces involved in this feature, their current state, and what are our next steps.<br>
<br><br>The current parts are:<br><br>- Language detection library (done): to offer language translation, the first step is detect the language of the pages visited (so we know if it's in the user's known languages or not). HTTP and HTML offer optional headers specifying the page's language, but that is vastly unreliable due to many servers just not being configured properly (left on default settings, shared hosts on different countries, etc). So we must perform language detection on the actual content served to be accurate. To do that we have imported a library from Chromium called CLD2, which we have emscripted to asm.js and are running it from a Worker thread. (bug 971047)<br>
<br>- Webpage parsing (done): When the user chooses to translate a page, we must parse it to find all the text content that is relevant for translation, in a structured way, and hopefully not much else. The goal is to strip as much of the page's HTML structure as possible (think nested divs and tables for page layout), while keeping the text content with its surrounding HTML preserved in order to produce a quality translation. I've played quite a bit on different approaches for this, and it was implemented in bug 971043.<br>
<br>- Translation module (in progress): This is the module that is responsible for getting the parsed data from the page and to format and send it to the translation service. We're still not certain of which provider we'll be using for translation, but this module should be mostly independent of provider. We want to make it easy to swap in providers or to let add-ons to add new providers that covers different pairs of languages too. (bug 971054)<br>
<br>- Notification infobar (done): This piece consists of the infobar + a URL bar icon that is displayed when a translation offer occurs and while translation is being performed. It's a bit more detailed than a normal infobar since it persists while being used, and can be dismissed and retrieved back from the URL bar, similar to how doorhangers work. This was done in bug 979424.<br>
<br>Next steps:<br><br>- Finish translation module (bug 971054), hook up the language detection (bug 971048) and parse/display the translation result from the provider (bug 976556 and bug 976554)<br><br>- Style the infobar <br>
  - while the notification bar is functionally working, its style is still not fully implemented according to UX's specs. OSX - bug 988480, Windows - bug 988481, Linux - bug 988482<br><br>- Verify performance characteristics to enable building the feature<br>
  - While all of this code has been landing on m-c (and we're running its test suite locally), it's not being built by default yet. Before doing that we need to ensure that enabling it won't cause any performance problems. Bug 996119 was filed to track that.<br>
<br><br></div>Felipe<br></div>