Skip to content

Conversation

@lianzthang
Copy link

Description

Implemented an "Auto-Translate" feature for subtitles using Google Translate.

Features

  • Robust Translator: Added SubtitleTranslator.mjs module that rotates between 3 different Google endpoints (clients5, te, gtx) to prevent 429 rate limits.
  • Smart Recovery: Added interactive CAPTCHA detection. If Google blocks the IP, it opens a tab for the user to solve the "I am not a robot" check and then resumes automatically.
  • UI Updates: Added a "Trans:" dropdown to the subtitle menu.
  • UX Improvements: Automatically hides the original English track when translation starts so the user only sees the new language.
  • Safety: Uses dynamic imports to ensure the player core never crashes even if the translation module fails to load.

@Andrews54757
Copy link
Owner

this is a good idea but one that will have to be disabled for the chrome extension store in order to get approval from google

@lianzthang
Copy link
Author

Understood. How would you prefer I disable it for the store build? Should I wrap the functionality in a check for a specific build flag or constant (e.g., ENABLE_TRANSLATION), or do you handle that in the build script?

@ale5000-git
Copy link

ale5000-git commented Jan 9, 2026

Hi, is it possible to make it working also in other ways?
For example I see many YouTube video that only have Chinese subtitles (which I don't understand) and I would like to translate them to English or other languages.

My suggestion is:
Translate from English if present otherwise translate from the default/first language.

@Andrews54757 Andrews54757 force-pushed the main branch 3 times, most recently from 3459abd to 8efb858 Compare January 13, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants