diff options
Diffstat (limited to 'apps/files')
53 files changed, 801 insertions, 157 deletions
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index c327d2b9f94..1853098c507 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -53,13 +53,22 @@ $result = array( ); if(trim($filename) === '') { - $result['data'] = array('message' => $l10n->t('File name cannot be empty.')); + $result['data'] = array('message' => (string)$l10n->t('File name cannot be empty.')); OCP\JSON::error($result); exit(); } if(strpos($filename, '/') !== false) { - $result['data'] = array('message' => $l10n->t('File name must not contain "/". Please choose a different name.')); + $result['data'] = array('message' => (string)$l10n->t('File name must not contain "/". Please choose a different name.')); + OCP\JSON::error($result); + exit(); +} + +if (!\OC\Files\Filesystem::file_exists($dir . '/')) { + $result['data'] = array('message' => (string)$l10n->t( + 'The target folder has been moved or deleted.'), + 'code' => 'targetnotfound' + ); OCP\JSON::error($result); exit(); } @@ -68,7 +77,7 @@ if(strpos($filename, '/') !== false) { $target = $dir.'/'.$filename; if (\OC\Files\Filesystem::file_exists($target)) { - $result['data'] = array('message' => $l10n->t( + $result['data'] = array('message' => (string)$l10n->t( 'The name %s is already used in the folder %s. Please choose a different name.', array($filename, $dir)) ); @@ -78,20 +87,32 @@ if (\OC\Files\Filesystem::file_exists($target)) { if($source) { if(substr($source, 0, 8)!='https://' and substr($source, 0, 7)!='http://') { - OCP\JSON::error(array('data' => array( 'message' => $l10n->t('Not a valid source') ))); + OCP\JSON::error(array('data' => array('message' => $l10n->t('Not a valid source')))); + exit(); + } + + if (!ini_get('allow_url_fopen')) { + $eventSource->send('error', array('message' => $l10n->t('Server is not allowed to open URLs, please check the server configuration'))); + $eventSource->close(); exit(); } $ctx = stream_context_create(null, array('notification' =>'progress')); - $sourceStream=fopen($source, 'rb', false, $ctx); - $result=\OC\Files\Filesystem::file_put_contents($target, $sourceStream); + $sourceStream=@fopen($source, 'rb', false, $ctx); + $result = 0; + if (is_resource($sourceStream)) { + $result=\OC\Files\Filesystem::file_put_contents($target, $sourceStream); + } if($result) { $meta = \OC\Files\Filesystem::getFileInfo($target); $mime=$meta['mimetype']; $id = $meta['fileid']; - $eventSource->send('success', array('mime'=>$mime, 'size'=>\OC\Files\Filesystem::filesize($target), 'id' => $id, 'etag' => $meta['etag'])); + $eventSource->send('success', array('mime' => $mime, 'size' => \OC\Files\Filesystem::filesize($target), 'id' => $id, 'etag' => $meta['etag'])); } else { - $eventSource->send('error', $l10n->t('Error while downloading %s to %s', array($source, $target))); + $eventSource->send('error', array('message' => $l10n->t('Error while downloading %s to %s', array($source, $target)))); + } + if (is_resource($sourceStream)) { + fclose($sourceStream); } $eventSource->close(); exit(); diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php index 2cbc8cfeba5..4cfcae3090d 100644 --- a/apps/files/ajax/newfolder.php +++ b/apps/files/ajax/newfolder.php @@ -29,6 +29,15 @@ if(strpos($foldername, '/') !== false) { exit(); } +if (!\OC\Files\Filesystem::file_exists($dir . '/')) { + $result['data'] = array('message' => (string)$l10n->t( + 'The target folder has been moved or deleted.'), + 'code' => 'targetnotfound' + ); + OCP\JSON::error($result); + exit(); +} + //TODO why is stripslashes used on foldername here but not in newfile.php? $target = $dir . '/' . stripslashes($foldername); diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 0e905f993ac..8f6c42d6620 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -8,6 +8,7 @@ OCP\JSON::setContentTypeHeader('text/plain'); // If no token is sent along, rely on login only $allowedPermissions = OCP\PERMISSION_ALL; +$errorCode = null; $l = OC_L10N::get('files'); if (empty($_POST['dirToken'])) { @@ -34,6 +35,7 @@ if (empty($_POST['dirToken'])) { // resolve reshares $rootLinkItem = OCP\Share::resolveReShare($linkItem); + OCP\JSON::checkUserExists($rootLinkItem['uid_owner']); // Setup FS with owner OC_Util::tearDownFS(); OC_Util::setupFS($rootLinkItem['uid_owner']); @@ -124,7 +126,8 @@ if (strpos($dir, '..') === false) { $meta = \OC\Files\Filesystem::getFileInfo($target); if ($meta === false) { - $error = $l->t('Upload failed. Could not get file info.'); + $error = $l->t('The target folder has been moved or deleted.'); + $errorCode = 'targetnotfound'; } else { $result[] = array('status' => 'success', 'mime' => $meta['mimetype'], @@ -176,5 +179,5 @@ if ($error === false) { OCP\JSON::encodedPrint($result); exit(); } else { - OCP\JSON::error(array(array('data' => array_merge(array('message' => $error), $storageStats)))); + OCP\JSON::error(array(array('data' => array_merge(array('message' => $error, 'code' => $errorCode), $storageStats)))); } diff --git a/apps/files/appinfo/remote.php b/apps/files/appinfo/remote.php index 9f290796205..ef22fe92188 100644 --- a/apps/files/appinfo/remote.php +++ b/apps/files/appinfo/remote.php @@ -52,6 +52,7 @@ $server->addPlugin(new OC_Connector_Sabre_FilesPlugin()); $server->addPlugin(new OC_Connector_Sabre_AbortedUploadDetectionPlugin()); $server->addPlugin(new OC_Connector_Sabre_QuotaPlugin()); $server->addPlugin(new OC_Connector_Sabre_MaintenancePlugin()); +$server->addPlugin(new OC_Connector_Sabre_ExceptionLoggerPlugin('webdav')); // And off we go! $server->exec(); diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 2fc86ca537d..ca3b8500669 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -3,7 +3,7 @@ See the COPYING-README file. */ /* FILE MENU */ -.actions { padding:.3em; height:2em; width: 100%; } +.actions { padding:5px; height:32px; width: 100%; } .actions input, .actions button, .actions .button { margin:0; float:left; } .actions .button a { color: #555; } .actions .button a:hover, .actions .button a:active { color: #333; } @@ -33,9 +33,9 @@ #new>ul { display: none; position: fixed; - min-width: 7em; + min-width: 112px; z-index: 10; - padding: .5em; + padding: 8px; padding-bottom: 0; margin-top: 14px; margin-left: -1px; @@ -46,7 +46,7 @@ border-top-left-radius: 0; box-shadow:0 2px 7px rgba(170,170,170,.4); } -#new>ul>li { height:36px; margin:.3em; padding-left:3em; padding-bottom:0.1em; +#new>ul>li { height:36px; margin:5px; padding-left:48px; padding-bottom:2px; background-repeat:no-repeat; cursor:pointer; } #new>ul>li>p { cursor:pointer; padding-top: 7px; padding-bottom: 7px;} @@ -65,10 +65,15 @@ top: 44px; width: 100%; } -#filestable, #controls { - min-width: 680px; +/* make sure there's enough room for the file actions */ +#body-user #filestable { + min-width: 750px; } -#filestable tbody tr { background-color:#fff; height:2.5em; } +#body-user #controls { + min-width: 600px; +} + +#filestable tbody tr { background-color:#fff; height:40px; } #filestable tbody tr:hover, tbody tr:active { background-color: rgb(240,240,240); } @@ -83,7 +88,7 @@ span.extension, span.uploading, td.date { color:#999; } span.extension { text-transform:lowercase; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; filter:alpha(opacity=70); opacity:.7; -webkit-transition:opacity 300ms; -moz-transition:opacity 300ms; -o-transition:opacity 300ms; transition:opacity 300ms; } tr:hover span.extension { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; color:#777; } table tr.mouseOver td { background-color:#eee; } -table th { height:2em; padding:0 .5em; color:#999; } +table th { height:24px; padding:0 8px; color:#999; } table th .name { position: absolute; left: 55px; @@ -98,7 +103,7 @@ table td { } table th#headerName { position: relative; - width: 100em; /* not really sure why this works better than 100% … table styling */ + width: 9999px; /* not really sure why this works better than 100% … table styling */ padding: 0; } #headerName-container { @@ -106,15 +111,15 @@ table th#headerName { height: 50px; } table th#headerSize, table td.filesize { - min-width: 3em; - padding: 0 1em; + min-width: 48px; + padding: 0 16px; text-align: right; } table th#headerDate, table td.date { -moz-box-sizing: border-box; box-sizing: border-box; position: relative; - min-width: 11em; + min-width: 176px; } /* Multiselect bar */ @@ -140,9 +145,9 @@ table.multiselect thead th { } table.multiselect #headerName { position: relative; - width: 100%; + width: 9999px; /* when we use 100%, the styling breaks on mobile … table styling */ } -table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; } +table td.selection, table th.selection, table td.fileaction { width:32px; text-align:center; } table td.filename a.name { position:relative; /* Firefox needs to explicitly have this default set … */ -moz-box-sizing: border-box; @@ -160,8 +165,8 @@ table td.filename input.filename { margin-left: 2px; cursor: text; } -table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em .3em; } -table td.filename .nametext, .uploadtext, .modified { float:left; padding:.3em 0; } +table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:3px 8px 8px 3px; } +table td.filename .nametext, .uploadtext, .modified { float:left; padding:14px 0; } #modified { position: absolute; @@ -181,8 +186,8 @@ table td.filename .nametext { text-overflow: ellipsis; max-width: 800px; } -table td.filename .uploadtext { font-weight:normal; margin-left:.5em; } -table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } +table td.filename .uploadtext { font-weight:normal; margin-left:8px; } +table td.filename form { font-size:14px; margin-left:48px; margin-right:48px; } .ie8 input[type="checkbox"]{ padding: 0; @@ -217,6 +222,11 @@ table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } width: 50px; z-index: 5; } +#fileList tr td.filename>input[type="checkbox"]{ + /* sometimes checkbox height is bigger (KDE/Qt), so setting to absolute + * to prevent it to increase the height */ + position: absolute; +} #fileList tr td.filename>input[type="checkbox"] + label { left: 0; } @@ -237,7 +247,7 @@ table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } #fileList tr td.filename a.name label { position: absolute; - width: 100%; + width: 80%; height: 50px; } @@ -250,11 +260,11 @@ table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } right: 0; } -#fileList img.move2trash { display:inline; margin:-.5em 0; padding:1em .5em 1em .5em !important; float:right; } +#fileList img.move2trash { display:inline; margin:-8px 0; padding:16px 8px 16px 8px !important; float:right; } #fileList a.action.delete { position: absolute; right: 0; - padding: 9px 14px 19px !important; + padding: 28px 14px 19px !important; } a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; } @@ -272,13 +282,13 @@ a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; } } .selectedActions a img { position:relative; - top:.3em; + top:5px; } #fileList a.action { display: inline; - margin: -.5em 0; + margin: -8px 0; padding: 18px 8px !important; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); diff --git a/apps/files/css/upload.css b/apps/files/css/upload.css index ef043569094..06b4d4655fe 100644 --- a/apps/files/css/upload.css +++ b/apps/files/css/upload.css @@ -5,7 +5,7 @@ height: 36px; width: 39px; padding: 0 !important; /* override default control bar button padding */ - margin-left: .2em; + margin-left: 3px; overflow: hidden; vertical-align: top; } @@ -18,9 +18,6 @@ margin: -5px -3px; cursor: pointer; z-index: 10; - background-image: url('%webroot%/core/img/actions/upload.svg'); - background-repeat: no-repeat; - background-position: center; opacity: .65; } .file_upload_target { display:none; } @@ -33,7 +30,7 @@ height: 44px; margin: -5px -3px; padding: 0; - font-size: 1em; + font-size: 16px; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; z-index: 20; cursor: pointer; @@ -119,11 +116,6 @@ .oc-dialog .fileexists .conflict input[type='checkbox'] { float: left; } -.oc-dialog .fileexists .toggle { - background-image: url('%webroot%/core/img/actions/triangle-e.png'); - width: 16px; - height: 16px; -} .oc-dialog .fileexists #allfileslabel { float:right; } diff --git a/apps/files/download.php b/apps/files/download.php index e3fe24e45d7..6b055e99a53 100644 --- a/apps/files/download.php +++ b/apps/files/download.php @@ -37,12 +37,7 @@ if(!\OC\Files\Filesystem::file_exists($filename)) { $ftype=\OC\Files\Filesystem::getMimeType( $filename ); header('Content-Type:'.$ftype); -if ( preg_match( "/MSIE/", $_SERVER["HTTP_USER_AGENT"] ) ) { - header( 'Content-Disposition: attachment; filename="' . rawurlencode( basename($filename) ) . '"' ); -} else { - header( 'Content-Disposition: attachment; filename*=UTF-8\'\'' . rawurlencode( basename($filename) ) - . '; filename="' . rawurlencode( basename($filename) ) . '"' ); -} +OCP\Response::setContentDispositionHeader(basename($filename), 'attachment'); OCP\Response::disableCaching(); header('Content-Length: '.\OC\Files\Filesystem::filesize($filename)); diff --git a/apps/files/index.php b/apps/files/index.php index 61b32bc6fe3..dd63f29bc28 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -63,7 +63,6 @@ $files = array(); $user = OC_User::getUser(); if (\OC\Files\Cache\Upgrade::needUpgrade($user)) { //dont load anything if we need to upgrade the cache $needUpgrade = true; - $freeSpace = 0; } else { if ($isIE8){ // after the redirect above, the URL will have a format @@ -77,7 +76,6 @@ if (\OC\Files\Cache\Upgrade::needUpgrade($user)) { //dont load anything if we ne else{ $files = \OCA\Files\Helper::getFiles($dir); } - $freeSpace = \OC\Files\Filesystem::free_space($dir); $needUpgrade = false; } diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 0d7df31f355..149e4a9666b 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -222,6 +222,14 @@ $(document).ready(function() { //examine file var file = data.files[0]; + try { + // FIXME: not so elegant... need to refactor that method to return a value + Files.isFileNameValid(file.name); + } + catch (errorMessage) { + data.textStatus = 'invalidcharacters'; + data.errorThrown = errorMessage; + } if (file.type === '' && file.size === 4096) { data.textStatus = 'dirorzero'; @@ -319,6 +327,13 @@ $(document).ready(function() { } else { // HTTP connection problem OC.Notification.show(data.errorThrown); + if (data.result) { + var result = JSON.parse(data.result); + if (result && result[0] && result[0].data && result[0].data.code === 'targetnotfound') { + // abort upload of next files if any + OC.Upload.cancelUploads(); + } + } } //hide notification after 10 sec setTimeout(function() { @@ -617,7 +632,7 @@ $(document).ready(function() { if (result.status === 'success') { var date=new Date(); FileList.addDir(name, 0, date, hidden); - var tr=$('tr[data-file="'+name+'"]'); + var tr = FileList.findFileEl(name); tr.attr('data-id', result.data.id); } else { OC.dialogs.alert(result.data.message, t('core', 'Could not create folder')); @@ -659,7 +674,7 @@ $(document).ready(function() { $('#uploadprogressbar').fadeOut(); var date = new Date(); FileList.addFile(localName, size, date, false, hidden); - var tr = $('tr[data-file="'+localName+'"]'); + var tr = FileList.findFileEl(localName); tr.data('mime', mime).data('id', id); tr.attr('data-id', id); var path = $('#dir').val()+'/'+localName; @@ -670,7 +685,12 @@ $(document).ready(function() { }); eventSource.listen('error',function(error) { $('#uploadprogressbar').fadeOut(); - alert(error); + var message = (error && error.message) || t('core', 'Error fetching URL'); + OC.Notification.show(message); + //hide notification after 10 sec + setTimeout(function() { + OC.Notification.hide(); + }, 10000); }); break; } diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 03e23189a97..d0ef2491bdf 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -71,7 +71,7 @@ var FileActions = { FileActions.currentFile = parent; var actions = FileActions.get(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); var file = FileActions.getCurrentFile(); - if ($('tr[data-file="'+file+'"]').data('renaming')) { + if (FileList.findFileEl(file).data('renaming')) { return; } @@ -103,9 +103,9 @@ var FileActions = { } var html = '<a href="#" class="action" data-action="' + name + '">'; if (img) { - html += '<img class ="svg" src="' + img + '" /> '; + html += '<img class ="svg" src="' + img + '" />'; } - html += t('files', name) + '</a>'; + html += '<span> ' + t('files', name) + '</span></a>'; var element = $(html); element.data('action', name); @@ -173,7 +173,10 @@ $(document).ready(function () { FileActions.register(downloadScope, 'Download', OC.PERMISSION_READ, function () { return OC.imagePath('core', 'actions/download'); }, function (filename) { - window.location = OC.filePath('files', 'ajax', 'download.php') + '?files=' + encodeURIComponent(filename) + '&dir=' + encodeURIComponent($('#dir').val()); + var url = FileList.getDownloadUrl(filename); + if (url) { + OC.redirect(url); + } }); } $('#fileList tr').each(function () { diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 473bcf25f2d..63fd0f4ce05 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -6,6 +6,13 @@ var FileList={ $(this).attr('data-file',decodeURIComponent($(this).attr('data-file'))); }); }, + /** + * Returns the tr element for a given file name + */ + findFileEl: function(fileName){ + // use filterAttr to avoid escaping issues + return $('#fileList tr').filterAttr('data-file', fileName); + }, update:function(fileListHtml) { var $fileList = $('#fileList'); $fileList.empty().html(fileListHtml); @@ -20,6 +27,8 @@ var FileList={ Files.setupDragAndDrop(); } FileList.updateFileSummary(); + procesSelection(); + $fileList.trigger(jQuery.Event("updated")); }, createRow:function(type, name, iconurl, linktarget, size, lastModified, permissions) { @@ -292,8 +301,12 @@ var FileList={ $('#filestable').toggleClass('hidden', show); }, remove:function(name){ - $('tr').filterAttr('data-file',name).find('td.filename').draggable('destroy'); - $('tr').filterAttr('data-file',name).remove(); + var fileEl = FileList.findFileEl(name); + if (fileEl.data('permissions') & OC.PERMISSION_DELETE) { + // file is only draggable when delete permissions are set + fileEl.find('td.filename').draggable('destroy'); + } + fileEl.remove(); FileList.updateFileSummary(); if ( ! $('tr[data-file]').exists() ) { $('#emptycontent').removeClass('hidden'); @@ -334,7 +347,7 @@ var FileList={ FileList.updateFileSummary(); }, loadingDone:function(name, id) { - var mime, tr = $('tr[data-file="'+name+'"]'); + var mime, tr = FileList.findFileEl(name); tr.data('loading', false); mime = tr.data('mime'); tr.attr('data-mime', mime); @@ -347,12 +360,12 @@ var FileList={ }, null, null, tr.attr('data-etag')); tr.find('td.filename').draggable(dragOptions); }, - isLoading:function(name) { - return $('tr[data-file="'+name+'"]').data('loading'); + isLoading:function(file) { + return FileList.findFileEl(file).data('loading'); }, rename:function(oldname) { var tr, td, input, form; - tr = $('tr[data-file="'+oldname+'"]'); + tr = FileList.findFileEl(oldname); tr.data('renaming',true); td = tr.children('td.filename'); input = $('<input type="text" class="filename"/>').val(oldname); @@ -500,14 +513,16 @@ var FileList={ form.trigger('submit'); }); }, - inList:function(filename) { - return $('#fileList tr[data-file="'+filename+'"]').length; + inList:function(file) { + return FileList.findFileEl(file).length; }, replace:function(oldName, newName, isNewFile) { // Finish any existing actions - $('tr[data-file="'+oldName+'"]').hide(); - $('tr[data-file="'+newName+'"]').hide(); - var tr = $('tr[data-file="'+oldName+'"]').clone(); + var oldFileEl = FileList.findFileEl(oldName); + var newFileEl = FileList.findFileEl(newName); + oldFileEl.hide(); + newFileEl.hide(); + var tr = oldFileEl.clone(); tr.attr('data-replace', 'true'); tr.attr('data-file', newName); var td = tr.children('td.filename'); @@ -559,7 +574,7 @@ var FileList={ files=[files]; } for (var i=0; i<files.length; i++) { - var deleteAction = $('tr[data-file="'+files[i]+'"]').children("td.date").children(".action.delete"); + var deleteAction = FileList.findFileEl(files[i]).children("td.date").children(".action.delete"); deleteAction.removeClass('delete-icon').addClass('progress-icon'); } // Finish any existing actions @@ -573,7 +588,7 @@ var FileList={ function(result) { if (result.status === 'success') { $.each(files,function(index,file) { - var files = $('tr[data-file="'+file+'"]'); + var files = FileList.findFileEl(file); files.remove(); files.find('input[type="checkbox"]').removeAttr('checked'); files.removeClass('selected'); @@ -595,7 +610,7 @@ var FileList={ OC.Notification.hide(); }, 10000); $.each(files,function(index,file) { - var deleteAction = $('tr[data-file="' + file + '"] .action.delete'); + var deleteAction = FileList.findFileEl(file).find('.action.delete'); deleteAction.removeClass('progress-icon').addClass('delete-icon'); }); } @@ -737,7 +752,7 @@ var FileList={ }, scrollTo:function(file) { //scroll to and highlight preselected file - var $scrolltorow = $('tr[data-file="'+file+'"]'); + var $scrolltorow = FileList.findFileEl(file); if ($scrolltorow.exists()) { $scrolltorow.addClass('searchresult'); $(window).scrollTop($scrolltorow.position().top); @@ -765,6 +780,20 @@ var FileList={ $('#fileList tr.searchresult').each(function(i,e) { $(e).removeClass("searchresult"); }); + }, + + /** + * Returns the download URL of the given file + * @param filename file name of the file + * @param dir optional directory in which the file name is, defaults to the current directory + */ + getDownloadUrl: function(filename, dir) { + var params = { + files: filename, + dir: dir || FileList.getCurrentDirectory(), + download: null + }; + return OC.filePath('files', 'ajax', 'download.php') + '?' + OC.buildQueryString(params); } }; @@ -949,7 +978,7 @@ $(document).ready(function() { $('#notification').on('click', '.undo', function() { if (FileList.deleteFiles) { $.each(FileList.deleteFiles,function(index,file) { - $('tr[data-file="'+file+'"]').show(); + FileList.findFileEl(file).show(); }); FileList.deleteCanceled=true; FileList.deleteFiles=null; @@ -959,10 +988,10 @@ $(document).ready(function() { FileList.deleteCanceled = false; FileList.deleteFiles = [FileList.replaceOldName]; } else { - $('tr[data-file="'+FileList.replaceOldName+'"]').show(); + FileList.findFileEl(FileList.replaceOldName).show(); } $('tr[data-replace="true"').remove(); - $('tr[data-file="'+FileList.replaceNewName+'"]').show(); + FileList.findFileEl(FileList.replaceNewName).show(); FileList.replaceCanceled = true; FileList.replaceOldName = null; FileList.replaceNewName = null; @@ -977,7 +1006,8 @@ $(document).ready(function() { }); }); $('#notification:first-child').on('click', '.suggest', function() { - $('tr[data-file="'+$('#notification > span').attr('data-oldName')+'"]').show(); + var file = $('#notification > span').attr('data-oldName'); + FileList.findFileEl(file).show(); OC.Notification.hide(); }); $('#notification:first-child').on('click', '.cancel', function() { diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 0a2f1aef013..06f37da4b5c 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -283,7 +283,7 @@ $(document).ready(function() { procesSelection(); } else { var filename=$(this).parent().parent().attr('data-file'); - var tr=$('tr[data-file="'+filename+'"]'); + var tr = FileList.findFileEl(filename); var renaming=tr.data('renaming'); if (!renaming && !FileList.isLoading(filename)) { FileActions.currentFile = $(this).parent(); @@ -494,7 +494,7 @@ var createDragShadow = function(event) { var dir=$('#dir').val(); $(selectedFiles).each(function(i,elem) { - var newtr = $('<tr/>').attr('data-dir', dir).attr('data-filename', elem.name); + var newtr = $('<tr/>').attr('data-dir', dir).attr('data-filename', elem.name).attr('data-origin', elem.origin); newtr.append($('<td/>').addClass('filename').text(elem.name)); newtr.append($('<td/>').addClass('size').text(humanFileSize(elem.size))); tbody.append(newtr); @@ -512,13 +512,30 @@ var createDragShadow = function(event) { }; //options for file drag/drop +//start&stop handlers needs some cleaning up var dragOptions={ revert: 'invalid', revertDuration: 300, opacity: 0.7, zIndex: 100, appendTo: 'body', cursorAt: { left: 24, top: 18 }, helper: createDragShadow, cursor: 'move', - stop: function(event, ui) { - $('#fileList tr td.filename').addClass('ui-draggable'); - } + start: function(event, ui){ + var $selectedFiles = $('td.filename input:checkbox:checked'); + if($selectedFiles.length > 1){ + $selectedFiles.parents('tr').fadeTo(250, 0.2); + } + else{ + $(this).fadeTo(250, 0.2); + } + }, + stop: function(event, ui) { + var $selectedFiles = $('td.filename input:checkbox:checked'); + if($selectedFiles.length > 1){ + $selectedFiles.parents('tr').fadeTo(250, 1); + } + else{ + $(this).fadeTo(250, 1); + } + $('#fileList tr td.filename').addClass('ui-draggable'); + } }; // sane browsers support using the distance option if ( $('html.ie').length === 0) { @@ -526,6 +543,7 @@ if ( $('html.ie').length === 0) { } var folderDropOptions={ + hoverClass: "canDrop", drop: function( event, ui ) { //don't allow moving a file into a selected folder if ($(event.target).parents('tr').find('td input:first').prop('checked') === true) { @@ -538,14 +556,21 @@ var folderDropOptions={ $(files).each(function(i,row) { var dir = $(row).data('dir'); var file = $(row).data('filename'); + //slapdash selector, tracking down our original element that the clone budded off of. + var origin = $('tr[data-id=' + $(row).data('origin') + ']'); + var td = origin.children('td.filename'); + var oldBackgroundImage = td.css('background-image'); + td.css('background-image', 'url('+ OC.imagePath('core', 'loading.gif') + ')'); $.post(OC.filePath('files', 'ajax', 'move.php'), { dir: dir, file: file, target: dir+'/'+target }, function(result) { if (result) { if (result.status === 'success') { //recalculate folder size - var oldSize = $('#fileList tr[data-file="'+target+'"]').data('size'); - var newSize = oldSize + $('#fileList tr[data-file="'+file+'"]').data('size'); - $('#fileList tr[data-file="'+target+'"]').data('size', newSize); - $('#fileList tr[data-file="'+target+'"]').find('td.filesize').text(humanFileSize(newSize)); + var oldFile = FileList.findFileEl(target); + var newFile = FileList.findFileEl(file); + var oldSize = oldFile.data('size'); + var newSize = oldSize + newFile.data('size'); + oldFile.data('size', newSize); + oldFile.find('td.filesize').text(humanFileSize(newSize)); FileList.remove(file); procesSelection(); @@ -558,6 +583,7 @@ var folderDropOptions={ } else { OC.dialogs.alert(t('files', 'Error moving file'), t('files', 'Error')); } + td.css('background-image', oldBackgroundImage); }); }); }, @@ -582,6 +608,11 @@ var crumbDropOptions={ $(files).each(function(i,row) { var dir = $(row).data('dir'); var file = $(row).data('filename'); + //slapdash selector, tracking down our original element that the clone budded off of. + var origin = $('tr[data-id=' + $(row).data('origin') + ']'); + var td = origin.children('td.filename'); + var oldBackgroundImage = td.css('background-image'); + td.css('background-image', 'url('+ OC.imagePath('core', 'loading.gif') + ')'); $.post(OC.filePath('files', 'ajax', 'move.php'), { dir: dir, file: file, target: target }, function(result) { if (result) { if (result.status === 'success') { @@ -596,6 +627,7 @@ var crumbDropOptions={ } else { OC.dialogs.alert(t('files', 'Error moving file'), t('files', 'Error')); } + td.css('background-image', oldBackgroundImage); }); }); }, @@ -611,11 +643,12 @@ function procesSelection() { return el.type==='dir'; }); if (selectedFiles.length === 0 && selectedFolders.length === 0) { - $('#headerName>span.name').text(t('files','Name')); + $('#headerName span.name').text(t('files','Name')); $('#headerSize').text(t('files','Size')); $('#modified').text(t('files','Modified')); $('table').removeClass('multiselect'); $('.selectedActions').hide(); + $('#select_all').removeAttr('checked'); } else { $('.selectedActions').show(); @@ -661,7 +694,8 @@ function getSelectedFilesTrash(property) { mime:$(element).data('mime'), type:$(element).data('type'), size:$(element).data('size'), - etag:$(element).data('etag') + etag:$(element).data('etag'), + origin: $(element).data('id') }; if (property) { files.push(file[property]); @@ -718,7 +752,7 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) { console.warn('Files.lazyLoadPreview(): missing etag argument'); } - if ( $('#publicUploadButtonMock').length ) { + if ( $('#isPublic').length ) { urlSpec.t = $('#dirToken').val(); previewURL = OC.Router.generate('core_ajax_public_preview', urlSpec); } else { @@ -739,7 +773,7 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) { } function getUniqueName(name) { - if ($('tr[data-file="'+name+'"]').exists()) { + if (FileList.findFileEl(name).exists()) { var parts=name.split('.'); var extension = ""; if (parts.length > 1) { @@ -781,3 +815,4 @@ function onClickBreadcrumb(e) { FileList.changeDirectory(decodeURIComponent($targetDir)); } } + diff --git a/apps/files/l10n/ak.php b/apps/files/l10n/ak.php new file mode 100644 index 00000000000..f229792722d --- /dev/null +++ b/apps/files/l10n/ak.php @@ -0,0 +1,7 @@ +<?php +$TRANSLATIONS = array( +"_%n folder_::_%n folders_" => array("",""), +"_%n file_::_%n files_" => array("",""), +"_Uploading %n file_::_Uploading %n files_" => array("","") +); +$PLURAL_FORMS = "nplurals=2; plural=n > 1;"; diff --git a/apps/files/l10n/az.php b/apps/files/l10n/az.php new file mode 100644 index 00000000000..70ab6572ba4 --- /dev/null +++ b/apps/files/l10n/az.php @@ -0,0 +1,7 @@ +<?php +$TRANSLATIONS = array( +"_%n folder_::_%n folders_" => array(""), +"_%n file_::_%n files_" => array(""), +"_Uploading %n file_::_Uploading %n files_" => array("") +); +$PLURAL_FORMS = "nplurals=1; plural=0;"; diff --git a/apps/files/l10n/be.php b/apps/files/l10n/be.php index 17262d2184d..830400b93fb 100644 --- a/apps/files/l10n/be.php +++ b/apps/files/l10n/be.php @@ -2,6 +2,7 @@ $TRANSLATIONS = array( "_%n folder_::_%n folders_" => array("","","",""), "_%n file_::_%n files_" => array("","","",""), -"_Uploading %n file_::_Uploading %n files_" => array("","","","") +"_Uploading %n file_::_Uploading %n files_" => array("","","",""), +"Error" => "Памылка" ); $PLURAL_FORMS = "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"; diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php index 75698f569e5..44e0fdae1f1 100644 --- a/apps/files/l10n/cs_CZ.php +++ b/apps/files/l10n/cs_CZ.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Název souboru nesmí obsahovat \"/\". Vyberte prosím jiné jméno.", "The name %s is already used in the folder %s. Please choose a different name." => "Název %s ve složce %s již existuje. Vyberte prosím jiné jméno.", "Not a valid source" => "Neplatný zdroj", +"Server is not allowed to open URLs, please check the server configuration" => "Server není oprávněn otevírat adresy URL. Ověřte, prosím, konfiguraci serveru.", "Error while downloading %s to %s" => "Chyba při stahování %s do %s", "Error when creating the file" => "Chyba při vytváření souboru", "Folder name cannot be empty." => "Název složky nemůže být prázdný.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} již existuje", "Could not create file" => "Nepodařilo se vytvořit soubor", "Could not create folder" => "Nepodařilo se vytvořit složku", +"Error fetching URL" => "Chyba při načítání URL", "Share" => "Sdílet", "Delete permanently" => "Trvale odstranit", "Rename" => "Přejmenovat", diff --git a/apps/files/l10n/da.php b/apps/files/l10n/da.php index 93c9cb75925..9b7722444a8 100644 --- a/apps/files/l10n/da.php +++ b/apps/files/l10n/da.php @@ -3,6 +3,15 @@ $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "Kunne ikke flytte %s - der findes allerede en fil med dette navn", "Could not move %s" => "Kunne ikke flytte %s", "File name cannot be empty." => "Filnavnet kan ikke stå tomt.", +"File name must not contain \"/\". Please choose a different name." => "Filnavnet må ikke indeholde \"/\". Vælg venligst et andet navn.", +"The name %s is already used in the folder %s. Please choose a different name." => "Navnet %s er allerede i brug i mappen %s. Vælg venligst et andet navn.", +"Not a valid source" => "Ikke en gyldig kilde", +"Server is not allowed to open URLs, please check the server configuration" => "Server har ikke tilladelse til at åbne URL'er. Kontroller venligst serverens indstillinger", +"Error while downloading %s to %s" => "Fejl ved hentning af %s til %s", +"Error when creating the file" => "Fejl ved oprettelse af fil", +"Folder name cannot be empty." => "Mappenavnet kan ikke være tomt.", +"Folder name must not contain \"/\". Please choose a different name." => "Mappenavnet må ikke indeholde \"/\". Vælg venligst et andet navn.", +"Error when creating the folder" => "Fejl ved oprettelse af mappen", "Unable to set upload directory." => "Ude af stand til at vælge upload mappe.", "Invalid Token" => "Ugyldig Token ", "No file was uploaded. Unknown error" => "Ingen fil blev uploadet. Ukendt fejl.", @@ -23,13 +32,20 @@ $TRANSLATIONS = array( "Upload cancelled." => "Upload afbrudt.", "Could not get result from server." => "Kunne ikke hente resultat fra server.", "File upload is in progress. Leaving the page now will cancel the upload." => "Fil upload kører. Hvis du forlader siden nu, vil uploadet blive annuleret.", +"URL cannot be empty" => "URL kan ikke være tom", +"In the home folder 'Shared' is a reserved filename" => "Navnet 'Shared' er reserveret i hjemmemappen.", "{new_name} already exists" => "{new_name} eksisterer allerede", +"Could not create file" => "Kunne ikke oprette fil", +"Could not create folder" => "Kunne ikke oprette mappe", +"Error fetching URL" => "Fejl ved URL", "Share" => "Del", "Delete permanently" => "Slet permanent", "Rename" => "Omdøb", "Pending" => "Afventer", +"Could not rename file" => "Kunne ikke omdøbe filen", "replaced {new_name} with {old_name}" => "erstattede {new_name} med {old_name}", "undo" => "fortryd", +"Error deleting file." => "Fejl ved sletnign af fil.", "_%n folder_::_%n folders_" => array("%n mappe","%n mapper"), "_%n file_::_%n files_" => array("%n fil","%n filer"), "{dirs} and {files}" => "{dirs} og {files}", @@ -38,6 +54,8 @@ $TRANSLATIONS = array( "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ugyldigt navn, '\\', '/', '<', '>', ':' | '?', '\"', '', og '*' er ikke tilladt.", "Your storage is full, files can not be updated or synced anymore!" => "Din opbevaringsplads er fyldt op, filer kan ikke opdateres eller synkroniseres længere!", "Your storage is almost full ({usedSpacePercent}%)" => "Din opbevaringsplads er næsten fyldt op ({usedSpacePercent}%)", +"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Krypteringsprogrammet er aktiveret, men din nøgle er ikke igangsat. Log venligst ud og ind igen.", +"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Ugyldig privat nøgle for krypteringsprogrammet. Opdater venligst dit kodeord for den private nøgle i dine personlige indstillinger. Det kræves for at få adgang til dine krypterede filer.", "Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Krypteringen blev deaktiveret, men dine filer er stadig krypteret. Gå venligst til dine personlige indstillinger for at dekryptere dine filer. ", "Your download is being prepared. This might take some time if the files are big." => "Dit download forberedes. Dette kan tage lidt tid ved større filer.", "Error moving file" => "Fejl ved flytning af fil", @@ -45,6 +63,7 @@ $TRANSLATIONS = array( "Name" => "Navn", "Size" => "Størrelse", "Modified" => "Ændret", +"Invalid folder name. Usage of 'Shared' is reserved." => "Ugyldig mappenavn. 'Shared' er reserveret.", "%s could not be renamed" => "%s kunne ikke omdøbes", "Upload" => "Upload", "File handling" => "Filhåndtering", @@ -56,12 +75,14 @@ $TRANSLATIONS = array( "Maximum input size for ZIP files" => "Maksimal størrelse på ZIP filer", "Save" => "Gem", "New" => "Ny", +"New text file" => "Ny tekstfil", "Text file" => "Tekstfil", "New folder" => "Ny Mappe", "Folder" => "Mappe", "From link" => "Fra link", "Deleted files" => "Slettede filer", "Cancel upload" => "Fortryd upload", +"You don’t have permission to upload or create files here" => "Du har ikke tilladelse til at uploade eller oprette filer her", "Nothing in here. Upload something!" => "Her er tomt. Upload noget!", "Download" => "Download", "Delete" => "Slet", diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index 4617eaef6fd..b209fee88ae 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Der Dateiname darf kein \"/\" enthalten. Bitte wähle einen anderen Namen.", "The name %s is already used in the folder %s. Please choose a different name." => "Der Name %s wird bereits im Ordner %s benutzt. Bitte wähle einen anderen Namen.", "Not a valid source" => "Keine gültige Quelle", +"Server is not allowed to open URLs, please check the server configuration" => "Dem Server ist das Öffnen von URLs nicht erlaubt, bitte die Serverkonfiguration prüfen", "Error while downloading %s to %s" => "Fehler beim Herunterladen von %s nach %s", "Error when creating the file" => "Fehler beim Erstellen der Datei", "Folder name cannot be empty." => "Der Ordner-Name darf nicht leer sein.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} existiert bereits", "Could not create file" => "Die Datei konnte nicht erstellt werden", "Could not create folder" => "Der Ordner konnte nicht erstellt werden", +"Error fetching URL" => "Fehler beim Abrufen der URL", "Share" => "Teilen", "Delete permanently" => "Endgültig löschen", "Rename" => "Umbenennen", diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index 2502b540cd8..76cdce00e4c 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Der Dateiname darf kein \"/\" enthalten. Bitte wählen Sie einen anderen Namen.", "The name %s is already used in the folder %s. Please choose a different name." => "Der Name %s wird bereits im Ordner %s benutzt. Bitte wählen Sie einen anderen Namen.", "Not a valid source" => "Keine gültige Quelle", +"Server is not allowed to open URLs, please check the server configuration" => "Dem Server ist das Öffnen von URLs nicht erlaubt, bitte die Serverkonfiguration prüfen", "Error while downloading %s to %s" => "Fehler beim Herunterladen von %s nach %s", "Error when creating the file" => "Fehler beim Erstellen der Datei", "Folder name cannot be empty." => "Der Ordner-Name darf nicht leer sein.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} existiert bereits", "Could not create file" => "Die Datei konnte nicht erstellt werden", "Could not create folder" => "Der Ordner konnte nicht erstellt werden", +"Error fetching URL" => "Fehler beim Abrufen der URL", "Share" => "Teilen", "Delete permanently" => "Endgültig löschen", "Rename" => "Umbenennen", diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php index cab7b2c6e31..9efe1af7dd3 100644 --- a/apps/files/l10n/el.php +++ b/apps/files/l10n/el.php @@ -3,6 +3,15 @@ $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "Αδυναμία μετακίνησης του %s - υπάρχει ήδη αρχείο με αυτό το όνομα", "Could not move %s" => "Αδυναμία μετακίνησης του %s", "File name cannot be empty." => "Το όνομα αρχείου δεν μπορεί να είναι κενό.", +"File name must not contain \"/\". Please choose a different name." => "Το όνομα αρχείου δεν μπορεί να περιέχει \"/\". Παρακαλώ επιλέξτε ένα διαφορετικό όνομα. ", +"The name %s is already used in the folder %s. Please choose a different name." => "Το όνομα %s χρησιμοποιείτε ήδη στον φάκελο %s. Παρακαλώ επιλέξτε ένα άλλο όνομα.", +"Not a valid source" => "Μη έγκυρη πηγή", +"Server is not allowed to open URLs, please check the server configuration" => "Ο διακομιστής δεν επιτρέπεται να ανοίγει URL, παρακαλώ ελέγξτε τις ρυθμίσεις του διακομιστή", +"Error while downloading %s to %s" => "Σφάλμα κατά τη λήψη του %s στο %s", +"Error when creating the file" => "Σφάλμα κατά τη δημιουργία του αρχείου", +"Folder name cannot be empty." => "Το όνομα φακέλου δεν μπορεί να είναι κενό.", +"Folder name must not contain \"/\". Please choose a different name." => "Το όνομα φακέλου δεν μπορεί να περιέχει \"/\". Παρακαλώ επιλέξτε ένα διαφορετικό όνομα. ", +"Error when creating the folder" => "Σφάλμα δημιουργίας φακέλου", "Unable to set upload directory." => "Αδυναμία ορισμού καταλόγου αποστολής.", "Invalid Token" => "Μη έγκυρο Token", "No file was uploaded. Unknown error" => "Δεν ανέβηκε κάποιο αρχείο. Άγνωστο σφάλμα", @@ -14,25 +23,39 @@ $TRANSLATIONS = array( "Missing a temporary folder" => "Λείπει ο προσωρινός φάκελος", "Failed to write to disk" => "Αποτυχία εγγραφής στο δίσκο", "Not enough storage available" => "Μη επαρκής διαθέσιμος αποθηκευτικός χώρος", +"Upload failed. Could not get file info." => "Η φόρτωση απέτυχε. Αδυναμία λήψης πληροφοριών αρχείων.", +"Upload failed. Could not find uploaded file" => "Η φόρτωση απέτυχε. Αδυναμία εύρεσης αρχείου προς φόρτωση.", "Invalid directory." => "Μη έγκυρος φάκελος.", "Files" => "Αρχεία", +"Unable to upload {filename} as it is a directory or has 0 bytes" => "Αδυναμία φόρτωσης {filename} καθώς είναι κατάλογος αρχείων ή έχει 0 bytes", "Not enough space available" => "Δεν υπάρχει αρκετός διαθέσιμος χώρος", "Upload cancelled." => "Η αποστολή ακυρώθηκε.", +"Could not get result from server." => "Αδυναμία λήψης αποτελέσματος από το διακομιστή.", "File upload is in progress. Leaving the page now will cancel the upload." => "Η αποστολή του αρχείου βρίσκεται σε εξέλιξη. Το κλείσιμο της σελίδας θα ακυρώσει την αποστολή.", +"URL cannot be empty" => "Η URL δεν πρέπει να είναι κενή", +"In the home folder 'Shared' is a reserved filename" => "Στον αρχικό φάκελο το όνομα 'Shared' διατηρείται από το σύστημα", "{new_name} already exists" => "{new_name} υπάρχει ήδη", +"Could not create file" => "Αδυναμία δημιουργίας αρχείου", +"Could not create folder" => "Αδυναμία δημιουργίας φακέλου", +"Error fetching URL" => "Σφάλμα φόρτωσης URL", "Share" => "Διαμοιρασμός", "Delete permanently" => "Μόνιμη διαγραφή", "Rename" => "Μετονομασία", "Pending" => "Εκκρεμεί", +"Could not rename file" => "Αδυναμία μετονομασίας αρχείου", "replaced {new_name} with {old_name}" => "αντικαταστάθηκε το {new_name} με {old_name}", "undo" => "αναίρεση", +"Error deleting file." => "Σφάλμα διαγραφής αρχείου.", "_%n folder_::_%n folders_" => array("%n φάκελος","%n φάκελοι"), "_%n file_::_%n files_" => array("%n αρχείο","%n αρχεία"), +"{dirs} and {files}" => "{Κατάλογοι αρχείων} και {αρχεία}", "_Uploading %n file_::_Uploading %n files_" => array("Ανέβασμα %n αρχείου","Ανέβασμα %n αρχείων"), "'.' is an invalid file name." => "'.' είναι μη έγκυρο όνομα αρχείου.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Μη έγκυρο όνομα, '\\', '/', '<', '>', ':', '\"', '|', '?' και '*' δεν επιτρέπονται.", "Your storage is full, files can not be updated or synced anymore!" => "Ο αποθηκευτικός σας χώρος είναι γεμάτος, τα αρχεία δεν μπορούν να ενημερωθούν ή να συγχρονιστούν πια!", "Your storage is almost full ({usedSpacePercent}%)" => "Ο αποθηκευτικός χώρος είναι σχεδόν γεμάτος ({usedSpacePercent}%)", +"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Η εφαρμογή κρυπτογράφησης είναι ενεργοποιημένη αλλά τα κλειδιά σας δεν έχουν καταγραφεί, παρακαλώ αποσυνδεθείτε και επανασυνδεθείτε.", +"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Άκυρο προσωπικό κλειδί για την εφαρμογή κρυπτογράφησης. Παρακαλώ ενημερώστε τον κωδικό του προσωπικού κλειδίου σας στις προσωπικές ρυθμίσεις για να επανακτήσετε πρόσβαση στα κρυπτογραφημένα σας αρχεία.", "Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Η κρυπτογράφηση απενεργοποιήθηκε, αλλά τα αρχεία σας είναι ακόμα κρυπτογραφημένα. Παρακαλούμε απενεργοποιήσετε την κρυπτογράφηση αρχείων από τις προσωπικές σας ρυθμίσεις", "Your download is being prepared. This might take some time if the files are big." => "Η λήψη προετοιμάζεται. Αυτό μπορεί να πάρει ώρα εάν τα αρχεία έχουν μεγάλο μέγεθος.", "Error moving file" => "Σφάλμα κατά τη μετακίνηση του αρχείου", @@ -40,6 +63,7 @@ $TRANSLATIONS = array( "Name" => "Όνομα", "Size" => "Μέγεθος", "Modified" => "Τροποποιήθηκε", +"Invalid folder name. Usage of 'Shared' is reserved." => "Άκυρο όνομα φακέλου. Η χρήση του 'Shared' διατηρείται από το σύστημα.", "%s could not be renamed" => "Αδυναμία μετονομασίας του %s", "Upload" => "Μεταφόρτωση", "File handling" => "Διαχείριση αρχείων", @@ -51,12 +75,14 @@ $TRANSLATIONS = array( "Maximum input size for ZIP files" => "Μέγιστο μέγεθος για αρχεία ZIP", "Save" => "Αποθήκευση", "New" => "Νέο", +"New text file" => "Νέο αρχείο κειμένου", "Text file" => "Αρχείο κειμένου", "New folder" => "Νέος κατάλογος", "Folder" => "Φάκελος", "From link" => "Από σύνδεσμο", "Deleted files" => "Διαγραμμένα αρχεία", "Cancel upload" => "Ακύρωση αποστολής", +"You don’t have permission to upload or create files here" => "Δεν έχετε δικαιώματα φόρτωσης ή δημιουργίας αρχείων εδώ", "Nothing in here. Upload something!" => "Δεν υπάρχει τίποτα εδώ. Ανεβάστε κάτι!", "Download" => "Λήψη", "Delete" => "Διαγραφή", diff --git a/apps/files/l10n/en_GB.php b/apps/files/l10n/en_GB.php index e45c4bf4ede..ac93aa68abb 100644 --- a/apps/files/l10n/en_GB.php +++ b/apps/files/l10n/en_GB.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "File name must not contain \"/\". Please choose a different name.", "The name %s is already used in the folder %s. Please choose a different name." => "The name %s is already used in the folder %s. Please choose a different name.", "Not a valid source" => "Not a valid source", +"Server is not allowed to open URLs, please check the server configuration" => "Server is not allowed to open URLs, please check the server configuration", "Error while downloading %s to %s" => "Error whilst downloading %s to %s", "Error when creating the file" => "Error when creating the file", "Folder name cannot be empty." => "Folder name cannot be empty.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} already exists", "Could not create file" => "Could not create file", "Could not create folder" => "Could not create folder", +"Error fetching URL" => "Error fetching URL", "Share" => "Share", "Delete permanently" => "Delete permanently", "Rename" => "Rename", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 84e11df6818..bfbb80e8962 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "El nombre del archivo, NO puede contener el simbolo\"/\", por favor elija un nombre diferente.", "The name %s is already used in the folder %s. Please choose a different name." => "El nombre %s ya está en uso por la carpeta %s. Por favor elija uno diferente.", "Not a valid source" => "No es un origen válido", +"Server is not allowed to open URLs, please check the server configuration" => "El servidor no puede acceder URLs; revise la configuración del servidor.", "Error while downloading %s to %s" => "Error mientras se descargaba %s a %s", "Error when creating the file" => "Error al crear el archivo", "Folder name cannot be empty." => "El nombre de la carpeta no puede estar vacío.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} ya existe", "Could not create file" => "No se pudo crear el archivo", "Could not create folder" => "No se pudo crear la carpeta", +"Error fetching URL" => "Error al descargar URL.", "Share" => "Compartir", "Delete permanently" => "Eliminar permanentemente", "Rename" => "Renombrar", diff --git a/apps/files/l10n/es_CL.php b/apps/files/l10n/es_CL.php new file mode 100644 index 00000000000..6f97758878f --- /dev/null +++ b/apps/files/l10n/es_CL.php @@ -0,0 +1,9 @@ +<?php +$TRANSLATIONS = array( +"Files" => "Archivos", +"_%n folder_::_%n folders_" => array("",""), +"_%n file_::_%n files_" => array("",""), +"_Uploading %n file_::_Uploading %n files_" => array("",""), +"Upload" => "Subir" +); +$PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/apps/files/l10n/es_MX.php b/apps/files/l10n/es_MX.php index 0157af093e9..0b7571defc7 100644 --- a/apps/files/l10n/es_MX.php +++ b/apps/files/l10n/es_MX.php @@ -1,7 +1,95 @@ <?php $TRANSLATIONS = array( -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), -"_Uploading %n file_::_Uploading %n files_" => array("","") +"Could not move %s - File with this name already exists" => "No se pudo mover %s - Ya existe un archivo con ese nombre.", +"Could not move %s" => "No se pudo mover %s", +"File name cannot be empty." => "El nombre de archivo no puede estar vacío.", +"File name must not contain \"/\". Please choose a different name." => "El nombre del archivo, NO puede contener el simbolo\"/\", por favor elija un nombre diferente.", +"The name %s is already used in the folder %s. Please choose a different name." => "El nombre %s ya está en uso por la carpeta %s. Por favor elija uno diferente.", +"Not a valid source" => "No es un origen válido", +"Server is not allowed to open URLs, please check the server configuration" => "El servidor no puede acceder URLs; revise la configuración del servidor.", +"Error while downloading %s to %s" => "Error mientras se descargaba %s a %s", +"Error when creating the file" => "Error al crear el archivo", +"Folder name cannot be empty." => "El nombre de la carpeta no puede estar vacío.", +"Folder name must not contain \"/\". Please choose a different name." => "El nombre de la carpeta, NO puede contener el simbolo\"/\", por favor elija un nombre diferente.", +"Error when creating the folder" => "Error al crear la carpeta.", +"Unable to set upload directory." => "Incapaz de crear directorio de subida.", +"Invalid Token" => "Token Inválido", +"No file was uploaded. Unknown error" => "No se subió ningún archivo. Error desconocido", +"There is no error, the file uploaded with success" => "No hubo ningún problema, el archivo se subió con éxito", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "El archivo subido sobrepasa la directiva 'upload_max_filesize' en php.ini:", +"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "El archivo subido sobrepasa la directiva 'MAX_FILE_SIZE' especificada en el formulario HTML", +"The uploaded file was only partially uploaded" => "El archivo subido fue sólo subido parcialmente", +"No file was uploaded" => "No se subió ningún archivo", +"Missing a temporary folder" => "Falta la carpeta temporal", +"Failed to write to disk" => "Falló al escribir al disco", +"Not enough storage available" => "No hay suficiente espacio disponible", +"Upload failed. Could not get file info." => "Actualización fallida. No se pudo obtener información del archivo.", +"Upload failed. Could not find uploaded file" => "Actualización fallida. No se pudo encontrar el archivo subido", +"Invalid directory." => "Directorio inválido.", +"Files" => "Archivos", +"Unable to upload {filename} as it is a directory or has 0 bytes" => "No ha sido posible subir {filename} porque es un directorio o tiene 0 bytes", +"Not enough space available" => "No hay suficiente espacio disponible", +"Upload cancelled." => "Subida cancelada.", +"Could not get result from server." => "No se pudo obtener respuesta del servidor.", +"File upload is in progress. Leaving the page now will cancel the upload." => "La subida del archivo está en proceso. Si sale de la página ahora, la subida será cancelada.", +"URL cannot be empty" => "La dirección URL no puede estar vacía", +"In the home folder 'Shared' is a reserved filename" => "En la carpeta de inicio, 'Shared' es un nombre reservado", +"{new_name} already exists" => "{new_name} ya existe", +"Could not create file" => "No se pudo crear el archivo", +"Could not create folder" => "No se pudo crear la carpeta", +"Error fetching URL" => "Error al descargar URL.", +"Share" => "Compartir", +"Delete permanently" => "Eliminar permanentemente", +"Rename" => "Renombrar", +"Pending" => "Pendiente", +"Could not rename file" => "No se pudo renombrar el archivo", +"replaced {new_name} with {old_name}" => "reemplazado {new_name} con {old_name}", +"undo" => "deshacer", +"Error deleting file." => "Error borrando el archivo.", +"_%n folder_::_%n folders_" => array("%n carpeta","%n carpetas"), +"_%n file_::_%n files_" => array("%n archivo","%n archivos"), +"{dirs} and {files}" => "{dirs} y {files}", +"_Uploading %n file_::_Uploading %n files_" => array("Subiendo %n archivo","Subiendo %n archivos"), +"'.' is an invalid file name." => "'.' no es un nombre de archivo válido.", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nombre inválido, los caracteres \"\\\", \"/\", \"<\", \">\", \":\", \"\", \"|\" \"?\" y \"*\" no están permitidos ", +"Your storage is full, files can not be updated or synced anymore!" => "Su almacenamiento está lleno, ¡los archivos no se actualizarán ni sincronizarán más!", +"Your storage is almost full ({usedSpacePercent}%)" => "Su almacenamiento está casi lleno ({usedSpacePercent}%)", +"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "La aplicación de crifrado está habilitada pero tus claves no han sido inicializadas, por favor, cierra la sesión y vuelva a iniciarla de nuevo.", +"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "La clave privada no es válida para la aplicación de cifrado. Por favor, actualiza la contraseña de tu clave privada en tus ajustes personales para recuperar el acceso a tus archivos cifrados.", +"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "El cifrado ha sido deshabilitado pero tus archivos permanecen cifrados. Por favor, ve a tus ajustes personales para descifrar tus archivos.", +"Your download is being prepared. This might take some time if the files are big." => "Su descarga está siendo preparada. Esto podría tardar algo de tiempo si los archivos son grandes.", +"Error moving file" => "Error moviendo archivo", +"Error" => "Error", +"Name" => "Nombre", +"Size" => "Tamaño", +"Modified" => "Modificado", +"Invalid folder name. Usage of 'Shared' is reserved." => "Nombre de carpeta inválido. El uso de \"Shared\" esta reservado.", +"%s could not be renamed" => "%s no pudo ser renombrado", +"Upload" => "Subir", +"File handling" => "Administración de archivos", +"Maximum upload size" => "Tamaño máximo de subida", +"max. possible: " => "máx. posible:", +"Needed for multi-file and folder downloads." => "Necesario para multi-archivo y descarga de carpetas", +"Enable ZIP-download" => "Habilitar descarga en ZIP", +"0 is unlimited" => "0 significa ilimitado", +"Maximum input size for ZIP files" => "Tamaño máximo para archivos ZIP de entrada", +"Save" => "Guardar", +"New" => "Nuevo", +"New text file" => "Nuevo archivo de texto", +"Text file" => "Archivo de texto", +"New folder" => "Nueva carpeta", +"Folder" => "Carpeta", +"From link" => "Desde enlace", +"Deleted files" => "Archivos eliminados", +"Cancel upload" => "Cancelar subida", +"You don’t have permission to upload or create files here" => "No tienes permisos para subir o crear archivos aquí.", +"Nothing in here. Upload something!" => "No hay nada aquí. ¡Suba algo!", +"Download" => "Descargar", +"Delete" => "Eliminar", +"Upload too large" => "Subida demasido grande", +"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Los archivos que estás intentando subir sobrepasan el tamaño máximo permitido en este servidor.", +"Files are being scanned, please wait." => "Los archivos están siendo escaneados, por favor espere.", +"Current scanning" => "Escaneo actual", +"Upgrading filesystem cache..." => "Actualizando caché del sistema de archivos..." ); $PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/apps/files/l10n/et_EE.php b/apps/files/l10n/et_EE.php index 98f74e1f001..fd031527738 100644 --- a/apps/files/l10n/et_EE.php +++ b/apps/files/l10n/et_EE.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Faili nimi ei tohi sisaldada \"/\". Palun vali mõni teine nimi.", "The name %s is already used in the folder %s. Please choose a different name." => "Nimi %s on juba kasutusel kataloogis %s. Palun vali mõni teine nimi.", "Not a valid source" => "Pole korrektne lähteallikas", +"Server is not allowed to open URLs, please check the server configuration" => "Server ei võimalda URL-ide avamist, palun kontrolli serveri seadistust", "Error while downloading %s to %s" => "Viga %s allalaadimisel %s", "Error when creating the file" => "Viga faili loomisel", "Folder name cannot be empty." => "Kataloogi nimi ei saa olla tühi.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} on juba olemas", "Could not create file" => "Ei suuda luua faili", "Could not create folder" => "Ei suuda luua kataloogi", +"Error fetching URL" => "Viga URL-i haaramisel", "Share" => "Jaga", "Delete permanently" => "Kustuta jäädavalt", "Rename" => "Nimeta ümber", diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php index 6726775dd96..5df480c2bc3 100644 --- a/apps/files/l10n/eu.php +++ b/apps/files/l10n/eu.php @@ -3,6 +3,14 @@ $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "Ezin da %s mugitu - Izen hau duen fitxategia dagoeneko existitzen da", "Could not move %s" => "Ezin dira fitxategiak mugitu %s", "File name cannot be empty." => "Fitxategi izena ezin da hutsa izan.", +"File name must not contain \"/\". Please choose a different name." => "Fitxategi izenak ezin du \"/\" izan. Mesedez hautatu beste izen bat.", +"The name %s is already used in the folder %s. Please choose a different name." => "%s izena dagoeneko erabilita dago %s karpetan. Mesdez hautatu izen ezberdina.", +"Not a valid source" => "Ez da jatorri baliogarria", +"Error while downloading %s to %s" => "Errorea %s %sra deskargatzerakoan", +"Error when creating the file" => "Errorea fitxategia sortzerakoan", +"Folder name cannot be empty." => "Karpeta izena ezin da hutsa izan.", +"Folder name must not contain \"/\". Please choose a different name." => "Karpeta izenak ezin du \"/\" izan. Mesedez hautatu beste izen bat.", +"Error when creating the folder" => "Errorea karpeta sortzerakoan", "Unable to set upload directory." => "Ezin da igoera direktorioa ezarri.", "Invalid Token" => "Lekuko baliogabea", "No file was uploaded. Unknown error" => "Ez da fitxategirik igo. Errore ezezaguna", @@ -23,13 +31,19 @@ $TRANSLATIONS = array( "Upload cancelled." => "Igoera ezeztatuta", "Could not get result from server." => "Ezin da zerbitzaritik emaitzik lortu", "File upload is in progress. Leaving the page now will cancel the upload." => "Fitxategien igoera martxan da. Orria orain uzteak igoera ezeztatutko du.", +"URL cannot be empty" => "URLa ezin da hutsik egon", +"In the home folder 'Shared' is a reserved filename" => "Etxeko (home) karpetan 'Shared' erreserbatutako fitxategi izena da", "{new_name} already exists" => "{new_name} dagoeneko existitzen da", +"Could not create file" => "Ezin izan da fitxategia sortu", +"Could not create folder" => "Ezin izan da karpeta sortu", "Share" => "Elkarbanatu", "Delete permanently" => "Ezabatu betirako", "Rename" => "Berrizendatu", "Pending" => "Zain", +"Could not rename file" => "Ezin izan da fitxategia berrizendatu", "replaced {new_name} with {old_name}" => " {new_name}-k {old_name} ordezkatu du", "undo" => "desegin", +"Error deleting file." => "Errorea fitxategia ezabatzerakoan.", "_%n folder_::_%n folders_" => array("karpeta %n","%n karpeta"), "_%n file_::_%n files_" => array("fitxategi %n","%n fitxategi"), "{dirs} and {files}" => "{dirs} eta {files}", @@ -47,6 +61,7 @@ $TRANSLATIONS = array( "Name" => "Izena", "Size" => "Tamaina", "Modified" => "Aldatuta", +"Invalid folder name. Usage of 'Shared' is reserved." => "Baliogabeako karpeta izena. 'Shared' izena erreserbatuta dago.", "%s could not be renamed" => "%s ezin da berrizendatu", "Upload" => "Igo", "File handling" => "Fitxategien kudeaketa", @@ -58,12 +73,14 @@ $TRANSLATIONS = array( "Maximum input size for ZIP files" => "ZIP fitxategien gehienezko tamaina", "Save" => "Gorde", "New" => "Berria", +"New text file" => "Testu fitxategi berria", "Text file" => "Testu fitxategia", "New folder" => "Karpeta berria", "Folder" => "Karpeta", "From link" => "Estekatik", "Deleted files" => "Ezabatutako fitxategiak", "Cancel upload" => "Ezeztatu igoera", +"You don’t have permission to upload or create files here" => "Ez duzu fitxategiak hona igotzeko edo hemen sortzeko baimenik", "Nothing in here. Upload something!" => "Ez dago ezer. Igo zerbait!", "Download" => "Deskargatu", "Delete" => "Ezabatu", diff --git a/apps/files/l10n/fi_FI.php b/apps/files/l10n/fi_FI.php index 2c7327b0f39..d1241b77da0 100644 --- a/apps/files/l10n/fi_FI.php +++ b/apps/files/l10n/fi_FI.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Tiedoston nimessä ei saa olla merkkiä \"/\". Valitse toinen nimi.", "The name %s is already used in the folder %s. Please choose a different name." => "Nimi %s on jo käytössä kansiossa %s. Valitse toinen nimi.", "Not a valid source" => "Virheellinen lähde", +"Server is not allowed to open URLs, please check the server configuration" => "Palvelimen ei ole lupa avata verkko-osoitteita. Tarkista palvelimen asetukset", "Error while downloading %s to %s" => "Virhe ladatessa kohdetta %s sijaintiin %s", "Error when creating the file" => "Virhe tiedostoa luotaessa", "Folder name cannot be empty." => "Kansion nimi ei voi olla tyhjä.", @@ -32,6 +33,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} on jo olemassa", "Could not create file" => "Tiedoston luominen epäonnistui", "Could not create folder" => "Kansion luominen epäonnistui", +"Error fetching URL" => "Virhe noutaessa verkko-osoitetta", "Share" => "Jaa", "Delete permanently" => "Poista pysyvästi", "Rename" => "Nimeä uudelleen", diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index c493e2d5537..73b89434778 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Le nom de fichier ne doit pas contenir \"/\". Merci de choisir un nom différent.", "The name %s is already used in the folder %s. Please choose a different name." => "Le nom %s est déjà utilisé dans le dossier %s. Merci de choisir un nom différent.", "Not a valid source" => "La source n'est pas valide", +"Server is not allowed to open URLs, please check the server configuration" => "Le serveur n'est pas autorisé à ouvrir des URL, veuillez vérifier la configuration du serveur", "Error while downloading %s to %s" => "Erreur pendant le téléchargement de %s à %s", "Error when creating the file" => "Erreur pendant la création du fichier", "Folder name cannot be empty." => "Le nom de dossier ne peux pas être vide.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} existe déjà", "Could not create file" => "Impossible de créer le fichier", "Could not create folder" => "Impossible de créer le dossier", +"Error fetching URL" => "Erreur d'accès à l'URL", "Share" => "Partager", "Delete permanently" => "Supprimer de façon définitive", "Rename" => "Renommer", diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php index c2d8d9b7d1e..1d22691d93c 100644 --- a/apps/files/l10n/gl.php +++ b/apps/files/l10n/gl.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "O nome do ficheiro non pode conter «/». Escolla outro nome.", "The name %s is already used in the folder %s. Please choose a different name." => "Xa existe o nome %s no cartafol %s. Escolla outro nome.", "Not a valid source" => "Esta orixe non é correcta", +"Server is not allowed to open URLs, please check the server configuration" => "O servidor non ten permisos para abrir os enderezos URL, comprobe a configuración do servidor", "Error while downloading %s to %s" => "Produciuse un erro ao descargar %s en %s", "Error when creating the file" => "Produciuse un erro ao crear o ficheiro", "Folder name cannot be empty." => "O nome de cartafol non pode estar baleiro.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "Xa existe un {new_name}", "Could not create file" => "Non foi posíbel crear o ficheiro", "Could not create folder" => "Non foi posíbel crear o cartafol", +"Error fetching URL" => "Produciuse un erro ao obter o URL", "Share" => "Compartir", "Delete permanently" => "Eliminar permanentemente", "Rename" => "Renomear", diff --git a/apps/files/l10n/hu_HU.php b/apps/files/l10n/hu_HU.php index f2150f05994..22c3926ed1c 100644 --- a/apps/files/l10n/hu_HU.php +++ b/apps/files/l10n/hu_HU.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Az állomány neve nem tartalmazhatja a \"/\" karaktert. Kérem válasszon másik nevet!", "The name %s is already used in the folder %s. Please choose a different name." => "A %s név már létezik a %s mappában. Kérem válasszon másik nevet!", "Not a valid source" => "A kiinduló állomány érvénytelen", +"Server is not allowed to open URLs, please check the server configuration" => "A kiszolgálón nincs engedélyezve URL-ek megnyitása, kérem ellenőrizze a beállításokat", "Error while downloading %s to %s" => "Hiba történt miközben %s-t letöltöttük %s-be", "Error when creating the file" => "Hiba történt az állomány létrehozásakor", "Folder name cannot be empty." => "A mappa neve nem maradhat kitöltetlenül", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} már létezik", "Could not create file" => "Az állomány nem hozható létre", "Could not create folder" => "A mappa nem hozható létre", +"Error fetching URL" => "A megadott URL-ről nem sikerül adatokat kapni", "Share" => "Megosztás", "Delete permanently" => "Végleges törlés", "Rename" => "Átnevezés", @@ -43,6 +45,7 @@ $TRANSLATIONS = array( "Could not rename file" => "Az állomány nem nevezhető át", "replaced {new_name} with {old_name}" => "{new_name} fájlt kicseréltük ezzel: {old_name}", "undo" => "visszavonás", +"Error deleting file." => "Hiba a file törlése közben.", "_%n folder_::_%n folders_" => array("%n mappa","%n mappa"), "_%n file_::_%n files_" => array("%n állomány","%n állomány"), "{dirs} and {files}" => "{dirs} és {files}", @@ -72,6 +75,7 @@ $TRANSLATIONS = array( "Maximum input size for ZIP files" => "ZIP-fájlok maximális kiindulási mérete", "Save" => "Mentés", "New" => "Új", +"New text file" => "Új szöveges file", "Text file" => "Szövegfájl", "New folder" => "Új mappa", "Folder" => "Mappa", diff --git a/apps/files/l10n/id.php b/apps/files/l10n/id.php index 719b092f3f9..4e254ff6f60 100644 --- a/apps/files/l10n/id.php +++ b/apps/files/l10n/id.php @@ -3,6 +3,16 @@ $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "Tidak dapat memindahkan %s - Berkas dengan nama ini sudah ada", "Could not move %s" => "Tidak dapat memindahkan %s", "File name cannot be empty." => "Nama berkas tidak boleh kosong.", +"File name must not contain \"/\". Please choose a different name." => "Nama berkas tidak boleh mengandung \"/\". Silakan pilih nama yang berbeda.", +"The name %s is already used in the folder %s. Please choose a different name." => "Nama %s sudah digunakan dalam folder %s. Silakan pilih nama yang berbeda.", +"Not a valid source" => "Sumber tidak sah", +"Error while downloading %s to %s" => "Galat saat mengunduh %s ke %s", +"Error when creating the file" => "Galat saat membuat berkas", +"Folder name cannot be empty." => "Nama folder tidak bolh kosong.", +"Folder name must not contain \"/\". Please choose a different name." => "Nama folder tidak boleh mengandung \"/\". Silakan pilih nama yang berbeda.", +"Error when creating the folder" => "Galat saat membuat folder", +"Unable to set upload directory." => "Tidak dapat mengatur folder unggah", +"Invalid Token" => "Token tidak sah", "No file was uploaded. Unknown error" => "Tidak ada berkas yang diunggah. Galat tidak dikenal.", "There is no error, the file uploaded with success" => "Tidak ada galat, berkas sukses diunggah", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Berkas yang diunggah melampaui direktif upload_max_filesize pada php.ini", @@ -12,30 +22,47 @@ $TRANSLATIONS = array( "Missing a temporary folder" => "Folder sementara tidak ada", "Failed to write to disk" => "Gagal menulis ke disk", "Not enough storage available" => "Ruang penyimpanan tidak mencukupi", +"Upload failed. Could not get file info." => "Unggah gagal. Tidak mendapatkan informasi berkas.", +"Upload failed. Could not find uploaded file" => "Unggah gagal. Tidak menemukan berkas yang akan diunggah", "Invalid directory." => "Direktori tidak valid.", "Files" => "Berkas", +"Unable to upload {filename} as it is a directory or has 0 bytes" => "Tidak dapat mengunggah {filename} karena ini sebuah direktori atau memiliki ukuran 0 byte", "Not enough space available" => "Ruang penyimpanan tidak mencukupi", "Upload cancelled." => "Pengunggahan dibatalkan.", +"Could not get result from server." => "Tidak mendapatkan hasil dari server.", "File upload is in progress. Leaving the page now will cancel the upload." => "Berkas sedang diunggah. Meninggalkan halaman ini akan membatalkan proses.", +"URL cannot be empty" => "URL tidak boleh kosong", +"In the home folder 'Shared' is a reserved filename" => "Pada folder home, 'Shared' adalah nama berkas yang sudah digunakan", "{new_name} already exists" => "{new_name} sudah ada", +"Could not create file" => "Tidak dapat membuat berkas", +"Could not create folder" => "Tidak dapat membuat folder", "Share" => "Bagikan", "Delete permanently" => "Hapus secara permanen", "Rename" => "Ubah nama", "Pending" => "Menunggu", +"Could not rename file" => "Tidak dapat mengubah nama berkas", "replaced {new_name} with {old_name}" => "mengganti {new_name} dengan {old_name}", "undo" => "urungkan", -"_%n folder_::_%n folders_" => array(""), -"_%n file_::_%n files_" => array(""), -"_Uploading %n file_::_Uploading %n files_" => array(""), +"Error deleting file." => "Galat saat menghapus berkas.", +"_%n folder_::_%n folders_" => array("%n folder"), +"_%n file_::_%n files_" => array("%n berkas"), +"{dirs} and {files}" => "{dirs} dan {files}", +"_Uploading %n file_::_Uploading %n files_" => array("Mengunggah %n berkas"), "'.' is an invalid file name." => "'.' bukan nama berkas yang valid.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nama tidak valid, karakter '\\', '/', '<', '>', ':', '\"', '|', '?' dan '*' tidak diizinkan.", "Your storage is full, files can not be updated or synced anymore!" => "Ruang penyimpanan Anda penuh, berkas tidak dapat diperbarui atau disinkronkan lagi!", "Your storage is almost full ({usedSpacePercent}%)" => "Ruang penyimpanan hampir penuh ({usedSpacePercent}%)", +"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Aplikasi Enskripsi telah diaktifkan tetapi kunci tidak diinisialisasi, silakan log-out dan log-in lagi", +"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Kunci privat tidak sah untuk Aplikasi Enskripsi. Silakan perbarui sandi kunci privat anda pada pengaturan pribadi untuk memulihkan akses ke berkas anda yang dienskripsi.", +"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Enskripi telah dinonaktifkan tetapi berkas anda tetap dienskripsi. Silakan menuju ke pengaturan pribadi untuk deskrip berkas anda.", "Your download is being prepared. This might take some time if the files are big." => "Unduhan Anda sedang disiapkan. Prosesnya dapat berlangsung agak lama jika ukuran berkasnya besar.", +"Error moving file" => "Galat saat memindahkan berkas", "Error" => "Galat", "Name" => "Nama", "Size" => "Ukuran", "Modified" => "Dimodifikasi", +"Invalid folder name. Usage of 'Shared' is reserved." => "Nama folder tidak sah. Menggunakan 'Shared' sudah digunakan.", +"%s could not be renamed" => "%s tidak dapat diubah nama", "Upload" => "Unggah", "File handling" => "Penanganan berkas", "Maximum upload size" => "Ukuran pengunggahan maksimum", @@ -46,12 +73,14 @@ $TRANSLATIONS = array( "Maximum input size for ZIP files" => "Ukuran masukan maksimum untuk berkas ZIP", "Save" => "Simpan", "New" => "Baru", +"New text file" => "Berkas teks baru", "Text file" => "Berkas teks", "New folder" => "Map baru", "Folder" => "Folder", "From link" => "Dari tautan", "Deleted files" => "Berkas yang dihapus", "Cancel upload" => "Batal pengunggahan", +"You don’t have permission to upload or create files here" => "Anda tidak memiliki akses untuk mengunggah atau membuat berkas disini", "Nothing in here. Upload something!" => "Tidak ada apa-apa di sini. Unggah sesuatu!", "Download" => "Unduh", "Delete" => "Hapus", diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php index 335ae416567..2a10e9977f4 100644 --- a/apps/files/l10n/it.php +++ b/apps/files/l10n/it.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Il nome del file non può contenere il carattere \"/\". Scegli un nome diverso.", "The name %s is already used in the folder %s. Please choose a different name." => "Il nome %s è attualmente in uso nella cartella %s. Scegli un nome diverso.", "Not a valid source" => "Non è una sorgente valida", +"Server is not allowed to open URLs, please check the server configuration" => "Al server non è permesso aprire URL, controlla la configurazione del server", "Error while downloading %s to %s" => "Errore durante lo scaricamento di %s su %s", "Error when creating the file" => "Errore durante la creazione del file", "Folder name cannot be empty." => "Il nome della cartella non può essere vuoto.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} esiste già", "Could not create file" => "Impossibile creare il file", "Could not create folder" => "Impossibile creare la cartella", +"Error fetching URL" => "Errore durante il recupero dello URL", "Share" => "Condividi", "Delete permanently" => "Elimina definitivamente", "Rename" => "Rinomina", diff --git a/apps/files/l10n/ja_JP.php b/apps/files/l10n/ja_JP.php index 93dd9ed12b0..8019b825d3c 100644 --- a/apps/files/l10n/ja_JP.php +++ b/apps/files/l10n/ja_JP.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "ファイル名には \"/\" を含めることはできません。別の名前を選択してください。", "The name %s is already used in the folder %s. Please choose a different name." => "%s はフォルダ %s ないですでに使われています。別の名前を選択してください。", "Not a valid source" => "有効なソースではありません", +"Server is not allowed to open URLs, please check the server configuration" => "サーバーは、URLを開くことは許されません。サーバーの設定をチェックしてください。", "Error while downloading %s to %s" => "%s から %s へのダウンロードエラー", "Error when creating the file" => "ファイルの生成エラー", "Folder name cannot be empty." => "フォルダ名は空にできません", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} はすでに存在しています", "Could not create file" => "ファイルを作成できませんでした", "Could not create folder" => "フォルダを作成できませんでした", +"Error fetching URL" => "URL取得エラー", "Share" => "共有", "Delete permanently" => "完全に削除する", "Rename" => "名前の変更", @@ -73,6 +75,7 @@ $TRANSLATIONS = array( "Maximum input size for ZIP files" => "ZIPファイルへの最大入力サイズ", "Save" => "保存", "New" => "新規作成", +"New text file" => "新規のテキストファイル作成", "Text file" => "テキストファイル", "New folder" => "新しいフォルダ", "Folder" => "フォルダ", diff --git a/apps/files/l10n/ko.php b/apps/files/l10n/ko.php index fbb80b7bfa1..35a9f2fb85c 100644 --- a/apps/files/l10n/ko.php +++ b/apps/files/l10n/ko.php @@ -1,11 +1,20 @@ <?php $TRANSLATIONS = array( -"Could not move %s - File with this name already exists" => "%s 항목을 이동시키지 못하였음 - 파일 이름이 이미 존재함", -"Could not move %s" => "%s 항목을 이딩시키지 못하였음", +"Could not move %s - File with this name already exists" => "항목 %s을(를) 이동시킬 수 없음 - 같은 이름의 파일이 이미 존재함", +"Could not move %s" => "항목 %s을(를) 이동시킬 수 없음", "File name cannot be empty." => "파일 이름이 비어 있을 수 없습니다.", -"Unable to set upload directory." => "업로드 디렉터리를 정할수 없습니다", +"File name must not contain \"/\". Please choose a different name." => "파일 이름에는 \"/\"가 들어갈 수 없습니다. 다른 이름을 사용하십시오.", +"The name %s is already used in the folder %s. Please choose a different name." => "이름 %s이(가) 폴더 %s에서 이미 사용 중입니다. 다른 이름을 사용하십시오.", +"Not a valid source" => "올바르지 않은 원본", +"Server is not allowed to open URLs, please check the server configuration" => "서버에서 URL을 열 수 없습니다. 서버 설정을 확인하십시오", +"Error while downloading %s to %s" => "%s을(를) %s(으)로 다운로드하는 중 오류 발생", +"Error when creating the file" => "파일 생성 중 오류 발생", +"Folder name cannot be empty." => "폴더 이름이 비어있을 수 없습니다.", +"Folder name must not contain \"/\". Please choose a different name." => "폴더 이름에는 \"/\"가 들어갈 수 없습니다. 다른 이름을 사용하십시오.", +"Error when creating the folder" => "폴더 생성 중 오류 발생", +"Unable to set upload directory." => "업로드 디렉터리를 설정할 수 없습니다.", "Invalid Token" => "잘못된 토큰", -"No file was uploaded. Unknown error" => "파일이 업로드되지 않았습니다. 알 수 없는 오류입니다", +"No file was uploaded. Unknown error" => "파일이 업로드 되지 않았습니다. 알 수 없는 오류입니다", "There is no error, the file uploaded with success" => "파일 업로드에 성공하였습니다.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "업로드한 파일이 php.ini의 upload_max_filesize보다 큽니다:", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "업로드한 파일 크기가 HTML 폼의 MAX_FILE_SIZE보다 큼", @@ -14,38 +23,48 @@ $TRANSLATIONS = array( "Missing a temporary folder" => "임시 폴더가 없음", "Failed to write to disk" => "디스크에 쓰지 못했습니다", "Not enough storage available" => "저장소가 용량이 충분하지 않습니다.", -"Upload failed. Could not get file info." => "업로드에 실패했습니다. 파일 정보를 가져올수 없습니다.", -"Upload failed. Could not find uploaded file" => "업로드에 실패했습니다. 업로드할 파일을 찾을수 없습니다", +"Upload failed. Could not get file info." => "업로드에 실패했습니다. 파일 정보를 가져올 수 없습니다.", +"Upload failed. Could not find uploaded file" => "업로드에 실패했습니다. 업로드할 파일을 찾을 수 없습니다", "Invalid directory." => "올바르지 않은 디렉터리입니다.", "Files" => "파일", -"Unable to upload {filename} as it is a directory or has 0 bytes" => "{filename}을 업로드 할수 없습니다. 폴더이거나 0 바이트 파일입니다.", +"Unable to upload {filename} as it is a directory or has 0 bytes" => "{filename}을(를) 업로드할 수 없습니다. 폴더이거나 0 바이트 파일입니다.", "Not enough space available" => "여유 공간이 부족합니다", "Upload cancelled." => "업로드가 취소되었습니다.", -"Could not get result from server." => "서버에서 결과를 가져올수 없습니다.", +"Could not get result from server." => "서버에서 결과를 가져올 수 없습니다.", "File upload is in progress. Leaving the page now will cancel the upload." => "파일 업로드가 진행 중입니다. 이 페이지를 벗어나면 업로드가 취소됩니다.", +"URL cannot be empty" => "URL이 비어있을 수 없음", +"In the home folder 'Shared' is a reserved filename" => "'공유됨'은 홈 폴더의 예약된 파일 이름임", "{new_name} already exists" => "{new_name}이(가) 이미 존재함", +"Could not create file" => "파일을 만들 수 없음", +"Could not create folder" => "폴더를 만들 수 없음", +"Error fetching URL" => "URL을 가져올 수 없음", "Share" => "공유", -"Delete permanently" => "영원히 삭제", +"Delete permanently" => "영구히 삭제", "Rename" => "이름 바꾸기", "Pending" => "대기 중", +"Could not rename file" => "이름을 변경할 수 없음", "replaced {new_name} with {old_name}" => "{old_name}이(가) {new_name}(으)로 대체됨", -"undo" => "되돌리기", -"_%n folder_::_%n folders_" => array("폴더 %n"), -"_%n file_::_%n files_" => array("파일 %n 개"), +"undo" => "실행 취소", +"Error deleting file." => "파일 삭제 오류.", +"_%n folder_::_%n folders_" => array("폴더 %n개"), +"_%n file_::_%n files_" => array("파일 %n개"), "{dirs} and {files}" => "{dirs} 그리고 {files}", -"_Uploading %n file_::_Uploading %n files_" => array("%n 개의 파일을 업로드중"), -"'.' is an invalid file name." => "'.' 는 올바르지 않은 파일 이름 입니다.", +"_Uploading %n file_::_Uploading %n files_" => array("파일 %n개 업로드 중"), +"'.' is an invalid file name." => "'.' 는 올바르지 않은 파일 이름입니다.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "폴더 이름이 올바르지 않습니다. 이름에 문자 '\\', '/', '<', '>', ':', '\"', '|', '? ', '*'는 사용할 수 없습니다.", "Your storage is full, files can not be updated or synced anymore!" => "저장 공간이 가득 찼습니다. 파일을 업데이트하거나 동기화할 수 없습니다!", "Your storage is almost full ({usedSpacePercent}%)" => "저장 공간이 거의 가득 찼습니다 ({usedSpacePercent}%)", -"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "암호화는 해제되어 있지만, 파일은 아직 암호화 되어 있습니다. 개인 설저에 가셔서 암호를 해제하십시오", -"Your download is being prepared. This might take some time if the files are big." => "다운로드가 준비 중입니다. 파일 크기가 크다면 시간이 오래 걸릴 수도 있습니다.", +"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "암호화 앱이 활성화되어 있지만 키가 초기화되지 않았습니다. 로그아웃한 후 다시 로그인하십시오", +"Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "암호화 앱의 개인 키가 잘못되었습니다. 암호화된 파일에 다시 접근하려면 개인 설정에서 개인 키 암호를 업데이트해야 합니다.", +"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "암호화는 해제되어 있지만, 파일은 아직 암호화되어 있습니다. 개인 설정에서 파일을 복호화하십시오.", +"Your download is being prepared. This might take some time if the files are big." => "다운로드 준비 중입니다. 파일 크기가 크면 시간이 오래 걸릴 수도 있습니다.", "Error moving file" => "파일 이동 오류", "Error" => "오류", "Name" => "이름", "Size" => "크기", "Modified" => "수정됨", -"%s could not be renamed" => "%s 의 이름을 변경할수 없습니다", +"Invalid folder name. Usage of 'Shared' is reserved." => "폴더 이름이 잘못되었습니다. '공유됨'은 예약된 폴더 이름입니다.", +"%s could not be renamed" => "%s의 이름을 변경할 수 없습니다", "Upload" => "업로드", "File handling" => "파일 처리", "Maximum upload size" => "최대 업로드 크기", @@ -56,12 +75,14 @@ $TRANSLATIONS = array( "Maximum input size for ZIP files" => "ZIP 파일 최대 크기", "Save" => "저장", "New" => "새로 만들기", +"New text file" => "새 텍스트 파일", "Text file" => "텍스트 파일", "New folder" => "새 폴더", "Folder" => "폴더", "From link" => "링크에서", -"Deleted files" => "파일 삭제됨", +"Deleted files" => "삭제된 파일", "Cancel upload" => "업로드 취소", +"You don’t have permission to upload or create files here" => "여기에 파일을 업로드하거나 만들 권한이 없습니다", "Nothing in here. Upload something!" => "내용이 없습니다. 업로드할 수 있습니다!", "Download" => "다운로드", "Delete" => "삭제", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index 9edee862cbf..a391e25b952 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "De bestandsnaam mag geen \"/\" bevatten. Kies een andere naam.", "The name %s is already used in the folder %s. Please choose a different name." => "De naam %s bestaat al in map %s. Kies een andere naam.", "Not a valid source" => "Geen geldige bron", +"Server is not allowed to open URLs, please check the server configuration" => "Server mag geen URS's openen, controleer de server configuratie", "Error while downloading %s to %s" => "Fout bij downloaden %s naar %s", "Error when creating the file" => "Fout bij creëren bestand", "Folder name cannot be empty." => "Mapnaam mag niet leeg zijn.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} bestaat al", "Could not create file" => "Kon bestand niet creëren", "Could not create folder" => "Kon niet creëren map", +"Error fetching URL" => "Fout bij ophalen URL", "Share" => "Delen", "Delete permanently" => "Verwijder definitief", "Rename" => "Hernoem", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index 5a26904e0ae..031bd508700 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Nazwa pliku nie może zawierać \"/\". Proszę wybrać inną nazwę.", "The name %s is already used in the folder %s. Please choose a different name." => "Nazwa %s jest już używana w folderze %s. Proszę wybrać inną nazwę.", "Not a valid source" => "Niepoprawne źródło", +"Server is not allowed to open URLs, please check the server configuration" => "Serwer nie mógł otworzyć adresów URL, należy sprawdzić konfigurację serwera", "Error while downloading %s to %s" => "Błąd podczas pobierania %s do %S", "Error when creating the file" => "Błąd przy tworzeniu pliku", "Folder name cannot be empty." => "Nazwa folderu nie może być pusta.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} już istnieje", "Could not create file" => "Nie można utworzyć pliku", "Could not create folder" => "Nie można utworzyć folderu", +"Error fetching URL" => "Błąd przy pobieraniu adresu URL", "Share" => "Udostępnij", "Delete permanently" => "Trwale usuń", "Rename" => "Zmień nazwę", @@ -43,9 +45,10 @@ $TRANSLATIONS = array( "Could not rename file" => "Nie można zmienić nazwy pliku", "replaced {new_name} with {old_name}" => "zastąpiono {new_name} przez {old_name}", "undo" => "cofnij", +"Error deleting file." => "Błąd podczas usuwania pliku", "_%n folder_::_%n folders_" => array("%n katalog","%n katalogi","%n katalogów"), "_%n file_::_%n files_" => array("%n plik","%n pliki","%n plików"), -"{dirs} and {files}" => "{katalogi} and {pliki}", +"{dirs} and {files}" => "{dirs} and {files}", "_Uploading %n file_::_Uploading %n files_" => array("Wysyłanie %n pliku","Wysyłanie %n plików","Wysyłanie %n plików"), "'.' is an invalid file name." => "„.” jest nieprawidłową nazwą pliku.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nieprawidłowa nazwa. Znaki '\\', '/', '<', '>', ':', '\"', '|', '?' oraz '*' są niedozwolone.", @@ -72,6 +75,7 @@ $TRANSLATIONS = array( "Maximum input size for ZIP files" => "Maksymalna wielkość pliku wejściowego ZIP ", "Save" => "Zapisz", "New" => "Nowy", +"New text file" => "Nowy plik tekstowy", "Text file" => "Plik tekstowy", "New folder" => "Nowy folder", "Folder" => "Folder", diff --git a/apps/files/l10n/pt_BR.php b/apps/files/l10n/pt_BR.php index 4f193611710..f84dcfcd488 100644 --- a/apps/files/l10n/pt_BR.php +++ b/apps/files/l10n/pt_BR.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "O nome do arquivo não deve conter \"/\". Por favor, escolha um nome diferente.", "The name %s is already used in the folder %s. Please choose a different name." => "O nome %s já é usado na pasta %s. Por favor, escolha um nome diferente.", "Not a valid source" => "Não é uma fonte válida", +"Server is not allowed to open URLs, please check the server configuration" => "Não é permitido ao servidor abrir URLs, por favor verificar a configuração do servidor.", "Error while downloading %s to %s" => "Erro ao baixar %s para %s", "Error when creating the file" => "Erro ao criar o arquivo", "Folder name cannot be empty." => "O nome da pasta não pode estar vazio.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} já existe", "Could not create file" => "Não foi possível criar o arquivo", "Could not create folder" => "Não foi possível criar a pasta", +"Error fetching URL" => "Erro ao buscar URL", "Share" => "Compartilhar", "Delete permanently" => "Excluir permanentemente", "Rename" => "Renomear", diff --git a/apps/files/l10n/ru.php b/apps/files/l10n/ru.php index cede72f26e7..968da63aaca 100644 --- a/apps/files/l10n/ru.php +++ b/apps/files/l10n/ru.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Имя файла не должно содержать символ \"/\". Пожалуйста, выберите другое имя.", "The name %s is already used in the folder %s. Please choose a different name." => "Имя %s уже используется в папке %s. Пожалуйста выберите другое имя.", "Not a valid source" => "Неправильный источник", +"Server is not allowed to open URLs, please check the server configuration" => "Сервер не позволяет открывать URL-адреса, пожалуйста, проверьте настройки сервера", "Error while downloading %s to %s" => "Ошибка при загрузке %s в %s", "Error when creating the file" => "Ошибка при создании файла", "Folder name cannot be empty." => "Имя папки не может быть пустым.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} уже существует", "Could not create file" => "Не удалось создать файл", "Could not create folder" => "Не удалось создать папку", +"Error fetching URL" => "Ошибка получения URL", "Share" => "Открыть доступ", "Delete permanently" => "Удалено навсегда", "Rename" => "Переименовать", diff --git a/apps/files/l10n/ru_RU.php b/apps/files/l10n/ru_RU.php deleted file mode 100644 index 0df5b9c8c82..00000000000 --- a/apps/files/l10n/ru_RU.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -$TRANSLATIONS = array( -"File name cannot be empty." => "Имя файла не может быть пустым.", -"Files" => "Файлы", -"Share" => "Сделать общим", -"Rename" => "Переименовать", -"_%n folder_::_%n folders_" => array("","",""), -"_%n file_::_%n files_" => array("","",""), -"_Uploading %n file_::_Uploading %n files_" => array("","",""), -"'.' is an invalid file name." => "'.' является неверным именем файла.", -"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Некорректное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' не допустимы.", -"Error" => "Ошибка", -"Size" => "Размер", -"Upload" => "Загрузка", -"Save" => "Сохранить", -"Cancel upload" => "Отмена загрузки", -"Download" => "Загрузка", -"Delete" => "Удалить" -); -$PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"; diff --git a/apps/files/l10n/sk.php b/apps/files/l10n/sk.php index a3178a95c47..53daf549eaa 100644 --- a/apps/files/l10n/sk.php +++ b/apps/files/l10n/sk.php @@ -1,7 +1,11 @@ <?php $TRANSLATIONS = array( +"Share" => "Zdieľať", "_%n folder_::_%n folders_" => array("","",""), "_%n file_::_%n files_" => array("","",""), -"_Uploading %n file_::_Uploading %n files_" => array("","","") +"_Uploading %n file_::_Uploading %n files_" => array("","",""), +"Save" => "Uložiť", +"Download" => "Stiahnuť", +"Delete" => "Odstrániť" ); $PLURAL_FORMS = "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"; diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php index 421792f3218..037e5f6b6b0 100644 --- a/apps/files/l10n/sl.php +++ b/apps/files/l10n/sl.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Ime datoteke ne sme vsebovati znaka \"/\". Določiti je treba drugo ime.", "The name %s is already used in the folder %s. Please choose a different name." => "Ime %s je že v mapi %s že v uporabi. Izbrati je treba drugo ime.", "Not a valid source" => "Vir ni veljaven", +"Server is not allowed to open URLs, please check the server configuration" => "Odpiranje naslovov URL preko strežnika ni dovoljeno. Preverite nastavitve strežnika.", "Error while downloading %s to %s" => "Napaka med prejemanjem %s v mapo %s", "Error when creating the file" => "Napaka med ustvarjanjem datoteke", "Folder name cannot be empty." => "Ime mape ne more biti prazna vrednost.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} že obstaja", "Could not create file" => "Ni mogoče ustvariti datoteke", "Could not create folder" => "Ni mogoče ustvariti mape", +"Error fetching URL" => "Napaka pridobivanja naslova URL", "Share" => "Souporaba", "Delete permanently" => "Izbriši dokončno", "Rename" => "Preimenuj", diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php index 9ede20634a4..90b16922a76 100644 --- a/apps/files/l10n/tr.php +++ b/apps/files/l10n/tr.php @@ -6,6 +6,7 @@ $TRANSLATIONS = array( "File name must not contain \"/\". Please choose a different name." => "Dosya adı \"/\" içermemelidir. Lütfen farklı bir isim seçin.", "The name %s is already used in the folder %s. Please choose a different name." => "%s ismi zaten %s klasöründe kullanılıyor. Lütfen farklı bir isim seçin.", "Not a valid source" => "Geçerli bir kaynak değil", +"Server is not allowed to open URLs, please check the server configuration" => "Sunucunun adresleri açma izi yok, lütfen sunucu yapılandırmasını denetleyin", "Error while downloading %s to %s" => "%s, %s içine indirilirken hata", "Error when creating the file" => "Dosya oluşturulurken hata", "Folder name cannot be empty." => "Klasör adı boş olamaz.", @@ -36,6 +37,7 @@ $TRANSLATIONS = array( "{new_name} already exists" => "{new_name} zaten mevcut", "Could not create file" => "Dosya oluşturulamadı", "Could not create folder" => "Klasör oluşturulamadı", +"Error fetching URL" => "Adres getirilirken hata", "Share" => "Paylaş", "Delete permanently" => "Kalıcı olarak sil", "Rename" => "İsim değiştir.", @@ -50,11 +52,11 @@ $TRANSLATIONS = array( "_Uploading %n file_::_Uploading %n files_" => array("%n dosya yükleniyor","%n dosya yükleniyor"), "'.' is an invalid file name." => "'.' geçersiz bir dosya adı.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Geçersiz isim, '\\', '/', '<', '>', ':', '\"', '|', '?' ve '*' karakterlerine izin verilmemektedir.", -"Your storage is full, files can not be updated or synced anymore!" => "Depolama alanınız dolu, artık dosyalar güncellenmeyecek yada senkronizasyon edilmeyecek.", +"Your storage is full, files can not be updated or synced anymore!" => "Depolama alanınız dolu, artık dosyalar güncellenmeyecek veya eşitlenmeyecek.", "Your storage is almost full ({usedSpacePercent}%)" => "Depolama alanınız neredeyse dolu ({usedSpacePercent}%)", "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Şifreleme Uygulaması etkin ancak anahtarlarınız başlatılmamış. Lütfen oturumu kapatıp yeniden açın", "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files." => "Şifreleme Uygulaması için geçersiz özel anahtar. Lütfen şifreli dosyalarınıza erişimi tekrar kazanabilmek için kişisel ayarlarınızdan özel anahtar parolanızı güncelleyin.", -"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Şifreleme işlemi durduruldu ancak dosyalarınız şifreli. Dosyalarınızın şifresini kaldırmak için lütfen kişisel ayarlar kısmına geçiniz.", +"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Şifreleme işlemi durduruldu ancak dosyalarınız şifreli. Dosyalarınızın şifresini kaldırmak için lütfen kişisel ayarlar kısmına geçin.", "Your download is being prepared. This might take some time if the files are big." => "İndirmeniz hazırlanıyor. Dosya büyük ise biraz zaman alabilir.", "Error moving file" => "Dosya taşıma hatası", "Error" => "Hata", @@ -64,13 +66,13 @@ $TRANSLATIONS = array( "Invalid folder name. Usage of 'Shared' is reserved." => "Geçersiz dizin adı. 'Shared' ismi ayrılmıştır.", "%s could not be renamed" => "%s yeniden adlandırılamadı", "Upload" => "Yükle", -"File handling" => "Dosya taşıma", +"File handling" => "Dosya işlemleri", "Maximum upload size" => "Maksimum yükleme boyutu", "max. possible: " => "mümkün olan en fazla: ", "Needed for multi-file and folder downloads." => "Çoklu dosya ve dizin indirmesi için gerekli.", -"Enable ZIP-download" => "ZIP indirmeyi aktif et", +"Enable ZIP-download" => "ZIP indirmeyi etkinleştir", "0 is unlimited" => "0 limitsiz demektir", -"Maximum input size for ZIP files" => "ZIP dosyaları için en fazla girdi sayısı", +"Maximum input size for ZIP files" => "ZIP dosyaları için en fazla girdi boyutu", "Save" => "Kaydet", "New" => "Yeni", "New text file" => "Yeni metin dosyası", diff --git a/apps/files/l10n/ur.php b/apps/files/l10n/ur.php new file mode 100644 index 00000000000..0157af093e9 --- /dev/null +++ b/apps/files/l10n/ur.php @@ -0,0 +1,7 @@ +<?php +$TRANSLATIONS = array( +"_%n folder_::_%n folders_" => array("",""), +"_%n file_::_%n files_" => array("",""), +"_Uploading %n file_::_Uploading %n files_" => array("","") +); +$PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/apps/files/lib/app.php b/apps/files/lib/app.php index e04ac173d55..fea88faa92a 100644 --- a/apps/files/lib/app.php +++ b/apps/files/lib/app.php @@ -59,6 +59,13 @@ class App { $result['data'] = array( 'message' => $this->l10n->t("Invalid folder name. Usage of 'Shared' is reserved.") ); + // rename to non-existing folder is denied + } else if (!$this->view->file_exists($dir)) { + $result['data'] = array('message' => (string)$this->l10n->t( + 'The target folder has been moved or deleted.', + array($dir)), + 'code' => 'targetnotfound' + ); // rename to existing file is denied } else if ($this->view->file_exists($dir . '/' . $newname)) { @@ -83,14 +90,17 @@ class App { else { $meta['type'] = 'file'; } + // these need to be set for determineIcon() + $meta['isPreviewAvailable'] = \OC::$server->getPreviewManager()->isMimeSupported($meta['mimetype']); + $meta['directory'] = $dir; $fileinfo = array( 'id' => $meta['fileid'], 'mime' => $meta['mimetype'], 'size' => $meta['size'], 'etag' => $meta['etag'], - 'directory' => $dir, + 'directory' => $meta['directory'], 'name' => $newname, - 'isPreviewAvailable' => \OC::$server->getPreviewManager()->isMimeSupported($meta['mimetype']), + 'isPreviewAvailable' => $meta['isPreviewAvailable'], 'icon' => \OCA\Files\Helper::determineIcon($meta) ); $result['success'] = true; diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php index 697fc52526a..a5afd55fbc3 100644 --- a/apps/files/templates/admin.php +++ b/apps/files/templates/admin.php @@ -5,7 +5,7 @@ <h2><?php p($l->t('File handling')); ?></h2> <?php if($_['uploadChangable']):?> <label for="maxUploadSize"><?php p($l->t( 'Maximum upload size' )); ?> </label> - <input name='maxUploadSize' id="maxUploadSize" value='<?php p($_['uploadMaxFilesize']) ?>'/> + <input type="text" name='maxUploadSize' id="maxUploadSize" value='<?php p($_['uploadMaxFilesize']) ?>'/> <?php if($_['displayMaxPossibleUploadSize']):?> (<?php p($l->t('max. possible: ')); p($_['maxPossibleUploadSize']) ?>) <?php endif;?> diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index f20a3f1d073..939043b2c9f 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -1,6 +1,7 @@ <div id="controls"> <?php print_unescaped($_['breadcrumb']); ?> <div class="actions creatable <?php if (!$_['isCreatable']):?>hidden<?php endif; ?>"> + <?php if(!isset($_['dirToken'])):?> <div id="new" class="button"> <a><?php p($l->t('New'));?></a> <ul> @@ -12,6 +13,7 @@ data-type='web'><p><?php p($l->t('From link'));?></p></li> </ul> </div> + <?php endif;?> <div id="upload" class="button" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>"> <?php if($_['uploadMaxFilesize'] >= 0):?> @@ -19,15 +21,19 @@ <?php endif;?> <input type="hidden" id="upload_limit" value="<?php p($_['uploadLimit']) ?>"> <input type="hidden" id="free_space" value="<?php p($_['freeSpace']) ?>"> + <?php if(isset($_['dirToken'])):?> + <input type="hidden" id="publicUploadRequestToken" name="requesttoken" value="<?php p($_['requesttoken']) ?>" /> + <input type="hidden" id="dirToken" name="dirToken" value="<?php p($_['dirToken']) ?>" /> + <?php endif;?> <input type="hidden" class="max_human_file_size" value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)"> <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir"> <input type="file" id="file_upload_start" name='files[]' data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" /> - <a href="#" class="svg"></a> + <a href="#" class="svg icon icon-upload"></a> </div> <?php if ($_['trash']): ?> - <input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?>></input> + <input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?> /> <?php endif; ?> <div id="uploadprogresswrapper"> <div id="uploadprogressbar"></div> @@ -45,7 +51,7 @@ <div id="emptycontent" <?php if (!$_['emptyContent']):?>class="hidden"<?php endif; ?>><?php p($l->t('Nothing in here. Upload something!'))?></div> -<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"></input> +<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>" /> <table id="filestable" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="36" data-preview-y="36"> <thead> diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index 9db27eb9b29..2a0df622767 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -1,10 +1,12 @@ -<?php if(count($_["breadcrumb"])):?> - <div class="crumb" data-dir=''> - <a href="<?php print_unescaped($_['baseURL']); ?>"> +<div class="crumb <?php if(!count($_["breadcrumb"])) p('last');?>" data-dir=''> + <a href="<?php print_unescaped($_['baseURL']); ?>"> + <?php if(isset($_['rootBreadCrumb'])): + echo $_['rootBreadCrumb']; + else:?> <img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" /> - </a> - </div> -<?php endif;?> + <?php endif;?> + </a> +</div> <?php for($i=0; $i<count($_["breadcrumb"]); $i++): $crumb = $_["breadcrumb"][$i]; $dir = \OCP\Util::encodePath($crumb["dir"]); ?> diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 2f630e1f014..f4fb96a7a7c 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -18,7 +18,7 @@ $totalsize = 0; ?> data-size="<?php p($file['size']);?>" data-etag="<?php p($file['etag']);?>" data-permissions="<?php p($file['permissions']); ?>"> - <?php if($file['isPreviewAvailable']): ?> + <?php if(isset($file['isPreviewAvailable']) and $file['isPreviewAvailable']): ?> <td class="filename svg preview-icon" <?php else: ?> <td class="filename svg" diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php index 350ff5d3687..a1a5c8983ba 100644 --- a/apps/files/tests/ajax_rename.php +++ b/apps/files/tests/ajax_rename.php @@ -38,7 +38,7 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { $l10nMock->expects($this->any()) ->method('t') ->will($this->returnArgument(0)); - $viewMock = $this->getMock('\OC\Files\View', array('rename', 'normalizePath', 'getFileInfo'), array(), '', false); + $viewMock = $this->getMock('\OC\Files\View', array('rename', 'normalizePath', 'getFileInfo', 'file_exists'), array(), '', false); $viewMock->expects($this->any()) ->method('normalizePath') ->will($this->returnArgument(0)); @@ -63,6 +63,11 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { $oldname = 'Shared'; $newname = 'new_name'; + $this->viewMock->expects($this->at(0)) + ->method('file_exists') + ->with('/') + ->will($this->returnValue(true)); + $result = $this->files->rename($dir, $oldname, $newname); $expected = array( 'success' => false, @@ -80,6 +85,11 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { $oldname = 'Shared'; $newname = 'new_name'; + $this->viewMock->expects($this->at(0)) + ->method('file_exists') + ->with('/test') + ->will($this->returnValue(true)); + $this->viewMock->expects($this->any()) ->method('getFileInfo') ->will($this->returnValue(array( @@ -129,6 +139,11 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { $oldname = 'oldname'; $newname = 'newname'; + $this->viewMock->expects($this->at(0)) + ->method('file_exists') + ->with('/') + ->will($this->returnValue(true)); + $this->viewMock->expects($this->any()) ->method('getFileInfo') ->will($this->returnValue(array( @@ -141,7 +156,6 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { 'name' => 'new_name', ))); - $result = $this->files->rename($dir, $oldname, $newname); $this->assertTrue($result['success']); @@ -154,4 +168,35 @@ class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { $this->assertEquals(\OC_Helper::mimetypeIcon('dir'), $result['data']['icon']); $this->assertFalse($result['data']['isPreviewAvailable']); } + + /** + * Test rename inside a folder that doesn't exist any more + */ + function testRenameInNonExistingFolder() { + $dir = '/unexist'; + $oldname = 'oldname'; + $newname = 'newname'; + + $this->viewMock->expects($this->at(0)) + ->method('file_exists') + ->with('/unexist') + ->will($this->returnValue(false)); + + $this->viewMock->expects($this->any()) + ->method('getFileInfo') + ->will($this->returnValue(array( + 'fileid' => 123, + 'type' => 'dir', + 'mimetype' => 'httpd/unix-directory', + 'size' => 18, + 'etag' => 'abcdef', + 'directory' => '/unexist', + 'name' => 'new_name', + ))); + + $result = $this->files->rename($dir, $oldname, $newname); + + $this->assertFalse($result['success']); + $this->assertEquals('targetnotfound', $result['data']['code']); + } } diff --git a/apps/files/tests/js/fileactionsSpec.js b/apps/files/tests/js/fileactionsSpec.js new file mode 100644 index 00000000000..23f7b58dcd9 --- /dev/null +++ b/apps/files/tests/js/fileactionsSpec.js @@ -0,0 +1,61 @@ +/** +* ownCloud +* +* @author Vincent Petry +* @copyright 2014 Vincent Petry <pvince81@owncloud.com> +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ +describe('FileActions tests', function() { + beforeEach(function() { + // init horrible parameters + var $body = $('body'); + $body.append('<input type="hidden" id="dir" value="/subdir"></input>'); + $body.append('<input type="hidden" id="permissions" value="31"></input>'); + // dummy files table + $filesTable = $body.append('<table id="filestable"></table>'); + }); + afterEach(function() { + $('#dir, #permissions, #filestable').remove(); + }); + it('calling display() sets file actions', function() { + // note: download_url is actually the link target, not the actual download URL... + var $tr = FileList.addFile('testName.txt', 1234, new Date(), false, false, {download_url: 'test/download/url'}); + + // no actions before call + expect($tr.find('.action[data-action=Download]').length).toEqual(0); + expect($tr.find('.action[data-action=Rename]').length).toEqual(0); + expect($tr.find('.action.delete').length).toEqual(0); + + FileActions.display($tr.find('td.filename'), true); + + // actions defined after cal + expect($tr.find('.action[data-action=Download]').length).toEqual(1); + expect($tr.find('.action[data-action=Rename]').length).toEqual(1); + expect($tr.find('.action.delete').length).toEqual(1); + }); + it('redirects to download URL when clicking download', function() { + var redirectStub = sinon.stub(OC, 'redirect'); + // note: download_url is actually the link target, not the actual download URL... + var $tr = FileList.addFile('test download File.txt', 1234, new Date(), false, false, {download_url: 'test/download/url'}); + FileActions.display($tr.find('td.filename'), true); + + $tr.find('.action[data-action=Download]').click(); + + expect(redirectStub.calledOnce).toEqual(true); + expect(redirectStub.getCall(0).args[0]).toEqual(OC.webroot + '/index.php/apps/files/ajax/download.php?files=test%20download%20File.txt&dir=%2Fsubdir&download'); + redirectStub.restore(); + }); +}); diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js new file mode 100644 index 00000000000..61e026c0725 --- /dev/null +++ b/apps/files/tests/js/filelistSpec.js @@ -0,0 +1,63 @@ +/** +* ownCloud +* +* @author Vincent Petry +* @copyright 2014 Vincent Petry <pvince81@owncloud.com> +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ +describe('FileList tests', function() { + beforeEach(function() { + // init horrible parameters + var $body = $('body'); + $body.append('<input type="hidden" id="dir" value="/subdir"></input>'); + $body.append('<input type="hidden" id="permissions" value="31"></input>'); + // dummy files table + $body.append('<table id="filestable"></table>'); + }); + afterEach(function() { + $('#dir, #permissions, #filestable').remove(); + }); + it('generates file element with correct attributes when calling addFile', function() { + var lastMod = new Date(10000); + // note: download_url is actually the link target, not the actual download URL... + var $tr = FileList.addFile('testName.txt', 1234, lastMod, false, false, {download_url: 'test/download/url'}); + + expect($tr).toBeDefined(); + expect($tr[0].tagName.toLowerCase()).toEqual('tr'); + expect($tr.find('a:first').attr('href')).toEqual('test/download/url'); + expect($tr.attr('data-type')).toEqual('file'); + expect($tr.attr('data-file')).toEqual('testName.txt'); + expect($tr.attr('data-size')).toEqual('1234'); + expect($tr.attr('data-permissions')).toEqual('31'); + //expect($tr.attr('data-mime')).toEqual('plain/text'); + }); + it('generates dir element with correct attributes when calling addDir', function() { + var lastMod = new Date(10000); + var $tr = FileList.addDir('testFolder', 1234, lastMod, false); + + expect($tr).toBeDefined(); + expect($tr[0].tagName.toLowerCase()).toEqual('tr'); + expect($tr.attr('data-type')).toEqual('dir'); + expect($tr.attr('data-file')).toEqual('testFolder'); + expect($tr.attr('data-size')).toEqual('1234'); + expect($tr.attr('data-permissions')).toEqual('31'); + //expect($tr.attr('data-mime')).toEqual('httpd/unix-directory'); + }); + it('returns correct download URL', function() { + expect(FileList.getDownloadUrl('some file.txt')).toEqual(OC.webroot + '/index.php/apps/files/ajax/download.php?files=some%20file.txt&dir=%2Fsubdir&download'); + expect(FileList.getDownloadUrl('some file.txt', '/anotherpath/abc')).toEqual(OC.webroot + '/index.php/apps/files/ajax/download.php?files=some%20file.txt&dir=%2Fanotherpath%2Fabc&download'); + }); +}); diff --git a/apps/files/tests/js/filesSpec.js b/apps/files/tests/js/filesSpec.js new file mode 100644 index 00000000000..9d0a2e4f9d7 --- /dev/null +++ b/apps/files/tests/js/filesSpec.js @@ -0,0 +1,81 @@ +/** +* ownCloud +* +* @author Vincent Petry +* @copyright 2014 Vincent Petry <pvince81@owncloud.com> +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +* License as published by the Free Software Foundation; either +* version 3 of the License, or any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU AFFERO GENERAL PUBLIC LICENSE for more details. +* +* You should have received a copy of the GNU Affero General Public +* License along with this library. If not, see <http://www.gnu.org/licenses/>. +* +*/ +describe('Files tests', function() { + describe('File name validation', function() { + it('Validates correct file names', function() { + var fileNames = [ + 'boringname', + 'something.with.extension', + 'now with spaces', + '.a', + '..a', + '.dotfile', + 'single\'quote', + ' spaces before', + 'spaces after ', + 'allowed chars including the crazy ones $%&_-^@!,()[]{}=;#', + '汉字也能用', + 'und Ümläüte sind auch willkommen' + ]; + for ( var i = 0; i < fileNames.length; i++ ) { + try { + expect(Files.isFileNameValid(fileNames[i])).toEqual(true); + } + catch (e) { + fail(); + } + } + }); + it('Detects invalid file names', function() { + var fileNames = [ + '', + ' ', + '.', + '..', + 'back\\slash', + 'sl/ash', + 'lt<lt', + 'gt>gt', + 'col:on', + 'double"quote', + 'pi|pe', + 'dont?ask?questions?', + 'super*star', + 'new\nline', + ' ..', + '.. ', + '. ', + ' .' + ]; + for ( var i = 0; i < fileNames.length; i++ ) { + var threwException = false; + try { + Files.isFileNameValid(fileNames[i]); + fail(); + } + catch (e) { + threwException = true; + } + expect(threwException).toEqual(true); + } + }); + }); +}); diff --git a/apps/files/triggerupdate.php b/apps/files/triggerupdate.php index 0e29edbba35..a37b9823add 100644 --- a/apps/files/triggerupdate.php +++ b/apps/files/triggerupdate.php @@ -6,6 +6,7 @@ if (OC::$CLI) { if (count($argv) === 2) { $file = $argv[1]; list(, $user) = explode('/', $file); + OCP\JSON::checkUserExists($owner); OC_Util::setupFS($user); $view = new \OC\Files\View(''); /** |