-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Add fix for localization of not supported message #1427
Add fix for localization of not supported message #1427
Conversation
Cool. Socrates isn't a public project, so you gotta keep that in mind when describing these. Didn't realize we had a translation in there for that already. That's great. This looks good to go. |
Languages | ||
========= | ||
|
||
Multiple language support allows for users of non-English locales to property interact with the displayed player. Video.js will compile multiple langauge files (see below) and instantiate with a global dictionary of language key/value support. Video.js player instances can be created with per-player language support that amends/overrides this default values. Player instances can also hard-set default languges to values other than English as of version 4.7. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'property interact'
1. During Video.js build process. Once you have your language file created, add it to the /lang folder. Then proceed to build Video.js as normal; | ||
|
||
```bash | ||
grunt build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually doesn't work. I dropped the language compile from the default build because we wanted it to be optional and really only have our fake spanish translation anyway. So we either need to figure out how we want the grunt process to work, or describe how someone can take the json lang files and add the to a player when they create it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably do both of those. Adding additional languages to the player when they create it is described by the next point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until we have a grunt task this shouldn't say we do. Also have we told people where they can find the existing translations files?
It currently looks like we support all those language codes when we don't. Want to make it clear what's currently been translated, where they can find those files, and also how someone can contribute additional translations? |
</video> | ||
``` | ||
|
||
Language Codes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be clearer. It makes it sound like you can just plug in these language codes and they should work, but the languages need to be defined first.
Also can we tell people how they can contribute translations?
|
||
ok(vjs.options.languages[code], 'should exist'); | ||
equal(vjs.options.languages[code], data, 'should match'); | ||
deepEqual(result[code], vjs.options.languages[code], 'should also match'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any time you use options.languages, use the string version. options['languages']['code']
. I think that will fix the breaking tests.
This was merged in and released with 4.7.3 |
Fix for Socrates issue #358.