diff --git a/apps/files/l10n/es_EC.js b/apps/files/l10n/es_EC.js new file mode 100644 index 000000000000..fe40198b3ea4 --- /dev/null +++ b/apps/files/l10n/es_EC.js @@ -0,0 +1,6 @@ +OC.L10N.register( + "files", + { + "Files" : "Archivos" +}, +"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); diff --git a/apps/files/l10n/es_EC.json b/apps/files/l10n/es_EC.json new file mode 100644 index 000000000000..4cda913496a8 --- /dev/null +++ b/apps/files/l10n/es_EC.json @@ -0,0 +1,4 @@ +{ "translations": { + "Files" : "Archivos" +},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" +} \ No newline at end of file diff --git a/apps/files/l10n/pt_BR.js b/apps/files/l10n/pt_BR.js index ccf628638d7d..561486462d12 100644 --- a/apps/files/l10n/pt_BR.js +++ b/apps/files/l10n/pt_BR.js @@ -21,6 +21,7 @@ OC.L10N.register( "Target folder does not exist any more" : "Pasta de destino não existe mais", "The file {file} is currently locked, please try again later" : "O arquivo {file} está bloqueado, por favor tente novamente mais tarde", "Not enough free space" : "Não há espaço livre suficiente", + "Failed to upload the file \"{fileName}\": {error}" : "Falha ao carregar o arquivo \"{fileName}\": {error}", "Uploading..." : "Enviando...", "..." : "...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} de {totalSize} ({bitrate})", diff --git a/apps/files/l10n/pt_BR.json b/apps/files/l10n/pt_BR.json index 052a489c17cf..762bafc51d79 100644 --- a/apps/files/l10n/pt_BR.json +++ b/apps/files/l10n/pt_BR.json @@ -19,6 +19,7 @@ "Target folder does not exist any more" : "Pasta de destino não existe mais", "The file {file} is currently locked, please try again later" : "O arquivo {file} está bloqueado, por favor tente novamente mais tarde", "Not enough free space" : "Não há espaço livre suficiente", + "Failed to upload the file \"{fileName}\": {error}" : "Falha ao carregar o arquivo \"{fileName}\": {error}", "Uploading..." : "Enviando...", "..." : "...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} de {totalSize} ({bitrate})", diff --git a/core/js/files/client.js b/core/js/files/client.js index 752f3584901b..995ee89993c9 100644 --- a/core/js/files/client.js +++ b/core/js/files/client.js @@ -21,6 +21,7 @@ * @param {String} [options.root] root path * @param {String} [options.userName] user name * @param {String} [options.password] password + * @param {String[]} [options.defaultHeaders] defaultHeaders * * @since 8.2 */ @@ -200,35 +201,6 @@ return path; }, - /** - * Parse headers string into a map - * - * @param {string} headersString headers list as string - * - * @return {Object.} map of header name to header contents - */ - _parseHeaders: function(headersString) { - var headerRows = headersString.split('\n'); - var headers = {}; - for (var i = 0; i < headerRows.length; i++) { - var sepPos = headerRows[i].indexOf(':'); - if (sepPos < 0) { - continue; - } - - var headerName = headerRows[i].substr(0, sepPos); - var headerValue = headerRows[i].substr(sepPos + 2); - - if (!headers[headerName]) { - // make it an array - headers[headerName] = []; - } - - headers[headerName].push(headerValue); - } - return headers; - }, - /** * Parses the etag response which is in double quotes. * @@ -577,6 +549,7 @@ * Returns the file info of a given path. * * @param {String} path path + * @param options * @param {Array} [options.properties] list of Webdav properties to retrieve * * @return {Promise} promise @@ -653,6 +626,7 @@ * @param {Object} [options] * @param {String} [options.contentType='text/plain'] content type * @param {bool} [options.overwrite=true] whether to overwrite an existing file + * @param {String} [options.lockToken=opaquelocktoken:123-456] sends a lock token if the resource was locked before * * @return {Promise} */ @@ -676,6 +650,9 @@ // will trigger 412 precondition failed if a file already exists headers['If-None-Match'] = '*'; } + if (options.lockToken) { + headers['If'] = '(<' + options.lockToken + '>)'; + } this._client.request( 'PUT', @@ -800,6 +777,50 @@ return promise; }, + /** + * Unlocks a previously locked path + * + * @param {String} path the locked path that needs to be unlocked + * @param {String} token the opaque token needed to unlock the path + * @param {Object} [options] + * @param {bool} [options.pathIsUrl=false] whether the path is already an url or we need to build an url from it + * + * @return {Promise} the promise of the unlock request + */ + unlock: function(path, token, options) { + if (!path) { + throw 'Missing argument "path"'; + } + if (!token) { + throw 'Missing argument "token"'; + } + var self = this; + var deferred = $.Deferred(); + var promise = deferred.promise(); + + options = _.extend({ + 'pathIsUrl' : false + }, options); + + this._client.request( + 'UNLOCK', + options.pathIsUrl ? path : this._buildUrl(path), + { + 'Lock-Token': token + } + ).then( + function(result) { + if (self._isSuccessStatus(result.status)) { + deferred.resolve(result.status, result); + } else { + result = _.extend(result, self._getSabreException(result)); + deferred.reject(result.status, result); + } + } + ); + return promise; + }, + /** * Creates a directory * @@ -831,6 +852,7 @@ * false otherwise * @param {Object} [headers=null] additional headers * + * @param options * @return {Promise} promise */ move: function(path, destinationPath, allowOverwrite, headers, options) { @@ -846,6 +868,7 @@ * false otherwise * @param {Object} [headers=null] additional headers * + * @param options * @return {Promise} promise * @since 10.0.5 */ @@ -856,7 +879,7 @@ /** * Add a file info parser function * - * @param {OC.Files.Client~parseFileInfo>} + * @param {OC.Files.Client~parseFileInfo} parserFunction */ addFileInfoParser: function(parserFunction) { this._fileInfoParsers.push(parserFunction); diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 6b6a131e3c65..8b10b3779917 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -357,8 +357,8 @@ autocompleteRenderItem: function(ul, item) { var text = item.label; - let showIcon = false; - let iconClass = "" + var showIcon = false; + var iconClass = ""; var typeInfo = t('core', 'User'); if (item.batch) { @@ -392,8 +392,8 @@ var $el = $(template({ showAvatar: this.configModel.areAvatarsEnabled(), displayName: text, - showIcon, - iconClass, + showIcon: showIcon, + iconClass: iconClass, typeInfo: typeInfo, additionalInfo: item.value.shareWithAdditionalInfo, shareTypeClass: (item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user' diff --git a/core/l10n/pt_BR.js b/core/l10n/pt_BR.js index 95ecc403d2f9..0c3302823201 100644 --- a/core/l10n/pt_BR.js +++ b/core/l10n/pt_BR.js @@ -226,6 +226,7 @@ OC.L10N.register( "An error occurred. Please try again" : "Ocorreu um erro. Por favor tente novamente", "User" : "Usuário", "Group" : "Grupo", + "Federated Group" : "Grupo Federado", "Guest" : "Convidado", "At {server}" : "Em {server}", "Federated" : "Federado", diff --git a/core/l10n/pt_BR.json b/core/l10n/pt_BR.json index 930d79cefaf0..06c5ba0a87e1 100644 --- a/core/l10n/pt_BR.json +++ b/core/l10n/pt_BR.json @@ -224,6 +224,7 @@ "An error occurred. Please try again" : "Ocorreu um erro. Por favor tente novamente", "User" : "Usuário", "Group" : "Grupo", + "Federated Group" : "Grupo Federado", "Guest" : "Convidado", "At {server}" : "Em {server}", "Federated" : "Federado", diff --git a/core/l10n/sq.js b/core/l10n/sq.js index bd85f0fbd77a..27dd607a07b1 100644 --- a/core/l10n/sq.js +++ b/core/l10n/sq.js @@ -226,6 +226,7 @@ OC.L10N.register( "An error occurred. Please try again" : "Ndodhi një gabim. Ju lutemi, riprovoni", "User" : "Përdorues", "Group" : "Grup", + "Federated Group" : "Grup i Federuar", "Guest" : "Vizitor", "At {server}" : "Te {server}", "Federated" : "I federuar", diff --git a/core/l10n/sq.json b/core/l10n/sq.json index bc12e5b68fc7..1659ee9e7bf9 100644 --- a/core/l10n/sq.json +++ b/core/l10n/sq.json @@ -224,6 +224,7 @@ "An error occurred. Please try again" : "Ndodhi një gabim. Ju lutemi, riprovoni", "User" : "Përdorues", "Group" : "Grup", + "Federated Group" : "Grup i Federuar", "Guest" : "Vizitor", "At {server}" : "Te {server}", "Federated" : "I federuar", diff --git a/core/l10n/tr.js b/core/l10n/tr.js index 02edb2366fcf..3ccdbfb19299 100644 --- a/core/l10n/tr.js +++ b/core/l10n/tr.js @@ -226,6 +226,7 @@ OC.L10N.register( "An error occurred. Please try again" : "Bir hata oluştu. Lütfen yeniden deneyin", "User" : "Kullanıcı", "Group" : "Grup", + "Federated Group" : "Birleştirilmiş Grup", "Guest" : "Misafir", "At {server}" : "{server} sunucusunda", "Federated" : "Birleşmiş", diff --git a/core/l10n/tr.json b/core/l10n/tr.json index e4e3918e8b52..d89507e5156f 100644 --- a/core/l10n/tr.json +++ b/core/l10n/tr.json @@ -224,6 +224,7 @@ "An error occurred. Please try again" : "Bir hata oluştu. Lütfen yeniden deneyin", "User" : "Kullanıcı", "Group" : "Grup", + "Federated Group" : "Birleştirilmiş Grup", "Guest" : "Misafir", "At {server}" : "{server} sunucusunda", "Federated" : "Birleşmiş", diff --git a/tests/data/apptheme/apps/files/l10n/es_EC.js b/tests/data/apptheme/apps/files/l10n/es_EC.js new file mode 100644 index 000000000000..fe40198b3ea4 --- /dev/null +++ b/tests/data/apptheme/apps/files/l10n/es_EC.js @@ -0,0 +1,6 @@ +OC.L10N.register( + "files", + { + "Files" : "Archivos" +}, +"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); diff --git a/tests/data/apptheme/apps/files/l10n/es_EC.json b/tests/data/apptheme/apps/files/l10n/es_EC.json new file mode 100644 index 000000000000..4cda913496a8 --- /dev/null +++ b/tests/data/apptheme/apps/files/l10n/es_EC.json @@ -0,0 +1,4 @@ +{ "translations": { + "Files" : "Archivos" +},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" +} \ No newline at end of file diff --git a/tests/data/apptheme/apps/files/l10n/pt_BR.js b/tests/data/apptheme/apps/files/l10n/pt_BR.js index ccf628638d7d..561486462d12 100644 --- a/tests/data/apptheme/apps/files/l10n/pt_BR.js +++ b/tests/data/apptheme/apps/files/l10n/pt_BR.js @@ -21,6 +21,7 @@ OC.L10N.register( "Target folder does not exist any more" : "Pasta de destino não existe mais", "The file {file} is currently locked, please try again later" : "O arquivo {file} está bloqueado, por favor tente novamente mais tarde", "Not enough free space" : "Não há espaço livre suficiente", + "Failed to upload the file \"{fileName}\": {error}" : "Falha ao carregar o arquivo \"{fileName}\": {error}", "Uploading..." : "Enviando...", "..." : "...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} de {totalSize} ({bitrate})", diff --git a/tests/data/apptheme/apps/files/l10n/pt_BR.json b/tests/data/apptheme/apps/files/l10n/pt_BR.json index 052a489c17cf..762bafc51d79 100644 --- a/tests/data/apptheme/apps/files/l10n/pt_BR.json +++ b/tests/data/apptheme/apps/files/l10n/pt_BR.json @@ -19,6 +19,7 @@ "Target folder does not exist any more" : "Pasta de destino não existe mais", "The file {file} is currently locked, please try again later" : "O arquivo {file} está bloqueado, por favor tente novamente mais tarde", "Not enough free space" : "Não há espaço livre suficiente", + "Failed to upload the file \"{fileName}\": {error}" : "Falha ao carregar o arquivo \"{fileName}\": {error}", "Uploading..." : "Enviando...", "..." : "...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} de {totalSize} ({bitrate})", diff --git a/tests/data/themes/abc/apps/files/l10n/es_EC.js b/tests/data/themes/abc/apps/files/l10n/es_EC.js new file mode 100644 index 000000000000..fe40198b3ea4 --- /dev/null +++ b/tests/data/themes/abc/apps/files/l10n/es_EC.js @@ -0,0 +1,6 @@ +OC.L10N.register( + "files", + { + "Files" : "Archivos" +}, +"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); diff --git a/tests/data/themes/abc/apps/files/l10n/es_EC.json b/tests/data/themes/abc/apps/files/l10n/es_EC.json new file mode 100644 index 000000000000..4cda913496a8 --- /dev/null +++ b/tests/data/themes/abc/apps/files/l10n/es_EC.json @@ -0,0 +1,4 @@ +{ "translations": { + "Files" : "Archivos" +},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" +} \ No newline at end of file diff --git a/tests/data/themes/abc/apps/files/l10n/pt_BR.js b/tests/data/themes/abc/apps/files/l10n/pt_BR.js index ccf628638d7d..561486462d12 100644 --- a/tests/data/themes/abc/apps/files/l10n/pt_BR.js +++ b/tests/data/themes/abc/apps/files/l10n/pt_BR.js @@ -21,6 +21,7 @@ OC.L10N.register( "Target folder does not exist any more" : "Pasta de destino não existe mais", "The file {file} is currently locked, please try again later" : "O arquivo {file} está bloqueado, por favor tente novamente mais tarde", "Not enough free space" : "Não há espaço livre suficiente", + "Failed to upload the file \"{fileName}\": {error}" : "Falha ao carregar o arquivo \"{fileName}\": {error}", "Uploading..." : "Enviando...", "..." : "...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} de {totalSize} ({bitrate})", diff --git a/tests/data/themes/abc/apps/files/l10n/pt_BR.json b/tests/data/themes/abc/apps/files/l10n/pt_BR.json index 052a489c17cf..762bafc51d79 100644 --- a/tests/data/themes/abc/apps/files/l10n/pt_BR.json +++ b/tests/data/themes/abc/apps/files/l10n/pt_BR.json @@ -19,6 +19,7 @@ "Target folder does not exist any more" : "Pasta de destino não existe mais", "The file {file} is currently locked, please try again later" : "O arquivo {file} está bloqueado, por favor tente novamente mais tarde", "Not enough free space" : "Não há espaço livre suficiente", + "Failed to upload the file \"{fileName}\": {error}" : "Falha ao carregar o arquivo \"{fileName}\": {error}", "Uploading..." : "Enviando...", "..." : "...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} de {totalSize} ({bitrate})", diff --git a/version.php b/version.php index 8789d7316679..60b58f9597dc 100644 --- a/version.php +++ b/version.php @@ -25,10 +25,10 @@ // We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel // when updating major/minor version number. -$OC_Version = [10, 13, 0, 0]; +$OC_Version = [10, 13, 0, 1]; // The human-readable string -$OC_VersionString = '10.13.0 prealpha'; +$OC_VersionString = '10.13.0 beta 1'; $OC_VersionCanBeUpgradedFrom = [[8, 2, 11],[9, 0, 9],[9, 1]];