jelmervdl / translatelocally-web-ext

TranslateLocally for the Browser is a web-extension that enables client side in-page translations for web browsers.
https://addons.mozilla.org/en-GB/firefox/addon/translatelocally-for-firefox/
Mozilla Public License 2.0
65 stars 3 forks source link

Youtube breaks on navigation #12

Closed jerinphilip closed 2 years ago

jerinphilip commented 2 years ago

We've discussed this in Slack, opening here so information survives slack limits with an older screenshot. Assuming still not solved.

image

It seems Youtube references specific elements from Javascript and when translation comes in and replaces those elements, the references are lost. So elements are not updated when you go to a new video (because really you’re staying on the same page, javascript just tries to replace all the content)

jelmervdl commented 2 years ago

Support has improved since v0.2.0 which re-uses existing HTML tags. In d3851b43aa025bcc6fd1e79cc66f944f96eb78d6 I started ignoring <template> tags which fixed the comments being translated. As far as I can tell, somewhere along the way the buttons becoming empty has also been fixed.

Still broken:

jelmervdl commented 2 years ago

Google Chrome using Google Translate also fails to translate Youtube apparently. I'm still not sure what Youtube does but it is probably not very common. image