Closed Bug 2003545 Opened 4 months ago Closed 4 months ago

Full-Page Translations Does Nothing for Standalone SVGs

Categories

(Firefox :: Translations, defect)

defect

Tracking

()

VERIFIED FIXED
147 Branch
Tracking Status
firefox147 --- verified
firefox148 --- verified

People

(Reporter: nordzilla, Assigned: nordzilla)

Details

Attachments

(1 file)

Description

A Mozilla Connect user reported that Full-Page Translation was being offered for the following standalone SVG page, yet nothing is translated when invoked.

While we do support translating SVGs within documents, our TranslationsDocument algorithm only adds root elements to be translated if there is a document body. The above SVG does not have a document body.

We should consider expanding the context in which we add roots to be translated to support this case.


Steps to Reproduce

  1. Navigate to https://upload.wikimedia.org/wikipedia/commons/a/af/Alerte_Globale.svg
  2. Attempt to trigger Full-Page Translations to another language.

Expected Results

The SVG content translates.

Actual Results

Full-Page Translations becomes active, but the SVG content remains untranslated.

This commit expands the context in which we add root elements to
the TranslationsDocument to support cases where the document may
not have a body. This happens in the case of a standalone SVG page.

Attachment #9530368 - Attachment description: WIP: Bug 2003545 - Support Full-Page Translations for standalone SVGs r=#translations-reviewers! → Bug 2003545 - Support Full-Page Translations for standalone SVGs r=#translations-reviewers!
Pushed by enordin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c06a945be3fc https://hg.mozilla.org/integration/autoland/rev/3d1dad8d9b9d Support Full-Page Translations for standalone SVGs r=translations-reviewers,gregtatum
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
QA Whiteboard: [qa-triage-done-c148/b147][qa-ver-needed-c148/b147]
Flags: qe-verify+
QA Contact: oardelean

Reproducible on a 2025-12-02 Firefox Nightly build on Windows 10.

Verified as fixed on Firefox Nightly 148.0a1 and Firefox 147.0b2 on Windows 10, Ubuntu 22 and macOS 15.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c148/b147][qa-ver-needed-c148/b147] → [qa-triage-done-c148/b147][qa-ver-done-c148/b147]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: