From 19efa259e9846555c06f08560ab01328c5422b99 Mon Sep 17 00:00:00 2001 From: luckydonald Date: Sun, 10 Aug 2014 23:45:06 +0200 Subject: Fixed translations, indentation and renamed the .percents class to .speed class. --- apps/files/js/file-upload.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 36bdc589745..4dc7d0be30f 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -181,7 +181,7 @@ OC.Upload = { _hideProgressBar: function() { $('#uploadprogresswrapper input.stop').fadeOut(); - $('#uploadprogresswrapper .percents').fadeOut(); + $('#uploadprogresswrapper .speed').fadeOut(); $('#uploadprogressbar').fadeOut(function() { $('#file_upload_start').trigger(new $.Event('resized')); }); @@ -455,10 +455,10 @@ OC.Upload = { fileupload.on('fileuploadstart', function(e, data) { OC.Upload.log('progress handle fileuploadstart', e, data); $('#uploadprogresswrapper input.stop').show(); - $('#uploadprogresswrapper .percents').show(); + $('#uploadprogresswrapper .speed').show(); $('#uploadprogresswrapper .label').show(); $('#uploadprogressbar').progressbar({value: 0}); - $('#uploadprogressbar .ui-progressbar-value').html('Uploading...'); + $('#uploadprogressbar .ui-progressbar-value').html('' + t('files', 'Uploading...') + ''); OC.Upload._showProgressBar(); }); fileupload.on('fileuploadprogress', function(e, data) { @@ -468,8 +468,8 @@ OC.Upload = { fileupload.on('fileuploadprogressall', function(e, data) { OC.Upload.log('progress handle fileuploadprogressall', e, data); var progress = (data.loaded / data.total) * 100; - $('#uploadprogressbar .label').text(humanFileSize(data.loaded) + " of " + humanFileSize(data.total)); - $('#uploadprogresswrapper .percents').text(humanFileSize(data.bitrate) + '/s') + $('#uploadprogressbar .label').text(t('files', '{loadedSize} of {totalSize}', {loadedSize: humanFileSize(data.loaded), totalSize: humanFileSize(data.total)})); + $('#uploadprogresswrapper .speed').text(t('files', '{bitrate}/s', {bitrate: humanFileSize(data.bitrate)})); $('#uploadprogressbar').progressbar('value', progress); }); fileupload.on('fileuploadstop', function(e, data) { -- cgit v1.2.3