Skip to content
Jelmer edited this page Feb 12, 2022 · 4 revisions

Welcome to the firefox-translations wiki!

Todo:

  • Do we want to translate UI-targeted attributes, such as <img alt=""> and <a title="">?

  • Better language recognision on load. I have the impression that the biolerplate often influences the language identification too much. Maybe taking a look at https://github.com/mozilla/readability to see how they identify the meaty bit of a page could help.

  • Explain the infrastructure, code, algorithms here instead of writing things that really should be issues.

Sovled

  • Do we want to specifically exclude <code> and <kbd>? And at what level? Both the extension and bergamot-translator are aware of these. The extension will not submit them for translation unless they appear surrounded by other text (i.e. inline, between TextNodes). bergamot-translator will then treat them as opaque void elements, i.e. like <img>.

  • Event handlers: For example https://developer.mozilla.org/es/docs/Web/Tutorials when translated to English, the menu break. Presumably because the buttons are replaced through innerHTML and so the attached event handlers are lost. For that page it is solved by merging the translated HTML back into the live HTML recursively, re-using existing elements instead of replacing them when setting innerHTML. This does not yet seem to work for Youtube though.

Clone this wiki locally