1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-25 02:42:10 +02:00

Modified language json structure to not include the code.

Also removed languages from being combined with core until we add the ability to choose languages.
This commit is contained in:
Steve Heffernan 2014-08-05 17:33:21 -07:00
parent 6b612d8cdc
commit 7ea1d8f544
3 changed files with 34 additions and 38 deletions

View File

@ -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);

View File

@ -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.'
}
}
{
"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."
}

View File

@ -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');
});