4 ms·
They both do reasonable things, so I wouldn't really blame either. Google Translate was there first and is a big accessibility advantage for the web. At the sam
by MartijnHols 2y ago
They both do reasonable things, so I wouldn't really blame either. Google Translate was there first and is a big accessibility advantage for the web. At the same time, Google Translate is the user-specific browser extension that is executed last, on top of existing apps. It affects not just React[1], so even if React were to implement a fix, Google Translate would continue to interfere with other webapps.
I think any real fix to Google Translate would be very complicated. I fear the only solution might be to elevate Google Translate to be part of the browser's rendering engine instead of acting like an extension. This would allow it to work in the rendering pipeline without modifying the DOM, but even that will probably run into site-bugs because of things like text being longer or shorter.
[1]: https://martijnhols.nl/blog/everything-about-google-translate-crashing-react#not-just-react https://martijnhols.nl/blog/everything-about-google-translat...
- bryanrasmussen 2y agoObviously you could code your site for handling these kinds of linguistic difficulties (text longer or shorter) but its been my experience even sites that are supposed to be internationalized do not do a good enough job of taking cross-language display difficulties into consideration, so I don't think people will think, sure my site is in English, but what if Google Translate turns it into Greenlandic?
- djtango 2y agoChinese/Japanese -> everything else. They're so terse, two Unicode characters can be like 10+ letters lol Sometimes I translate to understand the page then refresh to use it unborked in the original language
- JimDabell 2y agoI don’t see why Google Translate wrapping all text in <font> elements is reasonable. Why is an extra element required, and why is it <font> of all things? Translate is swapping text for text, so this shouldn’t be necessary. It also breaks a lot more than just JavaScript frameworks. Things like the child combinator in CSS selectors will break too.
- mostlylurks 2y ago> Why is an extra element required, and why is it <font> of all things? I don't know, but perhaps due to the fact that due to the CJK unification in unicode, rendering Chinese or Japanese without explicitly setting a font designed for that particular language can output incorrect characters (of the other language, which are considered "the same character" despite being different). Thus, a translation tool would have to explicitly set a font in order to display these languages correctly in a reliable manner, because the surrounding context certainly cannot be assumed to have the appropriate font. And I could easily imagine that someone would choose to keep the same code path for all languages instead of branching for this particular case, resulting in a <font> even for languages other than those two.
- LorenPechtel 2y agoI doubt that's the only case. We have multiple languages that have applied their own solutions to digital representation and the attempt to maintain backwards compatibility inevitably sets up trouble.