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

Improved localisation #2177

Closed

Conversation

mister-ben
Copy link
Contributor

Replaces #1873, which got messy after being stagnant so long...

  • Try primary code before default string, e.g. if there's no de-DE translation, use de if available.
  • Treat language codes case insensitively. Safari uses en-us but Chrome and Firefox use en-US, these should be treated the same.
  • Re-merge global and player languages so that addLanguage() is still effective for players that had languages set as a setup option. Player-local languages take precedence.

@mister-ben mister-ben mentioned this pull request May 19, 2015
});
this.languages_ = languagesToLower;
}
else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This else should be on the same line as the closing curly-brace of the preceding if.

@dmlap
Copy link
Member

dmlap commented May 20, 2015

I think there may be an additional whitespace issue in here (@gkatsev, how's that code formatting build step going?) but looks good to me.

if (options['languages']) {
// Normalise player option languages to lowercase
let languagesToLower = {};
Object.getOwnPropertyNames(options['languages']).forEach(function(value,index,array){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space after commas.

@gkatsev
Copy link
Member

gkatsev commented May 20, 2015

It's coming along slowly. If someone wanted to run it locally, it's doable by installing videojs-standard as global and then running standard in the videojs folder. Should report all errors. Be aware it will also report warnings, but you can echo $? to find out the exit code to see whether it succeeded or failed. Though, error code won't help much until everything gets converted.

@mister-ben
Copy link
Contributor Author

Fixed those and other issues flagged by videojs-standard.

@heff
Copy link
Member

heff commented May 21, 2015

Suggested some changes here: mister-ben#1

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.

4 participants