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:
parent
6b612d8cdc
commit
7ea1d8f544
16
Gruntfile.js
16
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);
|
||||
|
||||
|
54
lang/es.json
54
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.'
|
||||
}
|
||||
}
|
||||
{
|
||||
"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."
|
||||
}
|
||||
|
@ -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');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user