Skip to content

Commit

Permalink
feat: allow tokens in localize, localize progress bar time (#4060)
Browse files Browse the repository at this point in the history
It allows you to use string as an key for the language files but have a default value that's different. In this case, we have a key of progress bar timing: currentTime={1} duration={2} which is used so that we have a descriptive key to what is happening. The default value matches that default value in en.json: {1} of {2}. The reason for the default value is so that the translation uses {1} of {2} for the actual localization without requiring en.json to be included in videojs by default.

Fix #4024.
  • Loading branch information
gkatsev authored Feb 21, 2017
1 parent 1f7a842 commit db01120
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 45 deletions.
5 changes: 5 additions & 0 deletions build/grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ module.exports = function(grunt) {
files: ['src/css/**/*'],
tasks: ['skin']
},
lang: {
files: ['lang/**/*.json'],
tasks: ['vjslanguages']
}
},
connect: {
dev: {
Expand Down Expand Up @@ -408,6 +412,7 @@ module.exports = function(grunt) {
'browserify:watchnovtt',
'browserify:tests',
'watch:skin',
'watch:lang',
'watch:dist'
],
// Run multiple watch tasks in parallel
Expand Down
Loading

0 comments on commit db01120

Please sign in to comment.