cschiller / zhongwen

Official source code of the "Zhongwen" Chrome extension
https://chrome.google.com/webstore/detail/zhongwen-chinese-english/kkmlkkjojmombglmlpbpapmhcaljjkde
GNU General Public License v2.0
312 stars 52 forks source link

make definitions appear while viewing videos with substital #118

Open cooketho opened 2 months ago

cooketho commented 2 months ago

It would be really cool to be able to use zhongwen to translate words in subtitles of movies, for example on a streaming service like Viki. I've tried it, and ALMOST have it working. The words do seem to be recognized by zhongwen because I can see them being highlighted. I think the only problem is the popup definition is being hidden behind some other object. Actually I did see the definition one time, but then I resized the window and I couldn't figure out how to get it back--I could see it was partially hidden behind something, and looked like there was a semi-transparent overlay of some sort on top of it. To reproduce:

Firefox 127.0.2 on MacOS 11.4 Installed zhongwen and substital (https://substital.com)

Downloaded subtitles as SRT file by going to https://downsub.com/sites/viki and then entering the URL of a video on Viki: https://www.viki.com/videos/1080865v I've attached the resulting file, for convenience. Actually, I first added pinyin by uploading it to the following site: https://subtitletools.com/make-chinese-pinyin-subtitles

Next, open up Firefox and go to the Viki video. Open up substital as described here: https://substital.com/getting-started. Upload the SRT file created in the step above. Now the video should be playing with subtitles that seem to be recognized by zhongwen. Note that zhongwen does not seem to recognize the simplified chinese subtitles embeded in the video directly by Viki; just the ones from substital.

Can you help? This would be so cool if it worked, and it seems like it's almost there.

[SubtitleTools.com] [Chinese] Nirvana in Fire episode 1 - 1080865v [DownSub.com].srt.txt

Quick update: I got this working with LiuChan (https://addons.mozilla.org/en-US/firefox/addon/liuchan/). I do like zhongwen, so I'd like to see it work with zhongwen as well, but for people seeing this and looking for a workaround, it does work with LiuChan.