Firefox Addon : Worldwide Lexicon Collaborative Translation Tool
The Worldwide Lexicon ([login to view URL]) is an open source, collaborative translation memory (think Wikipedia for translation). We want to build a Firefox addon that works with the system to make any website translatable (using human and machine translations). The addon will work as follows:
1. detect the source language of the URL being displayed (via header fields), and the user's language preference via browser settings.
2. break the page into smaller texts by crawling the DOM tree.
3. call a WWL server to request best available translations, redraw the page.
4. if user clicks on a translation, display a dialog to edit, score or comment on the translation.
The system has a simple and well documented REST API, so this should be straightforward for anyone who is experienced building Firefox addons.
You can find our web API documentation, and test interface, at [login to view URL]
## Deliverables
The Firefox addon should perform the following tasks:
1. Language Detection
* Examine HTML headers (xml:lang, etc) to auto-detect the source language, if possible
* If unknown, call our web API to see if the domain is associated with a specific language (e.g. [login to view URL] = french)
* If unknown, prompt user to select the source language from drop list
* You should be able to detect the user's preferred languages from the browser language settings, but also provide a drop list selector.
2. Parsing text
* Crawl the DOM tree to extract text from the current page to be translated
* Skip items such as <script> tags and other markup
3. Translating texts
* Call the /q web API to request best available human or machine translations
* Allow user to set preferences for displaying translations: filter options include allow_machine = y/n (allow machine translation), allow_anonymous = y/n, minimum_score = 0..5
* Web API returns a recordset in the format of your choice (XML, JSON, PO, etc), parse this, replace original text with best available translation
* Replace source texts with best available human or machine translation
* Color code translations with background shading (light blue for machine translations, light green for good quality human texts, light yellow for unknown quality human texts)
* Clicking on translation loads a dialog to edit or score translation
* Mousing over translation displays tooltip with prompt to edit, and also meta data about translation (user/IP address and location of translator, etc)
* Edits are POSTed to /submit web API, scores are sent to /scores/vote web API
4. Sidebar
If sidebar is activated, load a narrow vertical sidebar from a URL on the WWL server. This will typically display revision histories, a list of translators who have edited the page, etc.