Bug 1898757 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Thanks for reporting this, Paul.

I haven't looked too closely, but this does seem, on the surface, an issue both with the Bergamot engine and with the `ru -> en` model. 

You can set the `browser.translations.useHTML` pref to `true` and then pass markup directly into `about:translations`, which does reproduce for me (see screenshot).

The unfortunate situation is that the Bergamot engine has its own logic for handling translations within markup. We do have an [imperfect heuristic](https://searchfox.org/mozilla-central/rev/0529464f0d2981347ef581f7521ace8b7af7f7ac/toolkit/components/translations/content/translations-document.sys.mjs#639-649) for subdividing the DOM into chunks to feed the translator, but it is a weird sort of hybrid situation at present partly due to legacy reasons and the complexity of decoupling it entirely.

In the future, we would love to have all of the DOM processing on our side, and to feed the translator _only_ plain text to translate. 

There are definitely improvements to make here, as a whole, and I appreciate this bug report.
Thanks for reporting this, Paul.

I haven't looked too closely, but this does seem, on the surface, an issue both with the Bergamot engine and with the `ru -> en` model. 

You can set the `browser.translations.useHTML` pref to `true` and then pass markup directly into `about:translations`, which does reproduce for me (see attached screenshot).

The unfortunate situation is that the Bergamot engine has its own logic for handling translations within markup. We do have an [imperfect heuristic](https://searchfox.org/mozilla-central/rev/0529464f0d2981347ef581f7521ace8b7af7f7ac/toolkit/components/translations/content/translations-document.sys.mjs#639-649) for subdividing the DOM into chunks to feed the translator, but it is a weird sort of hybrid situation at present partly due to legacy reasons and the complexity of decoupling it entirely.

In the future, we would love to have all of the DOM processing on our side, and to feed the translator _only_ plain text to translate. 

There are definitely improvements to make here, as a whole, and I appreciate this bug report.
Thanks for reporting this, Nicolas.

I haven't looked too closely, but this does seem, on the surface, an issue both with the Bergamot engine and with the `ru -> en` model. 

The unfortunate situation is that the Bergamot engine has its own logic for handling translations within markup. We do have an [imperfect heuristic](https://searchfox.org/mozilla-central/rev/0529464f0d2981347ef581f7521ace8b7af7f7ac/toolkit/components/translations/content/translations-document.sys.mjs#639-649) for subdividing the DOM into chunks to feed the translator, but it is a weird sort of hybrid situation at present partly due to legacy reasons and the complexity of decoupling it entirely.

In the future, we would love to have all of the DOM processing on our side, and to feed the translator _only_ plain text to translate. 

There are definitely improvements to make here, as a whole, and I appreciate this bug report.

---

Paul, you can set the `browser.translations.useHTML` pref to `true` and then pass markup directly into `about:translations`, which does reproduce for me (see attached screenshot).

Back to Bug 1898757 Comment 2