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

Improve localisation #1873

Closed
wants to merge 12 commits into from
Closed

Conversation

mister-ben
Copy link
Contributor

A couple of improvements to localisation:

  • 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.

This should match how CSS applies styles based on lang attributes: http://jsbin.com/geviwa/edit

return languages[lang][string];
}
var primaryCode = lang.split('-')[0];
Copy link
Member

Choose a reason for hiding this comment

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

Though I think no one likes it at this point, most of the rest of the code declares variables at the top of the scope.

@heff
Copy link
Member

heff commented Feb 25, 2015

It sounds like there's still a little reworking to be done here, but the overall improvements sound good to me.

@thijstriemstra
Copy link
Contributor

+1!

@heff
Copy link
Member

heff commented Mar 16, 2015

@mister-ben, available to finish this one up? Let me know if you have any additional questions.

@mister-ben
Copy link
Contributor Author

I've been a bit swamped with other things, but do intend to revisit this soon.

@heff
Copy link
Member

heff commented May 11, 2015

Hey @mister-ben, still want to help finish this one up?

@mister-ben
Copy link
Contributor Author

Having another look now after getting it rebased.

mmcc and others added 10 commits May 12, 2015 22:00
bower.json: Remove font files from `main`
Per bower/spec@a325da3

closes videojs#2144

bower.json: main: fix path to video.js

bower.json: main: video-js.css => video-js.scss

Per bower/spec#43 :
> Use source files with module exports and imports over pre-built distribution files.

Also, the example in that PR includes
/sass/motion.scss in and excludes
/dist/movement.css & /dist/movement.min.css
from its `main`.

bower.json: Set moduleType & use non-dist video.js

Again, see bower/spec#43
@mister-ben
Copy link
Contributor Author

Re-done as #2177

@mister-ben mister-ben closed this May 19, 2015
@mister-ben mister-ben deleted the feature/l10n branch August 10, 2016 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants