Closed Bug 1012533 Opened 9 years ago Closed 9 years ago

Translation root inside root shouldn't be stringfied twice

Categories

(Firefox :: Translation, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 32

People

(Reporter: Felipe, Assigned: Felipe)

References

()

Details

(Whiteboard: [translation] p=2 s=it-32c-31a-30b.2 [qa-])

Attachments

(1 file)

The page at the URL posted, when translated, results in an invisible text node that contains "The main menu" to become visible. It could be a reordering issue, that might be fixed by bug 1012530, might be a bug, or might be unavoidable. I'm filing this bug separately of bug 1012530 to investigate and to not forget about this test case.

Tentatively marking this as dependent on bug 1012530
Flags: firefox-backlog+
So this is not actually bug 1012530, it's a simpler problem.

Explanation: Root items are meant to be translated separately from each other. They are usually not direct children (in the DOM) of each other, but they can be. When that happens, we were translating them twice: One as part of it being a root item itself, the other as being a child node of another root.

Consider the following example:
   <div>Lorem <div>ipsum</div> dolor sit amet</div>

The div in the middle is display: block, so they're not a single run of text, and they are both roots. For the outer div, we only need the inner div as a placeholder node, because the inner node will be translated by itself as a root.

It also fixes bug 1014598, translating http://fr.wikipedia.org/wiki/Firefox, and some other pages.
No longer depends on: 1012530
Summary: Translation of this page results in an invisible text node showing up → Translation root inside root shouldn't be stringfied twice
Attached patch Skip child rootsSplinter Review
Assignee: nobody → felipc
Status: NEW → ASSIGNED
Attachment #8427367 - Flags: review?(florian)
Whiteboard: [translation] p=2
Attachment #8427367 - Flags: review?(florian) → review+
Added to Iteration 32.2
Whiteboard: [translation] p=2 → [translation] p=2 s=it-32c-31a-30b.2 [qa-]
https://hg.mozilla.org/mozilla-central/rev/2125c376fa1c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.