Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate a track string: "subtitles off", "Custom..." #1352

Closed
ghost opened this issue Jul 17, 2014 · 4 comments
Closed

Translate a track string: "subtitles off", "Custom..." #1352

ghost opened this issue Jul 17, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 17, 2014

Hello,

I use videojs in a node-webkit application, and I'm willing to provide a fully translated application (with i18n).

I was wondering if there was a way to translate those two strings:

  • subtitles off
  • Custom...

sans titre

Either through you, or myself externally (even though it would be a pain to modify the .js file every update).

Thanks! Have a great day.

@gkatsev
Copy link
Member

gkatsev commented Jul 17, 2014

Unfortunately, currently, you'd need to grab the elements yourself change the strings manually.
We're currently working on making videojs more flexible. See #663

@ghost
Copy link
Author

ghost commented Jul 17, 2014

Damn. The thing is that I don't even see those strings in the js files. I found this that could be for "subtitles off", but it doesn't work when I change it, and I have no clue on "Custom..." yet. Automated search parsing wasn't any help.

@songpete
Copy link
Contributor

For 'subtitles', I think you would need to manually change all the references to the .kind_ for now.
There are four places in the tracks.js file where you'd have to do this:
https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L50
https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L405
https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L697
https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L897

I tried it out and it does change the text, but obviously not an ideal solution.

@mmcc
Copy link
Member

mmcc commented Jul 18, 2014

I'm going to close this one, but please feel free to continue the conversation over on #663.

@mmcc mmcc closed this as completed Jul 18, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants