[GH-ISSUE #53] descriptionIndex setAttribute('translate', 'no') does nothing #50

Closed
opened 2026-03-04 00:03:23 +03:00 by kerem · 1 comment
Owner

Originally created by @raszpl on GitHub (Jul 1, 2025).
Original GitHub issue: https://github.com/YouG-o/YouTube-No-Translation/issues/53

Originally assigned to: @YouG-o on GitHub.

github.com/YouG-o/YouTube_No_Translation@91061a2a77/src/content/description/descriptionIndex.ts (L205-L213)

// Prevent translation on all levels
    [element, attributedString, snippetAttributedString].forEach(el => {
        if (el) {
            el.setAttribute('translate', 'no');

obviously Google doesnt honor https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/translate so this code is redundant

el.style.setProperty('translate', 'no', 'important');

CSS translate property is about positioning not language and since 'no' is not a valid value this instruction is ignored and doesnt set any styles

Initially I got excited when I saw this piece of code, sadly it looks like there is no magic variable/parameter one coud set to make YT stop on its own :(

Originally created by @raszpl on GitHub (Jul 1, 2025). Original GitHub issue: https://github.com/YouG-o/YouTube-No-Translation/issues/53 Originally assigned to: @YouG-o on GitHub. https://github.com/YouG-o/YouTube_No_Translation/blob/91061a2a77ef72c76ce6288f0a6a7693c4a005bb/src/content/description/descriptionIndex.ts#L205-L213 ``` // Prevent translation on all levels [element, attributedString, snippetAttributedString].forEach(el => { if (el) { el.setAttribute('translate', 'no'); ``` obviously Google doesnt honor https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/translate so this code is redundant ` el.style.setProperty('translate', 'no', 'important');` CSS translate property is about positioning not language and since 'no' is not a valid value this instruction is ignored and doesnt set any styles Initially I got excited when I saw this piece of code, sadly it looks like there is no magic variable/parameter one coud set to make YT stop on its own :(
kerem 2026-03-04 00:03:23 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@YouG-o commented on GitHub (Jul 1, 2025):

You're right, this block is a leftover from my early experiments and is 100% useless. Removed it, thanks for pointing it out!

<!-- gh-comment-id:3025681489 --> @YouG-o commented on GitHub (Jul 1, 2025): You're right, this block is a leftover from my early experiments and is 100% useless. Removed it, thanks for pointing it out!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/YouTube-No-Translation#50
No description provided.