diff --git a/Gruntfile.js b/Gruntfile.js index 32238353b..05f8347dd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -428,21 +428,19 @@ module.exports = function(grunt) { gzip = require('zlib').gzip; grunt.registerMultiTask('lang', 'Building Language Support', function() { + var combined = ''; grunt.log.writeln('Building Language Support'); - var langFiles = this.files; - var combined; - // Create a combined languages file - langFiles.forEach(function(result) { - combined += grunt.file.read(result.src); + this.files.forEach(function(file) { + file.src.forEach(function(src){ + var code = src.replace('lang/', '').replace('.json', ''); + combined += 'videojs.options[\'languages\'][\''+code+'\'] = '+ grunt.file.read(src).trim() + ';\n'; + }); }); - combined = combined.replace('undefined', 'vjs.options["languages"] = '); - grunt.file.write('build/files/combined.languages.js', combined); - }); grunt.registerMultiTask('build', 'Building Source', function(){ @@ -462,7 +460,7 @@ module.exports = function(grunt) { combined = combined.replace(/GENERATED_CDN_VSN/g, version.majorMinor); // Add Combined Langauges - combined += grunt.file.read('build/files/combined.languages.js'); + // combined += grunt.file.read('build/files/combined.languages.js'); grunt.file.write('build/files/combined.video.js', combined); diff --git a/lang/es.json b/lang/es.json index 8dff78e48..d58a67054 100644 --- a/lang/es.json +++ b/lang/es.json @@ -1,28 +1,26 @@ -{'es': - { - 'Play': 'Juego', - 'Pause': 'Pausa', - 'Current Time': 'Tiempo Actual', - 'Duration Time': 'Tiempo de Duracion', - 'Remaining Time': 'Tiempo Restante', - 'Stream Type': 'Tipo de Transmision', - 'LIVE': 'En Vivo', - 'Loaded': 'Cargado', - 'Progress': 'Progreso', - 'Fullscreen': 'Pantalla Completa', - 'Non-Fullscreen': 'No Pantalla Completa', - 'Mute': 'Mudo', - 'Unmuted': 'Activar sonido', - 'Playback Rate': 'Reproduccion Cambio', - 'Subtitles': 'Subtitulos', - 'subtitles off': 'subtitulos fuera', - 'Captions': 'Subtitulos', - 'captions off': 'subtitulos fuera', - 'Chapters': 'Capitulos', - 'You aborted the video playback': 'Ha anulado la reproduccion de video', - 'A network error caused the video download to fail part-way.': 'Un error en la red hizo que la descarga de video falle parte del camino.', - 'The video could not be loaded, either because the server or network failed or because the format is not supported.': 'El video no se puede cargar, ya sea porque el servidor o la red fracasaron o porque el formato no es compatible.', - 'The video playback was aborted due to a corruption problem or because the video used features your browser did not support.': 'La reproduccion de video se ha cancelado debido a un problema de corrupcion o porque el video utilizado cuenta con su navegador no soporta.', - 'No compatible source was found for this video.': 'Ninguna fuente compatible se encontro para este video.' - } -} \ No newline at end of file +{ + "Play": "Juego", + "Pause": "Pausa", + "Current Time": "Tiempo Actual", + "Duration Time": "Tiempo de Duracion", + "Remaining Time": "Tiempo Restante", + "Stream Type": "Tipo de Transmision", + "LIVE": "En Vivo", + "Loaded": "Cargado", + "Progress": "Progreso", + "Fullscreen": "Pantalla Completa", + "Non-Fullscreen": "No Pantalla Completa", + "Mute": "Mudo", + "Unmuted": "Activar sonido", + "Playback Rate": "Reproduccion Cambio", + "Subtitles": "Subtitulos", + "subtitles off": "subtitulos fuera", + "Captions": "Subtitulos", + "captions off": "subtitulos fuera", + "Chapters": "Capitulos", + "You aborted the video playback": "Ha anulado la reproduccion de video", + "A network error caused the video download to fail part-way.": "Un error en la red hizo que la descarga de video falle parte del camino.", + "The video could not be loaded, either because the server or network failed or because the format is not supported.": "El video no se puede cargar, ya sea porque el servidor o la red fracasaron o porque el formato no es compatible.", + "The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La reproduccion de video se ha cancelado debido a un problema de corrupcion o porque el video utilizado cuenta con su navegador no soporta.", + "No compatible source was found for this video.": "Ninguna fuente compatible se encontro para este video." +} diff --git a/test/unit/button.js b/test/unit/button.js index 941e22945..47bae49ec 100644 --- a/test/unit/button.js +++ b/test/unit/button.js @@ -18,5 +18,5 @@ test('should localize its text', function(){ testButton.buttonText = 'Play'; el = testButton.createEl(); - ok(el.textContent, 'Juego', 'translation was successful'); + ok(el.innerHTML, 'Juego', 'translation was successful'); });