Closed Bug 1898757 Opened 6 months ago Closed 4 months ago

Firefox Translate seems miss-lead by datetime timestamps.

Categories

(Firefox :: Translations, defect)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: nbp, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

The following article has a publication timestamps as well as an Updated by: timestamps which are both moved from 2024 to 2019.

The original text contains:

21.05.2024
Обновлено: 22.05.2024

Which is translated (ru -> en) to:

05/21/201924
Updated by: 10:22 May 2019

The corresponding HTML is:

<div>
  <time class="article__datetime timeago" datetime="2024-05-21T19:22:00+03:00" y-use="Timeago">21.05.2024</time>
</div>
<div>
  <span>Обновлено: </span>
  <time class="article__datetime timeago" datetime="2024-05-22T10:08:15+03:00" y-use="Timeago">22.05.2024</time>
</div>

Interestingly, this doesn't reproduce in about:translations for me when just pasting the second line, but does reproduce partially when pasting the two lines, in the sense that the first line is like in the web page, but the second line is correct.

Attached image image.png

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 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).

Blocks: 1836125
Severity: -- → S3

I tested this with our new models, and it seems that the robustness has fixed this issue.

See: https://github.com/mozilla/firefox-translations-training/issues/238

We'll still need to retrain older models.

Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: