summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPellaeon Lin <nfsmwlin@gmail.com>2014-01-16 17:51:00 +0800
committerPellaeon Lin <nfsmwlin@gmail.com>2014-01-16 17:51:00 +0800
commitcd6ab2931325323cb59961c4327a18d934ecc72a (patch)
treebf09f012ac5eef70b51f8db375570324a369dcfc
parentdbbbfee7deb4778e4a6c0a96a50d022a414584ae (diff)
downloadnextcloud-server-cd6ab2931325323cb59961c4327a18d934ecc72a.tar.gz
nextcloud-server-cd6ab2931325323cb59961c4327a18d934ecc72a.zip
Use t() 's native method
-rw-r--r--apps/files/js/file-upload.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 1a36a580532..a003e5eec86 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -236,13 +236,19 @@ $(document).ready(function() {
// check PHP upload limit
if (selection.totalBytes > $('#upload_limit').val()) {
data.textStatus = 'sizeexceedlimit';
- data.errorThrown = t('files', 'Total file size {size1} exceeds upload limit {size2}').replace('{size1}', humanFileSize(selection.totalBytes)).replace('{size2}', humanFileSize($('#upload_limit').val()));
+ data.errorThrown = t('files', 'Total file size {size1} exceeds upload limit {size2}', {
+ 'size1': humanFileSize(selection.totalBytes),
+ 'size2': humanFileSize($('#upload_limit').val())
+ });
}
// check free space
if (selection.totalBytes > $('#free_space').val()) {
data.textStatus = 'notenoughspace';
- data.errorThrown = t('files', 'Not enough free space, you are uploading {size1} but only {size2} is left').replace('{size1}', humanFileSize(selection.totalBytes)).replace('{size2}', humanFileSize($('#free_space').val()));
+ data.errorThrown = t('files', 'Not enough free space, you are uploading {size1} but only {size2} is left', {
+ '{size1}': humanFileSize(selection.totalBytes),
+ '{size2}': humanFileSize($('#free_space').val())
+ });
}
// end upload for whole selection on error