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

Mastodon not translating since v4 #60

Closed jelmervdl closed 1 year ago

jelmervdl commented 1 year ago

I noticed that when my local Mastodon instance updated to v4, translations no longer worked.

It looks like they added class="notranslate" to the root of the app and then added class="… translate" to individual toots. We support the former (to match Google) but not the latter (I didn't know that even worked?)

So this is a feature request to implement the latter where we do dig down into notranslate elements, searching for translate elements and only submit those. I think it needs a bit of a refactor of how we filter nodes because this concept of including a subtree of an excluded tree is not really possible right now.