aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/mainfileinfodetailview.js9
-rw-r--r--apps/files/l10n/es.js3
-rw-r--r--apps/files/l10n/es.json3
-rw-r--r--apps/files/l10n/nb.js2
-rw-r--r--apps/files/l10n/nb.json2
-rw-r--r--apps/files/l10n/ru.js3
-rw-r--r--apps/files/l10n/ru.json3
-rw-r--r--apps/files/tests/js/mainfileinfodetailviewSpec.js29
-rw-r--r--apps/files_external/l10n/de.js1
-rw-r--r--apps/files_external/l10n/de.json1
-rw-r--r--apps/files_external/l10n/de_DE.js1
-rw-r--r--apps/files_external/l10n/de_DE.json1
-rw-r--r--apps/files_external/l10n/es.js1
-rw-r--r--apps/files_external/l10n/es.json1
-rw-r--r--core/css/fixes.scss3
-rw-r--r--core/css/tooltip.scss2
-rw-r--r--core/js/public/comments.js2
-rw-r--r--lib/private/Preview/Generator.php52
-rw-r--r--lib/private/legacy/image.php19
-rw-r--r--lib/public/IImage.php6
-rw-r--r--settings/l10n/es.js6
-rw-r--r--settings/l10n/es.json6
-rw-r--r--settings/l10n/nb.js3
-rw-r--r--settings/l10n/nb.json3
-rw-r--r--settings/l10n/ru.js6
-rw-r--r--settings/l10n/ru.json6
-rw-r--r--tests/lib/Preview/GeneratorTest.php8
27 files changed, 170 insertions, 12 deletions
diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js
index ea3063f6176..626ab86ded3 100644
--- a/apps/files/js/mainfileinfodetailview.js
+++ b/apps/files/js/mainfileinfodetailview.js
@@ -20,9 +20,11 @@
'</a>' +
'</div>' +
' <div class="file-details ellipsis">' +
+ ' {{#if hasFavoriteAction}}' +
' <a href="#" class="action action-favorite favorite permanent">' +
' <span class="icon {{starClass}}" title="{{starAltText}}"></span>' +
' </a>' +
+ ' {{/if}}' +
' {{#if hasSize}}<span class="size" title="{{altSize}}">{{size}}</span>, {{/if}}<span class="date live-relative-timestamp" data-timestamp="{{timestamp}}" title="{{altDate}}">{{date}}</span>' +
' </div>' +
'</div>' +
@@ -175,6 +177,12 @@
if (this.model) {
var isFavorite = (this.model.get('tags') || []).indexOf(OC.TAG_FAVORITE) >= 0;
+ var availableActions = this._fileActions.get(
+ this.model.get('mimetype'),
+ this.model.get('type'),
+ this.model.get('permissions')
+ );
+ var hasFavoriteAction = 'Favorite' in availableActions;
this.$el.html(this.template({
type: this.model.isImage()? 'image': '',
nameLabel: t('files', 'Name'),
@@ -189,6 +197,7 @@
altDate: OC.Util.formatDate(this.model.get('mtime')),
timestamp: this.model.get('mtime'),
date: OC.Util.relativeModifiedDate(this.model.get('mtime')),
+ hasFavoriteAction: hasFavoriteAction,
starAltText: isFavorite ? t('files', 'Favorited') : t('files', 'Favorite'),
starClass: isFavorite ? 'icon-starred' : 'icon-star',
permalink: this._makePermalink(this.model.get('id')),
diff --git a/apps/files/l10n/es.js b/apps/files/l10n/es.js
index a4666bd7bdf..0852da86efc 100644
--- a/apps/files/l10n/es.js
+++ b/apps/files/l10n/es.js
@@ -62,8 +62,11 @@ OC.L10N.register(
"You don’t have permission to upload or create files here" : "No tiene permisos para subir o crear archivos aquí",
"_Uploading %n file_::_Uploading %n files_" : ["Subiendo %n archivo","Subiendo %n archivos"],
"New" : "Nuevo",
+ "{used} of {quota} used" : "{used} usados de {quota}",
+ "{used} used" : "{used} usados",
"\"{name}\" is an invalid file name." : "\"{name}\" es un nombre de archivo inválido.",
"File name cannot be empty." : "El nombre de archivo no puede estar vacío.",
+ "\"/\" is not allowed inside a file name." : "\"/\" no se permite dentro de un nombre de archivo.",
"\"{name}\" is not an allowed filetype" : "\"{name}\" no es un tipo de archivo permitido",
"Storage of {owner} is full, files can not be updated or synced anymore!" : "El almacén de {owner} está repleto, ¡los archivos no se actualizarán ni sincronizarán más!",
"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!",
diff --git a/apps/files/l10n/es.json b/apps/files/l10n/es.json
index 44db92002f2..db8baad60b3 100644
--- a/apps/files/l10n/es.json
+++ b/apps/files/l10n/es.json
@@ -60,8 +60,11 @@
"You don’t have permission to upload or create files here" : "No tiene permisos para subir o crear archivos aquí",
"_Uploading %n file_::_Uploading %n files_" : ["Subiendo %n archivo","Subiendo %n archivos"],
"New" : "Nuevo",
+ "{used} of {quota} used" : "{used} usados de {quota}",
+ "{used} used" : "{used} usados",
"\"{name}\" is an invalid file name." : "\"{name}\" es un nombre de archivo inválido.",
"File name cannot be empty." : "El nombre de archivo no puede estar vacío.",
+ "\"/\" is not allowed inside a file name." : "\"/\" no se permite dentro de un nombre de archivo.",
"\"{name}\" is not an allowed filetype" : "\"{name}\" no es un tipo de archivo permitido",
"Storage of {owner} is full, files can not be updated or synced anymore!" : "El almacén de {owner} está repleto, ¡los archivos no se actualizarán ni sincronizarán más!",
"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!",
diff --git a/apps/files/l10n/nb.js b/apps/files/l10n/nb.js
index b9e3ee0a1b8..45b9027f782 100644
--- a/apps/files/l10n/nb.js
+++ b/apps/files/l10n/nb.js
@@ -62,6 +62,8 @@ OC.L10N.register(
"You don’t have permission to upload or create files here" : "Du har ikke tillatelse til å laste opp eller opprette filer her",
"_Uploading %n file_::_Uploading %n files_" : ["Laster opp %n fil","Laster opp %n filer"],
"New" : "Ny",
+ "{used} of {quota} used" : "{used} av {quota} brukt",
+ "{used} used" : "{used} brukt",
"\"{name}\" is an invalid file name." : "\"{name}\" er et uglydig filnavn.",
"File name cannot be empty." : "Filnavn kan ikke være tomt.",
"\"{name}\" is not an allowed filetype" : "\"{name}\" er ikke en tillatt filtype",
diff --git a/apps/files/l10n/nb.json b/apps/files/l10n/nb.json
index 4c4e0622362..0328ceb283a 100644
--- a/apps/files/l10n/nb.json
+++ b/apps/files/l10n/nb.json
@@ -60,6 +60,8 @@
"You don’t have permission to upload or create files here" : "Du har ikke tillatelse til å laste opp eller opprette filer her",
"_Uploading %n file_::_Uploading %n files_" : ["Laster opp %n fil","Laster opp %n filer"],
"New" : "Ny",
+ "{used} of {quota} used" : "{used} av {quota} brukt",
+ "{used} used" : "{used} brukt",
"\"{name}\" is an invalid file name." : "\"{name}\" er et uglydig filnavn.",
"File name cannot be empty." : "Filnavn kan ikke være tomt.",
"\"{name}\" is not an allowed filetype" : "\"{name}\" er ikke en tillatt filtype",
diff --git a/apps/files/l10n/ru.js b/apps/files/l10n/ru.js
index b6222725a72..9878e2f78dd 100644
--- a/apps/files/l10n/ru.js
+++ b/apps/files/l10n/ru.js
@@ -62,8 +62,11 @@ OC.L10N.register(
"You don’t have permission to upload or create files here" : "У вас нет разрешений на создание или загрузку файлов в эту папку.",
"_Uploading %n file_::_Uploading %n files_" : ["Выгружа%nется файл","Выгружаются %n файла","Выгружаются %n файлов","Загружаются %n файлов"],
"New" : "Новый",
+ "{used} of {quota} used" : "использовано {used} из {quota}",
+ "{used} used" : "использовано {used}",
"\"{name}\" is an invalid file name." : "«{name}» — недопустимое имя файла.",
"File name cannot be empty." : "Имя файла не может быть пустым.",
+ "\"/\" is not allowed inside a file name." : "Символ «/» недопустим в имени файла.",
"\"{name}\" is not an allowed filetype" : "«{name}» - недопустимый тип файла.",
"Storage of {owner} is full, files can not be updated or synced anymore!" : "Хранилище {owner} переполнено, файлы больше не могут быть обновлены или синхронизированы!",
"Your storage is full, files can not be updated or synced anymore!" : "Ваше хранилище переполнено, файлы больше не могут быть обновлены или синхронизированы!",
diff --git a/apps/files/l10n/ru.json b/apps/files/l10n/ru.json
index e989cdd3183..be07497fda4 100644
--- a/apps/files/l10n/ru.json
+++ b/apps/files/l10n/ru.json
@@ -60,8 +60,11 @@
"You don’t have permission to upload or create files here" : "У вас нет разрешений на создание или загрузку файлов в эту папку.",
"_Uploading %n file_::_Uploading %n files_" : ["Выгружа%nется файл","Выгружаются %n файла","Выгружаются %n файлов","Загружаются %n файлов"],
"New" : "Новый",
+ "{used} of {quota} used" : "использовано {used} из {quota}",
+ "{used} used" : "использовано {used}",
"\"{name}\" is an invalid file name." : "«{name}» — недопустимое имя файла.",
"File name cannot be empty." : "Имя файла не может быть пустым.",
+ "\"/\" is not allowed inside a file name." : "Символ «/» недопустим в имени файла.",
"\"{name}\" is not an allowed filetype" : "«{name}» - недопустимый тип файла.",
"Storage of {owner} is full, files can not be updated or synced anymore!" : "Хранилище {owner} переполнено, файлы больше не могут быть обновлены или синхронизированы!",
"Your storage is full, files can not be updated or synced anymore!" : "Ваше хранилище переполнено, файлы больше не могут быть обновлены или синхронизированы!",
diff --git a/apps/files/tests/js/mainfileinfodetailviewSpec.js b/apps/files/tests/js/mainfileinfodetailviewSpec.js
index faf0faa8d8f..0201429a472 100644
--- a/apps/files/tests/js/mainfileinfodetailviewSpec.js
+++ b/apps/files/tests/js/mainfileinfodetailviewSpec.js
@@ -68,6 +68,12 @@ describe('OCA.Files.MainFileInfoDetailView tests', function() {
.toEqual(OC.getProtocol() + '://' + OC.getHost() + OC.generateUrl('/f/5'));
});
it('displays favorite icon', function() {
+ fileActions.registerAction({
+ name: 'Favorite',
+ mime: 'all',
+ permissions: OC.PERMISSION_NONE
+ });
+
testFileInfo.set('tags', [OC.TAG_FAVORITE]);
view.setFileInfo(testFileInfo);
expect(view.$el.find('.action-favorite > span').hasClass('icon-starred')).toEqual(true);
@@ -78,6 +84,15 @@ describe('OCA.Files.MainFileInfoDetailView tests', function() {
expect(view.$el.find('.action-favorite > span').hasClass('icon-starred')).toEqual(false);
expect(view.$el.find('.action-favorite > span').hasClass('icon-star')).toEqual(true);
});
+ it('does not display favorite icon if favorite action is not available', function() {
+ testFileInfo.set('tags', [OC.TAG_FAVORITE]);
+ view.setFileInfo(testFileInfo);
+ expect(view.$el.find('.action-favorite').length).toEqual(0);
+
+ testFileInfo.set('tags', []);
+ view.setFileInfo(testFileInfo);
+ expect(view.$el.find('.action-favorite').length).toEqual(0);
+ });
it('displays mime icon', function() {
// File
var lazyLoadPreviewStub = sinon.stub(fileList, 'lazyLoadPreview');
@@ -183,6 +198,13 @@ describe('OCA.Files.MainFileInfoDetailView tests', function() {
expect(view.$el.find('.fileName h3').attr('title')).toEqual('hello.txt');
});
it('rerenders when changes are made on the model', function() {
+ // Show the "Favorite" icon
+ fileActions.registerAction({
+ name: 'Favorite',
+ mime: 'all',
+ permissions: OC.PERMISSION_NONE
+ });
+
view.setFileInfo(testFileInfo);
testFileInfo.set('tags', [OC.TAG_FAVORITE]);
@@ -196,6 +218,13 @@ describe('OCA.Files.MainFileInfoDetailView tests', function() {
expect(view.$el.find('.action-favorite > span').hasClass('icon-star')).toEqual(true);
});
it('unbinds change listener from model', function() {
+ // Show the "Favorite" icon
+ fileActions.registerAction({
+ name: 'Favorite',
+ mime: 'all',
+ permissions: OC.PERMISSION_NONE
+ });
+
view.setFileInfo(testFileInfo);
view.setFileInfo(new OCA.Files.FileInfoModel({
id: 999,
diff --git a/apps/files_external/l10n/de.js b/apps/files_external/l10n/de.js
index 40126676f0a..eb8fbdf0d8c 100644
--- a/apps/files_external/l10n/de.js
+++ b/apps/files_external/l10n/de.js
@@ -75,6 +75,7 @@ OC.L10N.register(
"Region" : "Region",
"Enable SSL" : "SSL aktivieren",
"Enable Path Style" : "Pfad-Stil aktivieren",
+ "Legacy (v2) authentication" : "Legacy-Authentifizierung (V2)",
"WebDAV" : "WebDAV",
"URL" : "URL",
"Remote subfolder" : "Entfernter Unterordner",
diff --git a/apps/files_external/l10n/de.json b/apps/files_external/l10n/de.json
index c93ba785568..53fd2e422fa 100644
--- a/apps/files_external/l10n/de.json
+++ b/apps/files_external/l10n/de.json
@@ -73,6 +73,7 @@
"Region" : "Region",
"Enable SSL" : "SSL aktivieren",
"Enable Path Style" : "Pfad-Stil aktivieren",
+ "Legacy (v2) authentication" : "Legacy-Authentifizierung (V2)",
"WebDAV" : "WebDAV",
"URL" : "URL",
"Remote subfolder" : "Entfernter Unterordner",
diff --git a/apps/files_external/l10n/de_DE.js b/apps/files_external/l10n/de_DE.js
index 6851466d426..5f01b5179de 100644
--- a/apps/files_external/l10n/de_DE.js
+++ b/apps/files_external/l10n/de_DE.js
@@ -75,6 +75,7 @@ OC.L10N.register(
"Region" : "Region",
"Enable SSL" : "SSL aktivieren",
"Enable Path Style" : "Pfadstil aktivieren",
+ "Legacy (v2) authentication" : "Legacy-Authentifizierung (V2)",
"WebDAV" : "WebDAV",
"URL" : "Adresse",
"Remote subfolder" : "Entfernter Unterordner",
diff --git a/apps/files_external/l10n/de_DE.json b/apps/files_external/l10n/de_DE.json
index 22e359c0378..e5f25c97a1f 100644
--- a/apps/files_external/l10n/de_DE.json
+++ b/apps/files_external/l10n/de_DE.json
@@ -73,6 +73,7 @@
"Region" : "Region",
"Enable SSL" : "SSL aktivieren",
"Enable Path Style" : "Pfadstil aktivieren",
+ "Legacy (v2) authentication" : "Legacy-Authentifizierung (V2)",
"WebDAV" : "WebDAV",
"URL" : "Adresse",
"Remote subfolder" : "Entfernter Unterordner",
diff --git a/apps/files_external/l10n/es.js b/apps/files_external/l10n/es.js
index b980588862e..7bfed57158d 100644
--- a/apps/files_external/l10n/es.js
+++ b/apps/files_external/l10n/es.js
@@ -75,6 +75,7 @@ OC.L10N.register(
"Region" : "Región",
"Enable SSL" : "Habilitar SSL",
"Enable Path Style" : "Habilitar Estilo de Ruta",
+ "Legacy (v2) authentication" : "Autenticación heredada (v2)",
"WebDAV" : "WebDAV",
"URL" : "URL",
"Remote subfolder" : "Subcarpeta remota",
diff --git a/apps/files_external/l10n/es.json b/apps/files_external/l10n/es.json
index 0c6ab09d88d..79c81accd58 100644
--- a/apps/files_external/l10n/es.json
+++ b/apps/files_external/l10n/es.json
@@ -73,6 +73,7 @@
"Region" : "Región",
"Enable SSL" : "Habilitar SSL",
"Enable Path Style" : "Habilitar Estilo de Ruta",
+ "Legacy (v2) authentication" : "Autenticación heredada (v2)",
"WebDAV" : "WebDAV",
"URL" : "URL",
"Remote subfolder" : "Subcarpeta remota",
diff --git a/core/css/fixes.scss b/core/css/fixes.scss
index 0303b4d751a..09ab9c1d244 100644
--- a/core/css/fixes.scss
+++ b/core/css/fixes.scss
@@ -20,6 +20,7 @@ select {
.ie .header-left #navigation,
.ie .ui-datepicker,
.ie .ui-timepicker.ui-widget,
-.ie #appmenu li span {
+.ie #appmenu li span,
+.ie .tooltip-inner {
box-shadow: 0 1px 10px $color-box-shadow;
}
diff --git a/core/css/tooltip.scss b/core/css/tooltip.scss
index e9982b580ca..a974e05e1a6 100644
--- a/core/css/tooltip.scss
+++ b/core/css/tooltip.scss
@@ -31,6 +31,7 @@
font-size: 12px;
opacity: 0;
z-index: 100000;
+ filter: drop-shadow(0 1px 10px $color-box-shadow);
&.in {
opacity: 1;
}
@@ -115,7 +116,6 @@
padding: 5px 8px;
background-color: $color-main-background;
color: $color-main-text;
- box-shadow: 0 1px 10px $color-box-shadow;
text-align: center;
border-radius: $border-radius;
}
diff --git a/core/js/public/comments.js b/core/js/public/comments.js
index 6de7ff7d38a..955e88c8609 100644
--- a/core/js/public/comments.js
+++ b/core/js/public/comments.js
@@ -43,7 +43,7 @@
}
var linkText = url.replace(self.protocolRegex, '');
- return '<a class="external" href="' + url + '">' + linkText + '</a>';
+ return '<a class="external" target="_blank" href="' + url + '">' + linkText + '</a>';
});
},
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php
index d6a6213e532..448a7a57580 100644
--- a/lib/private/Preview/Generator.php
+++ b/lib/private/Preview/Generator.php
@@ -128,9 +128,13 @@ class Generator {
// Try to get a cached preview. Else generate (and store) one
try {
- $file = $this->getCachedPreview($previewFolder, $width, $height, $crop);
- } catch (NotFoundException $e) {
- $file = $this->generatePreview($previewFolder, $maxPreview, $width, $height, $crop, $maxWidth, $maxHeight);
+ try {
+ $file = $this->getCachedPreview($previewFolder, $width, $height, $crop, $maxPreview->getMimeType());
+ } catch (NotFoundException $e) {
+ $file = $this->generatePreview($previewFolder, $maxPreview, $width, $height, $crop, $maxWidth, $maxHeight);
+ }
+ } catch (\InvalidArgumentException $e) {
+ throw new NotFoundException();
}
return $file;
@@ -173,7 +177,15 @@ class Generator {
continue;
}
- $path = (string)$preview->width() . '-' . (string)$preview->height() . '-max.png';
+ // Try to get the extention.
+ try {
+ $ext = $this->getExtention($preview->dataMimeType());
+ } catch (\InvalidArgumentException $e) {
+ // Just continue to the next iteration if this preview doesn't have a valid mimetype
+ continue;
+ }
+
+ $path = (string)$preview->width() . '-' . (string)$preview->height() . '-max.' . $ext;
try {
$file = $previewFolder->newFile($path);
$file->putContent($preview->data());
@@ -201,14 +213,17 @@ class Generator {
* @param int $width
* @param int $height
* @param bool $crop
+ * @param string $mimeType
* @return string
*/
- private function generatePath($width, $height, $crop) {
+ private function generatePath($width, $height, $crop, $mimeType) {
$path = (string)$width . '-' . (string)$height;
if ($crop) {
$path .= '-crop';
}
- $path .= '.png';
+
+ $ext = $this->getExtention($mimeType);
+ $path .= '.' . $ext;
return $path;
}
@@ -340,7 +355,7 @@ class Generator {
}
- $path = $this->generatePath($width, $height, $crop);
+ $path = $this->generatePath($width, $height, $crop, $preview->dataMimeType());
try {
$file = $previewFolder->newFile($path);
$file->putContent($preview->data());
@@ -356,12 +371,13 @@ class Generator {
* @param int $width
* @param int $height
* @param bool $crop
+ * @param string $mimeType
* @return ISimpleFile
*
* @throws NotFoundException
*/
- private function getCachedPreview(ISimpleFolder $previewFolder, $width, $height, $crop) {
- $path = $this->generatePath($width, $height, $crop);
+ private function getCachedPreview(ISimpleFolder $previewFolder, $width, $height, $crop, $mimeType) {
+ $path = $this->generatePath($width, $height, $crop, $mimeType);
return $previewFolder->getFile($path);
}
@@ -381,4 +397,22 @@ class Generator {
return $folder;
}
+
+ /**
+ * @param string $mimeType
+ * @return null|string
+ * @throws \InvalidArgumentException
+ */
+ private function getExtention($mimeType) {
+ switch ($mimeType) {
+ case 'image/png':
+ return 'png';
+ case 'image/jpeg':
+ return 'jpg';
+ case 'image/gif':
+ return 'gif';
+ default:
+ throw new \InvalidArgumentException('Not a valid mimetype');
+ }
+ }
}
diff --git a/lib/private/legacy/image.php b/lib/private/legacy/image.php
index a7d702ac032..a0159b927f9 100644
--- a/lib/private/legacy/image.php
+++ b/lib/private/legacy/image.php
@@ -305,6 +305,25 @@ class OC_Image implements \OCP\IImage {
}
/**
+ * @return string Returns the mimetype of the data. Returns the empty string
+ * if the data is not valid.
+ */
+ public function dataMimeType() {
+ if (!$this->valid()) {
+ return '';
+ }
+
+ switch ($this->mimeType) {
+ case 'image/png':
+ case 'image/jpeg':
+ case 'image/gif':
+ return $this->mimeType;
+ default:
+ return 'image/png';
+ }
+ }
+
+ /**
* @return null|string Returns the raw image data.
*/
public function data() {
diff --git a/lib/public/IImage.php b/lib/public/IImage.php
index f63a1b8ca60..70e8b3cff75 100644
--- a/lib/public/IImage.php
+++ b/lib/public/IImage.php
@@ -103,6 +103,12 @@ interface IImage {
public function resource();
/**
+ * @return string Returns the raw data mimetype
+ * @since 13.0.0
+ */
+ public function dataMimeType();
+
+ /**
* @return string Returns the raw image data.
* @since 8.1.0
*/
diff --git a/settings/l10n/es.js b/settings/l10n/es.js
index bef3b13fcf5..041b63f6fc7 100644
--- a/settings/l10n/es.js
+++ b/settings/l10n/es.js
@@ -104,9 +104,15 @@ OC.L10N.register(
"Error: This app can not be enabled because it makes the server unstable" : "Error: Esta app no se puede activar porque desestabiliza el servidor",
"Error: Could not disable broken app" : "Error: No se ha podido desactivar una app estropeada",
"Error while disabling broken app" : "Error mientras deshabilitaba la App dañada",
+ "App up to date" : "App actualizada",
+ "Upgrading …" : "Actualizando...",
+ "Could not upgrade app" : "No se ha podido actualizar la app",
"Updated" : "Actualizado",
"Removing …" : "Eliminando...",
+ "Could not remove app" : "No se ha podido eliminar la app",
"Remove" : "Eliminar",
+ "The app has been enabled but needs to be upgraded. You will be redirected to the upgrade page in 5 seconds." : "La app ha sido activada pero tiene que actualizarse. Serás redirigido a la página de actualización en 5 segundos.",
+ "App upgrade" : "Actualización de la app",
"Approved" : "Aprobado",
"Experimental" : "Experimental",
"No apps found for {query}" : "No se han encontrado apps para {query}",
diff --git a/settings/l10n/es.json b/settings/l10n/es.json
index be7a4ecad19..9c8007c4848 100644
--- a/settings/l10n/es.json
+++ b/settings/l10n/es.json
@@ -102,9 +102,15 @@
"Error: This app can not be enabled because it makes the server unstable" : "Error: Esta app no se puede activar porque desestabiliza el servidor",
"Error: Could not disable broken app" : "Error: No se ha podido desactivar una app estropeada",
"Error while disabling broken app" : "Error mientras deshabilitaba la App dañada",
+ "App up to date" : "App actualizada",
+ "Upgrading …" : "Actualizando...",
+ "Could not upgrade app" : "No se ha podido actualizar la app",
"Updated" : "Actualizado",
"Removing …" : "Eliminando...",
+ "Could not remove app" : "No se ha podido eliminar la app",
"Remove" : "Eliminar",
+ "The app has been enabled but needs to be upgraded. You will be redirected to the upgrade page in 5 seconds." : "La app ha sido activada pero tiene que actualizarse. Serás redirigido a la página de actualización en 5 segundos.",
+ "App upgrade" : "Actualización de la app",
"Approved" : "Aprobado",
"Experimental" : "Experimental",
"No apps found for {query}" : "No se han encontrado apps para {query}",
diff --git a/settings/l10n/nb.js b/settings/l10n/nb.js
index 793ee8ff43b..e889a966092 100644
--- a/settings/l10n/nb.js
+++ b/settings/l10n/nb.js
@@ -104,6 +104,9 @@ OC.L10N.register(
"Error: This app can not be enabled because it makes the server unstable" : "Feil: Dette programmet kan ikke aktiveres fordi det gjør tjeneren ustabil",
"Error: Could not disable broken app" : "Feil: Kunne ikke deaktivere ustabilt program",
"Error while disabling broken app" : "Feil ved deaktivering av ustabilt program",
+ "App up to date" : "Appen er oppdatert",
+ "Upgrading …" : "Oppgraderer…",
+ "Could not upgrade app" : "Kunne ikke oppgradere appen",
"Updated" : "Oppdatert",
"Removing …" : "Fjerner…",
"Remove" : "Fjern",
diff --git a/settings/l10n/nb.json b/settings/l10n/nb.json
index c7f926f4acb..b95a39680b8 100644
--- a/settings/l10n/nb.json
+++ b/settings/l10n/nb.json
@@ -102,6 +102,9 @@
"Error: This app can not be enabled because it makes the server unstable" : "Feil: Dette programmet kan ikke aktiveres fordi det gjør tjeneren ustabil",
"Error: Could not disable broken app" : "Feil: Kunne ikke deaktivere ustabilt program",
"Error while disabling broken app" : "Feil ved deaktivering av ustabilt program",
+ "App up to date" : "Appen er oppdatert",
+ "Upgrading …" : "Oppgraderer…",
+ "Could not upgrade app" : "Kunne ikke oppgradere appen",
"Updated" : "Oppdatert",
"Removing …" : "Fjerner…",
"Remove" : "Fjern",
diff --git a/settings/l10n/ru.js b/settings/l10n/ru.js
index 8c11d9ea667..b5d98373e91 100644
--- a/settings/l10n/ru.js
+++ b/settings/l10n/ru.js
@@ -104,9 +104,15 @@ OC.L10N.register(
"Error: This app can not be enabled because it makes the server unstable" : "Ошибка: это приложение не может быть включено, так как оно сделает сервер нестабильным",
"Error: Could not disable broken app" : "Ошибка: невозможно отключить «сломанное» приложение",
"Error while disabling broken app" : "Ошибка при отключении сломанного приложения",
+ "App up to date" : "Приложение не нуждается в обновлении",
+ "Upgrading …" : "Обновление...",
+ "Could not upgrade app" : "Не удалось обновить приложение",
"Updated" : "Обновлено",
"Removing …" : "Удаление…",
+ "Could not remove app" : "Не удалось удалить приложение.",
"Remove" : "Удалить",
+ "The app has been enabled but needs to be upgraded. You will be redirected to the upgrade page in 5 seconds." : "Приложение было включено, но нуждается в обновлении. В течении 5 секунд будет выполнено перенаправление на страницу обновления.",
+ "App upgrade" : "Обновление приложения",
"Approved" : "Подтвержденное",
"Experimental" : "Экспериментальное",
"No apps found for {query}" : "Приложения не найдены по {query}",
diff --git a/settings/l10n/ru.json b/settings/l10n/ru.json
index bcacfeef65d..387973ffc82 100644
--- a/settings/l10n/ru.json
+++ b/settings/l10n/ru.json
@@ -102,9 +102,15 @@
"Error: This app can not be enabled because it makes the server unstable" : "Ошибка: это приложение не может быть включено, так как оно сделает сервер нестабильным",
"Error: Could not disable broken app" : "Ошибка: невозможно отключить «сломанное» приложение",
"Error while disabling broken app" : "Ошибка при отключении сломанного приложения",
+ "App up to date" : "Приложение не нуждается в обновлении",
+ "Upgrading …" : "Обновление...",
+ "Could not upgrade app" : "Не удалось обновить приложение",
"Updated" : "Обновлено",
"Removing …" : "Удаление…",
+ "Could not remove app" : "Не удалось удалить приложение.",
"Remove" : "Удалить",
+ "The app has been enabled but needs to be upgraded. You will be redirected to the upgrade page in 5 seconds." : "Приложение было включено, но нуждается в обновлении. В течении 5 секунд будет выполнено перенаправление на страницу обновления.",
+ "App upgrade" : "Обновление приложения",
"Approved" : "Подтвержденное",
"Experimental" : "Экспериментальное",
"No apps found for {query}" : "Приложения не найдены по {query}",
diff --git a/tests/lib/Preview/GeneratorTest.php b/tests/lib/Preview/GeneratorTest.php
index f1383b0691b..130cccdf09e 100644
--- a/tests/lib/Preview/GeneratorTest.php
+++ b/tests/lib/Preview/GeneratorTest.php
@@ -93,6 +93,8 @@ class GeneratorTest extends \Test\TestCase {
$maxPreview = $this->createMock(ISimpleFile::class);
$maxPreview->method('getName')
->willReturn('1000-1000-max.png');
+ $maxPreview->method('getMimeType')
+ ->willReturn('image/png');
$previewFolder->method('getDirectoryListing')
->willReturn([$maxPreview]);
@@ -170,6 +172,7 @@ class GeneratorTest extends \Test\TestCase {
$image->method('width')->willReturn(2048);
$image->method('height')->willReturn(2048);
$image->method('valid')->willReturn(true);
+ $image->method('dataMimeType')->willReturn('image/png');
$this->helper->method('getThumbnail')
->will($this->returnCallback(function ($provider, $file, $x, $y) use ($invalidProvider, $validProvider, $image) {
@@ -185,6 +188,7 @@ class GeneratorTest extends \Test\TestCase {
$maxPreview = $this->createMock(ISimpleFile::class);
$maxPreview->method('getName')->willReturn('2048-2048-max.png');
+ $maxPreview->method('getMimeType')->willReturn('image/png');
$previewFile = $this->createMock(ISimpleFile::class);
@@ -219,6 +223,7 @@ class GeneratorTest extends \Test\TestCase {
$image->method('data')
->willReturn('my resized data');
$image->method('valid')->willReturn(true);
+ $image->method('dataMimeType')->willReturn('image/png');
$previewFile->expects($this->once())
->method('putContent')
@@ -362,6 +367,8 @@ class GeneratorTest extends \Test\TestCase {
$maxPreview = $this->createMock(ISimpleFile::class);
$maxPreview->method('getName')
->willReturn($maxX . '-' . $maxY . '-max.png');
+ $maxPreview->method('getMimeType')
+ ->willReturn('image/png');
$previewFolder->method('getDirectoryListing')
->willReturn([$maxPreview]);
@@ -382,6 +389,7 @@ class GeneratorTest extends \Test\TestCase {
$image->method('height')->willReturn($maxY);
$image->method('width')->willReturn($maxX);
$image->method('valid')->willReturn(true);
+ $image->method('dataMimeType')->willReturn('image/png');
$preview = $this->createMock(ISimpleFile::class);
$previewFolder->method('newFile')