Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

translate class ignored after seeing notranslate #607

Closed
jelmervdl opened this issue Dec 4, 2022 · 1 comment
Closed

translate class ignored after seeing notranslate #607

jelmervdl opened this issue Dec 4, 2022 · 1 comment
Labels
bug Something isn't working page-parser

Comments

@jelmervdl
Copy link
Contributor

Describe the bug
Elements with a notranslate class are ignored by InPageTranslation. Websites like Mastodon also seem to use this to get around issues with Google Translate. However, they also mark elements that they do want translated with a translate class. Firefox Translations ignores that class at the moment.

To Reproduce
Have a page with something like this:

<p class="notranslate">
  Könnte es dieses Element bitte ignorieren?
  <span>Das wäre toll.</span>
  <span class="translate">Aber bitte übersetzen Sie diesen Satz.</span>
</p>

If you translate that page then with Google Chrome, only the last sentence will be translated. If you translate it with Firefox Translations, it doesn't.

Expected behavior
Translate elements that are marked with class="translate" when they appear inside an class="notranslate" or translate="no" element.

Desktop (please complete the following information as possible):

  • Firefox Browser version: 107.0
  • Processor information: Intel x86
  • OS version: macOS 13.0.1
  • System type (32-bit or 64-bit): 64bit
  • Firefox Translation Extension version: 1.2.0buildid20221114.185738
  • Webpage on which issue was observed: Any up-to-date Mastodon instance
  • Language of the webpage: n/a
  • Translating to (language): n/a
  • Console logs from Web Developer Tools: n/a

Additional context
I haven't been able to find any documentation for Google Translate that says that class="translate" should work. But empirically it does.

@andrenatal andrenatal added bug Something isn't working page-parser and removed needs triage labels Dec 6, 2022
@marco-c
Copy link
Contributor

marco-c commented Jul 11, 2023

Moved to Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1842814.

@marco-c marco-c closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working page-parser
Projects
None yet
Development

No branches or pull requests

3 participants