diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 5 | ||||
-rw-r--r-- | apps/files/js/files.js | 14 | ||||
-rw-r--r-- | apps/files_trashbin/js/trash.js | 12 |
3 files changed, 8 insertions, 23 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index b858e2580ee..f7cc3767b25 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -452,13 +452,14 @@ $(document).ready(function(){ var currentUploads = parseInt(uploadtext.attr('currentUploads')); currentUploads += 1; uploadtext.attr('currentUploads', currentUploads); + var translatedText = n('files', 'Uploading %n file', 'Uploading %n files', currentUploads); if(currentUploads === 1) { var img = OC.imagePath('core', 'loading.gif'); data.context.find('td.filename').attr('style','background-image:url('+img+')'); - uploadtext.text(t('files', '1 file uploading')); + uploadtext.text(translatedText); uploadtext.show(); } else { - uploadtext.text(currentUploads + ' ' + t('files', 'files uploading')); + uploadtext.text(translatedText); } } else { // add as stand-alone row to filelist diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 3fad3fae7d3..53fc25f41b0 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -759,21 +759,13 @@ function procesSelection(){ $('#headerSize').text(humanFileSize(totalSize)); var selection=''; if(selectedFolders.length>0){ - if(selectedFolders.length==1){ - selection+=t('files','1 folder'); - }else{ - selection+=t('files','{count} folders',{count: selectedFolders.length}); - } + selection += n('files', '%n folder', '%n folders', selectedFolders.length); if(selectedFiles.length>0){ selection+=' & '; } } if(selectedFiles.length>0){ - if(selectedFiles.length==1){ - selection+=t('files','1 file'); - }else{ - selection+=t('files','{count} files',{count: selectedFiles.length}); - } + selection += n('files', '%n file', '%n files', selectedFiles.length); } $('#headerName>span.name').text(selection); $('#modified').text(''); @@ -852,4 +844,4 @@ function checkTrashStatus() { $("input[type=button][id=trash]").removeAttr("disabled"); } }); -}
\ No newline at end of file +} diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js index c3c958b07a7..b14a7240cbe 100644 --- a/apps/files_trashbin/js/trash.js +++ b/apps/files_trashbin/js/trash.js @@ -188,21 +188,13 @@ function processSelection(){ $('.selectedActions').show(); var selection=''; if(selectedFolders.length>0){ - if(selectedFolders.length === 1){ - selection+=t('files','1 folder'); - }else{ - selection+=t('files','{count} folders',{count: selectedFolders.length}); - } + selection += n('files', '%n folder', '%n folders', selectedFolders.length); if(selectedFiles.length>0){ selection+=' & '; } } if(selectedFiles.length>0){ - if(selectedFiles.length === 1){ - selection+=t('files','1 file'); - }else{ - selection+=t('files','{count} files',{count: selectedFiles.length}); - } + selection += n('files', '%n file', '%n files', selectedFiles.length); } $('#headerName>span.name').text(selection); $('#modified').text(''); |