Translation does not translate article title
Categories
(Firefox :: Translations, defect)
Tracking
()
People
(Reporter: peter.robinson.ch, Unassigned)
References
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0
Steps to reproduce:
Open the following webpage
https://www.bild.de/news/inland/news-inland/nostradamus-dunkle-vorhersagen-fuer-2024-neuer-europa-herrscher-ki-und-china-86251498.bild.html
And click on Translate icon in address bar.
Dialogue appears and you hit Translate button.
Actual results:
The article is translated. The article title is now. It is removed.
Expected results:
The article title must be translated. The article title must not be deleted.
The HTML in question looks like this in the original...
<h2 class="article-title">
<span class="article-title__kicker">Neuer Europa-Herrscher, KI und China</span>
<span class="article-title__separator">: </span>
<span class="article-title__headline">Nostradamus dunkle Vorhersagen für 2024</span>
</h2>
The TRANSLATE feature transforms the above HTML to this.
<h2 class="article-title">
<span class="article-title__kicker" data-moz-translations-id="0">New European ruler, CI and China </span>
<span class="article-title__separator" data-moz-translations-id="1">:</span>
</h2>
i.e. the third "SPAN" element and line is missing from the result.
In WEBTOOLS, one can MANUALLY COPY the 3rd line from the ORIGINAL back into the TRANSLATION and the translation completes successfully.
<h2 class="article-title">
<span class="article-title__kicker" data-moz-translations-id="0">New European ruler, CI and China </span>
<span class="article-title__separator" data-moz-translations-id="1">:</span>
<span class="article-title__headline" data-moz-translations-id="2">Nostradamus dark predictions for 2024</span>
</h2>
Proposed Solution:
Ensure that all sub-elements are indeed carried over from the ORIGINAL to the TRANSLATION. I've included a final version of what the Translation should show.
Shows the result (on the right) of copying the 3rd SPAN back into the TRANSLATION from the original using WEBTOOLS.
The translation kicks in, translates, increments the id and adds the data-moz-translations-id="2" mark up correctly.
Comment 4•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Translation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
2nd example, same result.
ORIGINAL HEADING HTML
<div class="articleIdentH1">
<span class="overhead">
<span class="posMarker_oh">220 Quadratmeter Wohnfläche</span>
</span>
<span class="posMarker_he">Mann heizt Altbau von 1906 mit Wärmepumpe, nach einem Jahr legt er Zahlen offen</span>
</div>
After Translation
<div class="articleIdentH1">
<span class="overhead" data-moz-translations-id="0">
<span class="posMarker_oh" data-moz-translations-id="1">220 square metres of living space</span>
</span>
</div>
Again, after MANUAL insertion of the missing SPAN element using WEBTOOLS, the text is handled correctly, the translated article heading reappears.
<div class="articleIdentH1">
<span class="overhead" data-moz-translations-id="0">
<span class="posMarker_oh" data-moz-translations-id="1">220 square metres of living space</span>
</span>
<span class="posMarker_he" data-moz-translations-id="2">Man heats old building from 1906 with heat pump, after one year he reveals figures</span>
</div>
This shows the Translated result of the original heading after manually inserting it back in using WEBTOOLS (Inspect, Edit Outer HTML).
Comment 8•2 years ago
|
||
Hello! I have managed to reproduce the issue with firefox 122.0a1(2023-12-11), 121.0b9 and 120.0.1 on Ubuntu 22.04, I will mark this issue as NEW in order to get our developers involved and provide a solution in the near future.
Have a nice day!
Comment 9•2 years ago
|
||
The first example should be fixed by Bug 1837424. This will be a good validation test case.
Updated•2 years ago
|
Description
•