summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/comments/appinfo/app.php31
-rw-r--r--apps/comments/appinfo/routes.php28
-rw-r--r--apps/comments/l10n/ar.js2
-rw-r--r--apps/comments/l10n/ar.json2
-rw-r--r--apps/comments/l10n/ast.js2
-rw-r--r--apps/comments/l10n/ast.json2
-rw-r--r--apps/comments/l10n/cs_CZ.js2
-rw-r--r--apps/comments/l10n/cs_CZ.json2
-rw-r--r--apps/comments/l10n/de.js2
-rw-r--r--apps/comments/l10n/de.json2
-rw-r--r--apps/comments/l10n/de_DE.js2
-rw-r--r--apps/comments/l10n/de_DE.json2
-rw-r--r--apps/comments/l10n/el.js2
-rw-r--r--apps/comments/l10n/el.json2
-rw-r--r--apps/comments/l10n/es.js2
-rw-r--r--apps/comments/l10n/es.json2
-rw-r--r--apps/comments/l10n/fi_FI.js7
-rw-r--r--apps/comments/l10n/fi_FI.json7
-rw-r--r--apps/comments/l10n/fr.js2
-rw-r--r--apps/comments/l10n/fr.json2
-rw-r--r--apps/comments/l10n/hu_HU.js2
-rw-r--r--apps/comments/l10n/hu_HU.json2
-rw-r--r--apps/comments/l10n/is.js2
-rw-r--r--apps/comments/l10n/is.json2
-rw-r--r--apps/comments/l10n/it.js2
-rw-r--r--apps/comments/l10n/it.json2
-rw-r--r--apps/comments/l10n/ko.js2
-rw-r--r--apps/comments/l10n/ko.json2
-rw-r--r--apps/comments/l10n/lv.js2
-rw-r--r--apps/comments/l10n/lv.json2
-rw-r--r--apps/comments/l10n/nb_NO.js2
-rw-r--r--apps/comments/l10n/nb_NO.json2
-rw-r--r--apps/comments/l10n/nl.js2
-rw-r--r--apps/comments/l10n/nl.json2
-rw-r--r--apps/comments/l10n/pl.js2
-rw-r--r--apps/comments/l10n/pl.json2
-rw-r--r--apps/comments/l10n/pt_BR.js2
-rw-r--r--apps/comments/l10n/pt_BR.json2
-rw-r--r--apps/comments/l10n/ru.js2
-rw-r--r--apps/comments/l10n/ru.json2
-rw-r--r--apps/comments/l10n/tr.js2
-rw-r--r--apps/comments/l10n/tr.json2
-rw-r--r--apps/comments/l10n/zh_TW.js2
-rw-r--r--apps/comments/l10n/zh_TW.json2
-rw-r--r--apps/comments/lib/AppInfo/Application.php35
-rw-r--r--apps/comments/lib/Controller/Notifications.php134
-rw-r--r--apps/comments/lib/EventHandler.php91
-rw-r--r--apps/comments/lib/Notification/Listener.php126
-rw-r--r--apps/comments/lib/Notification/Notifier.php115
-rw-r--r--apps/comments/tests/Unit/AppInfo/ApplicationTest.php65
-rw-r--r--apps/comments/tests/Unit/Controller/NotificationsTest.php155
-rw-r--r--apps/comments/tests/Unit/EventHandlerTest.php119
-rw-r--r--apps/comments/tests/Unit/Notification/ListenerTest.php339
-rw-r--r--apps/comments/tests/Unit/Notification/NotifierTest.php498
-rw-r--r--apps/dav/l10n/fi_FI.js17
-rw-r--r--apps/dav/l10n/fi_FI.json15
-rw-r--r--apps/dav/l10n/lt_LT.js17
-rw-r--r--apps/dav/l10n/lt_LT.json15
-rw-r--r--apps/dav/lib/Comments/CommentNode.php2
-rw-r--r--apps/federatedfilesharing/l10n/fi_FI.js23
-rw-r--r--apps/federatedfilesharing/l10n/fi_FI.json23
-rw-r--r--apps/federation/l10n/de_DE.js2
-rw-r--r--apps/federation/l10n/de_DE.json2
-rw-r--r--apps/federation/l10n/fi_FI.js4
-rw-r--r--apps/federation/l10n/fi_FI.json4
-rw-r--r--apps/files/l10n/bg_BG.js54
-rw-r--r--apps/files/l10n/bg_BG.json54
-rw-r--r--apps/files/l10n/es.js2
-rw-r--r--apps/files/l10n/es.json2
-rw-r--r--apps/files/lib/Command/TransferOwnership.php14
-rw-r--r--apps/files_external/l10n/es.js1
-rw-r--r--apps/files_external/l10n/es.json1
-rw-r--r--apps/files_external/l10n/fr.js2
-rw-r--r--apps/files_external/l10n/fr.json2
-rw-r--r--apps/files_sharing/l10n/es.js1
-rw-r--r--apps/files_sharing/l10n/es.json1
-rw-r--r--apps/files_sharing/l10n/fi_FI.js1
-rw-r--r--apps/files_sharing/l10n/fi_FI.json1
-rw-r--r--apps/files_sharing/l10n/fr.js2
-rw-r--r--apps/files_sharing/l10n/fr.json2
-rw-r--r--apps/files_sharing/lib/API/Share20OCS.php54
-rw-r--r--apps/files_sharing/tests/ApiTest.php31
-rw-r--r--apps/files_sharing/tests/External/ManagerTest.php6
-rw-r--r--apps/files_sharing/tests/SizePropagationTest.php1
-rw-r--r--apps/files_sharing/tests/TestCase.php3
-rw-r--r--apps/files_trashbin/l10n/bg_BG.js2
-rw-r--r--apps/files_trashbin/l10n/bg_BG.json2
-rw-r--r--apps/systemtags/l10n/fi_FI.js29
-rw-r--r--apps/systemtags/l10n/fi_FI.json29
-rw-r--r--apps/updatenotification/l10n/es.js2
-rw-r--r--apps/updatenotification/l10n/es.json2
-rw-r--r--apps/workflowengine/l10n/de.js10
-rw-r--r--apps/workflowengine/l10n/de.json10
-rw-r--r--apps/workflowengine/l10n/de_DE.js22
-rw-r--r--apps/workflowengine/l10n/de_DE.json22
-rw-r--r--apps/workflowengine/l10n/es.js10
-rw-r--r--apps/workflowengine/l10n/es.json10
97 files changed, 2171 insertions, 168 deletions
diff --git a/apps/comments/appinfo/app.php b/apps/comments/appinfo/app.php
index df41bdfa32d..771b35d9c6a 100644
--- a/apps/comments/appinfo/app.php
+++ b/apps/comments/appinfo/app.php
@@ -41,22 +41,33 @@ $activityManager = \OC::$server->getActivityManager();
$activityManager->registerExtension(function() {
$application = new \OCP\AppFramework\App('comments');
/** @var \OCA\Comments\Activity\Extension $extension */
- $extension = $application->getContainer()->query('OCA\Comments\Activity\Extension');
+ $extension = $application->getContainer()->query(\OCA\Comments\Activity\Extension::class);
return $extension;
});
-$managerListener = function(\OCP\Comments\CommentsEvent $event) use ($activityManager) {
- $application = new \OCP\AppFramework\App('comments');
- /** @var \OCA\Comments\Activity\Listener $listener */
- $listener = $application->getContainer()->query('OCA\Comments\Activity\Listener');
- $listener->commentEvent($event);
-};
-
-$eventDispatcher->addListener(\OCP\Comments\CommentsEvent::EVENT_ADD, $managerListener);
-
$eventDispatcher->addListener(\OCP\Comments\CommentsEntityEvent::EVENT_ENTITY, function(\OCP\Comments\CommentsEntityEvent $event) {
$event->addEntityCollection('files', function($name) {
$nodes = \OC::$server->getUserFolder()->getById(intval($name));
return !empty($nodes);
});
});
+
+$notificationManager = \OC::$server->getNotificationManager();
+$notificationManager->registerNotifier(
+ function() {
+ $application = new \OCP\AppFramework\App('comments');
+ return $application->getContainer()->query(\OCA\Comments\Notification\Notifier::class);
+ },
+ function () {
+ $l = \OC::$server->getL10N('comments');
+ return ['id' => 'comments', 'name' => $l->t('Comments')];
+ }
+);
+
+$commentsManager = \OC::$server->getCommentsManager();
+$commentsManager->registerEventHandler(function () {
+ $application = new \OCP\AppFramework\App('comments');
+ /** @var \OCA\Comments\Activity\Extension $extension */
+ $handler = $application->getContainer()->query(\OCA\Comments\EventHandler::class);
+ return $handler;
+});
diff --git a/apps/comments/appinfo/routes.php b/apps/comments/appinfo/routes.php
new file mode 100644
index 00000000000..ab751ddb2a2
--- /dev/null
+++ b/apps/comments/appinfo/routes.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+use \OCA\Comments\AppInfo\Application;
+
+$application = new Application();
+$application->registerRoutes($this, ['routes' => [
+ ['name' => 'Notifications#view', 'url' => '/notifications/view/{id}', 'verb' => 'GET'],
+]]);
diff --git a/apps/comments/l10n/ar.js b/apps/comments/l10n/ar.js
index 9589f105b98..00aab08bd8c 100644
--- a/apps/comments/l10n/ar.js
+++ b/apps/comments/l10n/ar.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "تعليقات",
"New comment …" : "تعليق جديد",
"Delete comment" : "حذف التعليق",
"Post" : "ارسال",
"Cancel" : "إلغاء",
"Edit comment" : "تعديل التعليق",
"[Deleted user]" : "[مستخدم محذوف]",
- "Comments" : "تعليقات",
"No comments yet, start the conversation!" : "لا يوجد تعليقات, ابدأ النقاش الآن!",
"More comments …" : "مزيد من التعليقات...",
"Save" : "حفظ",
diff --git a/apps/comments/l10n/ar.json b/apps/comments/l10n/ar.json
index f28173efa6f..70ca6d3c92b 100644
--- a/apps/comments/l10n/ar.json
+++ b/apps/comments/l10n/ar.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "تعليقات",
"New comment …" : "تعليق جديد",
"Delete comment" : "حذف التعليق",
"Post" : "ارسال",
"Cancel" : "إلغاء",
"Edit comment" : "تعديل التعليق",
"[Deleted user]" : "[مستخدم محذوف]",
- "Comments" : "تعليقات",
"No comments yet, start the conversation!" : "لا يوجد تعليقات, ابدأ النقاش الآن!",
"More comments …" : "مزيد من التعليقات...",
"Save" : "حفظ",
diff --git a/apps/comments/l10n/ast.js b/apps/comments/l10n/ast.js
index 5090bea7f99..ec17fe112b9 100644
--- a/apps/comments/l10n/ast.js
+++ b/apps/comments/l10n/ast.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Comentarios",
"New comment …" : "Comentariu nuevu...",
"Delete comment" : "Desaniciar comentariu",
"Post" : "Espublizar",
"Cancel" : "Encaboxar",
"Edit comment" : "Editar comentariu",
"[Deleted user]" : "[Usuariu desaniciáu]",
- "Comments" : "Comentarios",
"No comments yet, start the conversation!" : "Entá nun hai comentarios. ¡Entama una conversación!",
"More comments …" : "Más comentarios...",
"Save" : "Guardar",
diff --git a/apps/comments/l10n/ast.json b/apps/comments/l10n/ast.json
index 62d9747968d..57310e8bbff 100644
--- a/apps/comments/l10n/ast.json
+++ b/apps/comments/l10n/ast.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Comentarios",
"New comment …" : "Comentariu nuevu...",
"Delete comment" : "Desaniciar comentariu",
"Post" : "Espublizar",
"Cancel" : "Encaboxar",
"Edit comment" : "Editar comentariu",
"[Deleted user]" : "[Usuariu desaniciáu]",
- "Comments" : "Comentarios",
"No comments yet, start the conversation!" : "Entá nun hai comentarios. ¡Entama una conversación!",
"More comments …" : "Más comentarios...",
"Save" : "Guardar",
diff --git a/apps/comments/l10n/cs_CZ.js b/apps/comments/l10n/cs_CZ.js
index 1cd3b9dfa31..95d864c51eb 100644
--- a/apps/comments/l10n/cs_CZ.js
+++ b/apps/comments/l10n/cs_CZ.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Komentáře",
"New comment …" : "Nový komentář ...",
"Delete comment" : "Smazat komentář",
"Post" : "Zveřejnit",
"Cancel" : "Zrušit",
"Edit comment" : "Upravit komentář",
"[Deleted user]" : "[Smazaný uživatel]",
- "Comments" : "Komentáře",
"No comments yet, start the conversation!" : "Zatím bez komentářů, začněte konverzaci!",
"More comments …" : "Více komentářů ...",
"Save" : "Uložit",
diff --git a/apps/comments/l10n/cs_CZ.json b/apps/comments/l10n/cs_CZ.json
index ce150b41222..3735e42d90f 100644
--- a/apps/comments/l10n/cs_CZ.json
+++ b/apps/comments/l10n/cs_CZ.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Komentáře",
"New comment …" : "Nový komentář ...",
"Delete comment" : "Smazat komentář",
"Post" : "Zveřejnit",
"Cancel" : "Zrušit",
"Edit comment" : "Upravit komentář",
"[Deleted user]" : "[Smazaný uživatel]",
- "Comments" : "Komentáře",
"No comments yet, start the conversation!" : "Zatím bez komentářů, začněte konverzaci!",
"More comments …" : "Více komentářů ...",
"Save" : "Uložit",
diff --git a/apps/comments/l10n/de.js b/apps/comments/l10n/de.js
index 45205798eae..674a726f789 100644
--- a/apps/comments/l10n/de.js
+++ b/apps/comments/l10n/de.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Kommentare",
"New comment …" : "Neuer Kommentar ...",
"Delete comment" : "Kommentar löschen",
"Post" : "Speichern",
"Cancel" : "Abbrechen",
"Edit comment" : "Kommentar bearbeiten",
"[Deleted user]" : "[Gelöschter Benutzer]",
- "Comments" : "Kommentare",
"No comments yet, start the conversation!" : "Keine Kommentare bisher. Beginne die Diskussion!",
"More comments …" : "Weitere Kommentare ...",
"Save" : "Speichern",
diff --git a/apps/comments/l10n/de.json b/apps/comments/l10n/de.json
index e04b2abbc47..3832bd7bb70 100644
--- a/apps/comments/l10n/de.json
+++ b/apps/comments/l10n/de.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Kommentare",
"New comment …" : "Neuer Kommentar ...",
"Delete comment" : "Kommentar löschen",
"Post" : "Speichern",
"Cancel" : "Abbrechen",
"Edit comment" : "Kommentar bearbeiten",
"[Deleted user]" : "[Gelöschter Benutzer]",
- "Comments" : "Kommentare",
"No comments yet, start the conversation!" : "Keine Kommentare bisher. Beginne die Diskussion!",
"More comments …" : "Weitere Kommentare ...",
"Save" : "Speichern",
diff --git a/apps/comments/l10n/de_DE.js b/apps/comments/l10n/de_DE.js
index 3161ac4b64b..66da859a2fd 100644
--- a/apps/comments/l10n/de_DE.js
+++ b/apps/comments/l10n/de_DE.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Kommentare",
"New comment …" : "Neuer Kommentar ...",
"Delete comment" : "Kommentar löschen",
"Post" : "Speichern",
"Cancel" : "Abbrechen",
"Edit comment" : "Kommentar bearbeiten",
"[Deleted user]" : "[gelöschter Benutzer]",
- "Comments" : "Kommentare",
"No comments yet, start the conversation!" : "Keine Kommentare bisher. Beginnen Sie die Diskussion!",
"More comments …" : "Weitere Kommentare ...",
"Save" : "Speichern",
diff --git a/apps/comments/l10n/de_DE.json b/apps/comments/l10n/de_DE.json
index b6c835a4076..45b55c5fcce 100644
--- a/apps/comments/l10n/de_DE.json
+++ b/apps/comments/l10n/de_DE.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Kommentare",
"New comment …" : "Neuer Kommentar ...",
"Delete comment" : "Kommentar löschen",
"Post" : "Speichern",
"Cancel" : "Abbrechen",
"Edit comment" : "Kommentar bearbeiten",
"[Deleted user]" : "[gelöschter Benutzer]",
- "Comments" : "Kommentare",
"No comments yet, start the conversation!" : "Keine Kommentare bisher. Beginnen Sie die Diskussion!",
"More comments …" : "Weitere Kommentare ...",
"Save" : "Speichern",
diff --git a/apps/comments/l10n/el.js b/apps/comments/l10n/el.js
index 8a4eea41ca8..1790d429bde 100644
--- a/apps/comments/l10n/el.js
+++ b/apps/comments/l10n/el.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Σχόλια",
"New comment …" : "Νέο σχόλιο ...",
"Delete comment" : "Διαγραφή σχολίου",
"Post" : "Δημοσίευση",
"Cancel" : "Άκυρο",
"Edit comment" : "Επεξεργασία σχολίου",
"[Deleted user]" : "[Διαγραφή χρήστη]",
- "Comments" : "Σχόλια",
"No comments yet, start the conversation!" : "Δεν υπάρχουν σχόλια, ξεκινήστε την συζήτηση!",
"More comments …" : "Περισσότερα σχόλια ...",
"Save" : "Αποθήκευση",
diff --git a/apps/comments/l10n/el.json b/apps/comments/l10n/el.json
index c3711495298..1fbf208cedd 100644
--- a/apps/comments/l10n/el.json
+++ b/apps/comments/l10n/el.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Σχόλια",
"New comment …" : "Νέο σχόλιο ...",
"Delete comment" : "Διαγραφή σχολίου",
"Post" : "Δημοσίευση",
"Cancel" : "Άκυρο",
"Edit comment" : "Επεξεργασία σχολίου",
"[Deleted user]" : "[Διαγραφή χρήστη]",
- "Comments" : "Σχόλια",
"No comments yet, start the conversation!" : "Δεν υπάρχουν σχόλια, ξεκινήστε την συζήτηση!",
"More comments …" : "Περισσότερα σχόλια ...",
"Save" : "Αποθήκευση",
diff --git a/apps/comments/l10n/es.js b/apps/comments/l10n/es.js
index 7ff1f13f78c..8a3e0844db9 100644
--- a/apps/comments/l10n/es.js
+++ b/apps/comments/l10n/es.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Comentarios",
"New comment …" : "Comentario nuevo",
"Delete comment" : "Borrar comentario",
"Post" : "Publicar",
"Cancel" : "Cancelar",
"Edit comment" : "Editar comentario",
"[Deleted user]" : "[Usuario eliminado]",
- "Comments" : "Comentarios",
"No comments yet, start the conversation!" : "¡No hay comentarios, empieza la conversación!",
"More comments …" : "Más comentarios ...",
"Save" : "Guardar",
diff --git a/apps/comments/l10n/es.json b/apps/comments/l10n/es.json
index 998dfc87aa5..15955afe38c 100644
--- a/apps/comments/l10n/es.json
+++ b/apps/comments/l10n/es.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Comentarios",
"New comment …" : "Comentario nuevo",
"Delete comment" : "Borrar comentario",
"Post" : "Publicar",
"Cancel" : "Cancelar",
"Edit comment" : "Editar comentario",
"[Deleted user]" : "[Usuario eliminado]",
- "Comments" : "Comentarios",
"No comments yet, start the conversation!" : "¡No hay comentarios, empieza la conversación!",
"More comments …" : "Más comentarios ...",
"Save" : "Guardar",
diff --git a/apps/comments/l10n/fi_FI.js b/apps/comments/l10n/fi_FI.js
index 244bf214cf5..51408ed3d6a 100644
--- a/apps/comments/l10n/fi_FI.js
+++ b/apps/comments/l10n/fi_FI.js
@@ -1,18 +1,23 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Kommentit",
+ "New comment …" : "Uusi kommentti …",
"Delete comment" : "Poista kommentti",
"Post" : "Lähetä",
"Cancel" : "Peruuta",
"Edit comment" : "Muokkaa kommenttia",
"[Deleted user]" : "[Poistettu käyttäjä]",
- "Comments" : "Kommentit",
+ "No comments yet, start the conversation!" : "Ei kommentteja vielä. Aloita keskustelu!",
+ "More comments …" : "Lisää kommentteja …",
"Save" : "Tallenna",
"Allowed characters {count} of {max}" : "Sallittujen merkkien määrä {count}/{max}",
"Error occurred while retrieving comment with id {id}" : "Virhe noutaessa kommenttia tunnisteella {id}",
"Error occurred while updating comment with id {id}" : "Virhe päivittäessä kommenttia tunnisteella {id}",
"Error occurred while posting comment" : "Virhe kommenttia lähettäessä",
+ "_%n unread comment_::_%n unread comments_" : ["%n lukematon kommentti","%n lukematonta kommenttia"],
"Comment" : "Kommentti",
+ "<strong>Comments</strong> for files" : "Tiedostojen <strong>kommentit</strong>",
"You commented" : "Kommentoit",
"%1$s commented" : "%1$s kommentoi",
"You commented on %2$s" : "Kommentoit %2$s",
diff --git a/apps/comments/l10n/fi_FI.json b/apps/comments/l10n/fi_FI.json
index 8ce9a6f8a7f..926a91f0f63 100644
--- a/apps/comments/l10n/fi_FI.json
+++ b/apps/comments/l10n/fi_FI.json
@@ -1,16 +1,21 @@
{ "translations": {
+ "Comments" : "Kommentit",
+ "New comment …" : "Uusi kommentti …",
"Delete comment" : "Poista kommentti",
"Post" : "Lähetä",
"Cancel" : "Peruuta",
"Edit comment" : "Muokkaa kommenttia",
"[Deleted user]" : "[Poistettu käyttäjä]",
- "Comments" : "Kommentit",
+ "No comments yet, start the conversation!" : "Ei kommentteja vielä. Aloita keskustelu!",
+ "More comments …" : "Lisää kommentteja …",
"Save" : "Tallenna",
"Allowed characters {count} of {max}" : "Sallittujen merkkien määrä {count}/{max}",
"Error occurred while retrieving comment with id {id}" : "Virhe noutaessa kommenttia tunnisteella {id}",
"Error occurred while updating comment with id {id}" : "Virhe päivittäessä kommenttia tunnisteella {id}",
"Error occurred while posting comment" : "Virhe kommenttia lähettäessä",
+ "_%n unread comment_::_%n unread comments_" : ["%n lukematon kommentti","%n lukematonta kommenttia"],
"Comment" : "Kommentti",
+ "<strong>Comments</strong> for files" : "Tiedostojen <strong>kommentit</strong>",
"You commented" : "Kommentoit",
"%1$s commented" : "%1$s kommentoi",
"You commented on %2$s" : "Kommentoit %2$s",
diff --git a/apps/comments/l10n/fr.js b/apps/comments/l10n/fr.js
index b62bb35850f..fa3b4c744b3 100644
--- a/apps/comments/l10n/fr.js
+++ b/apps/comments/l10n/fr.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Commentaires",
"New comment …" : "Nouveau commentaire...",
"Delete comment" : "Supprimer le commentaire",
"Post" : "Poster",
"Cancel" : "Annuler",
"Edit comment" : "Modifier le commentaire",
"[Deleted user]" : "[Utilisateur supprimé]",
- "Comments" : "Commentaires",
"No comments yet, start the conversation!" : "Il n'y a aucun commentaire, démarrer la conversation!",
"More comments …" : "Plus de commentaires ...",
"Save" : "Enregistrer",
diff --git a/apps/comments/l10n/fr.json b/apps/comments/l10n/fr.json
index c0ae8d3568f..4a01951d96f 100644
--- a/apps/comments/l10n/fr.json
+++ b/apps/comments/l10n/fr.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Commentaires",
"New comment …" : "Nouveau commentaire...",
"Delete comment" : "Supprimer le commentaire",
"Post" : "Poster",
"Cancel" : "Annuler",
"Edit comment" : "Modifier le commentaire",
"[Deleted user]" : "[Utilisateur supprimé]",
- "Comments" : "Commentaires",
"No comments yet, start the conversation!" : "Il n'y a aucun commentaire, démarrer la conversation!",
"More comments …" : "Plus de commentaires ...",
"Save" : "Enregistrer",
diff --git a/apps/comments/l10n/hu_HU.js b/apps/comments/l10n/hu_HU.js
index 881a1caa076..33771268909 100644
--- a/apps/comments/l10n/hu_HU.js
+++ b/apps/comments/l10n/hu_HU.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Hozzászólások",
"New comment …" : "Új hozzászólás...",
"Delete comment" : "Hozzászólás törlése",
"Post" : "Küldés",
"Cancel" : "Mégsem",
"Edit comment" : "Hozzászólás szerkesztése",
"[Deleted user]" : "[Törölt felhasználó]",
- "Comments" : "Hozzászólások",
"No comments yet, start the conversation!" : "Még nincsenek hozzászólások, kezdd el a beszélgetést!",
"More comments …" : "Több hozzászólás...",
"Save" : "Mentés",
diff --git a/apps/comments/l10n/hu_HU.json b/apps/comments/l10n/hu_HU.json
index 99fe083315e..90b0aeb5bd2 100644
--- a/apps/comments/l10n/hu_HU.json
+++ b/apps/comments/l10n/hu_HU.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Hozzászólások",
"New comment …" : "Új hozzászólás...",
"Delete comment" : "Hozzászólás törlése",
"Post" : "Küldés",
"Cancel" : "Mégsem",
"Edit comment" : "Hozzászólás szerkesztése",
"[Deleted user]" : "[Törölt felhasználó]",
- "Comments" : "Hozzászólások",
"No comments yet, start the conversation!" : "Még nincsenek hozzászólások, kezdd el a beszélgetést!",
"More comments …" : "Több hozzászólás...",
"Save" : "Mentés",
diff --git a/apps/comments/l10n/is.js b/apps/comments/l10n/is.js
index c9f3009b8b1..89f95f39058 100644
--- a/apps/comments/l10n/is.js
+++ b/apps/comments/l10n/is.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Athugasemdir",
"New comment …" : "Ný athugasemd ...",
"Delete comment" : "Eyða athugasemd",
"Post" : "Senda",
"Cancel" : "Hætta við",
"Edit comment" : "Breyta athugasemd",
"[Deleted user]" : "[Eyddur notandi]",
- "Comments" : "Athugasemdir",
"No comments yet, start the conversation!" : "Engar athugasemdir ennþá, byrjaðu umræðuna!",
"More comments …" : "Fleiri athugasemdir ...",
"Save" : "Vista",
diff --git a/apps/comments/l10n/is.json b/apps/comments/l10n/is.json
index 4451b27b2c1..5af149eea19 100644
--- a/apps/comments/l10n/is.json
+++ b/apps/comments/l10n/is.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Athugasemdir",
"New comment …" : "Ný athugasemd ...",
"Delete comment" : "Eyða athugasemd",
"Post" : "Senda",
"Cancel" : "Hætta við",
"Edit comment" : "Breyta athugasemd",
"[Deleted user]" : "[Eyddur notandi]",
- "Comments" : "Athugasemdir",
"No comments yet, start the conversation!" : "Engar athugasemdir ennþá, byrjaðu umræðuna!",
"More comments …" : "Fleiri athugasemdir ...",
"Save" : "Vista",
diff --git a/apps/comments/l10n/it.js b/apps/comments/l10n/it.js
index dbefe31f87a..43dc0842b2a 100644
--- a/apps/comments/l10n/it.js
+++ b/apps/comments/l10n/it.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Commenti",
"New comment …" : "Nuovo commento...",
"Delete comment" : "Elimina commento",
"Post" : "Commento",
"Cancel" : "Annulla",
"Edit comment" : "Modifica commento",
"[Deleted user]" : "[Utente eliminato]",
- "Comments" : "Commenti",
"No comments yet, start the conversation!" : "Ancora nessun commento, inizia la conversazione!",
"More comments …" : "Altri commenti...",
"Save" : "Salva",
diff --git a/apps/comments/l10n/it.json b/apps/comments/l10n/it.json
index fcbd3f8c604..ce6398bed09 100644
--- a/apps/comments/l10n/it.json
+++ b/apps/comments/l10n/it.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Commenti",
"New comment …" : "Nuovo commento...",
"Delete comment" : "Elimina commento",
"Post" : "Commento",
"Cancel" : "Annulla",
"Edit comment" : "Modifica commento",
"[Deleted user]" : "[Utente eliminato]",
- "Comments" : "Commenti",
"No comments yet, start the conversation!" : "Ancora nessun commento, inizia la conversazione!",
"More comments …" : "Altri commenti...",
"Save" : "Salva",
diff --git a/apps/comments/l10n/ko.js b/apps/comments/l10n/ko.js
index cb89b09aabc..6e2eb80ec02 100644
--- a/apps/comments/l10n/ko.js
+++ b/apps/comments/l10n/ko.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "댓글",
"New comment …" : "새로운 댓글 ...",
"Delete comment" : "댓글 삭제",
"Post" : "게시",
"Cancel" : "취소",
"Edit comment" : "댓글 편집",
"[Deleted user]" : "[삭제된 사용자]",
- "Comments" : "댓글",
"No comments yet, start the conversation!" : "아직 댓글이 없습니다. 대화를 시작합니다!",
"More comments …" : "더 많은 댓글...",
"Save" : "저장",
diff --git a/apps/comments/l10n/ko.json b/apps/comments/l10n/ko.json
index 61a6020a76e..066a7c799d9 100644
--- a/apps/comments/l10n/ko.json
+++ b/apps/comments/l10n/ko.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "댓글",
"New comment …" : "새로운 댓글 ...",
"Delete comment" : "댓글 삭제",
"Post" : "게시",
"Cancel" : "취소",
"Edit comment" : "댓글 편집",
"[Deleted user]" : "[삭제된 사용자]",
- "Comments" : "댓글",
"No comments yet, start the conversation!" : "아직 댓글이 없습니다. 대화를 시작합니다!",
"More comments …" : "더 많은 댓글...",
"Save" : "저장",
diff --git a/apps/comments/l10n/lv.js b/apps/comments/l10n/lv.js
index c483aa1de46..c30721e9df4 100644
--- a/apps/comments/l10n/lv.js
+++ b/apps/comments/l10n/lv.js
@@ -1,12 +1,12 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Komentāri",
"Delete comment" : "Dzēst komentāru",
"Post" : "Pievienot",
"Cancel" : "Atcelt",
"Edit comment" : "Rediģēt komentāru",
"[Deleted user]" : "[Dzēsts lietotājs]",
- "Comments" : "Komentāri",
"Save" : "Saglabāt",
"Allowed characters {count} of {max}" : "Atļautās zīmes {count} no {max}",
"Error occurred while retrieving comment with id {id}" : "Notika kļūda saņemot komentāru ar id {id}",
diff --git a/apps/comments/l10n/lv.json b/apps/comments/l10n/lv.json
index 1ce75d114c1..153e7c4edfd 100644
--- a/apps/comments/l10n/lv.json
+++ b/apps/comments/l10n/lv.json
@@ -1,10 +1,10 @@
{ "translations": {
+ "Comments" : "Komentāri",
"Delete comment" : "Dzēst komentāru",
"Post" : "Pievienot",
"Cancel" : "Atcelt",
"Edit comment" : "Rediģēt komentāru",
"[Deleted user]" : "[Dzēsts lietotājs]",
- "Comments" : "Komentāri",
"Save" : "Saglabāt",
"Allowed characters {count} of {max}" : "Atļautās zīmes {count} no {max}",
"Error occurred while retrieving comment with id {id}" : "Notika kļūda saņemot komentāru ar id {id}",
diff --git a/apps/comments/l10n/nb_NO.js b/apps/comments/l10n/nb_NO.js
index 164da83ca36..608ca66a23c 100644
--- a/apps/comments/l10n/nb_NO.js
+++ b/apps/comments/l10n/nb_NO.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Kommentarer",
"New comment …" : "Ny kommentar",
"Delete comment" : "Slett kommentar",
"Post" : "Send",
"Cancel" : "Avbryt",
"Edit comment" : "Rediger kommentar",
"[Deleted user]" : "[Slettet bruker]",
- "Comments" : "Kommentarer",
"No comments yet, start the conversation!" : "Ingen kommentarer enda, start diskusjonen!",
"More comments …" : "Flere kommentarer..",
"Save" : "Lagre",
diff --git a/apps/comments/l10n/nb_NO.json b/apps/comments/l10n/nb_NO.json
index 7534d53b1b0..0e12964cde6 100644
--- a/apps/comments/l10n/nb_NO.json
+++ b/apps/comments/l10n/nb_NO.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Kommentarer",
"New comment …" : "Ny kommentar",
"Delete comment" : "Slett kommentar",
"Post" : "Send",
"Cancel" : "Avbryt",
"Edit comment" : "Rediger kommentar",
"[Deleted user]" : "[Slettet bruker]",
- "Comments" : "Kommentarer",
"No comments yet, start the conversation!" : "Ingen kommentarer enda, start diskusjonen!",
"More comments …" : "Flere kommentarer..",
"Save" : "Lagre",
diff --git a/apps/comments/l10n/nl.js b/apps/comments/l10n/nl.js
index d9d44faded2..5d014813b2b 100644
--- a/apps/comments/l10n/nl.js
+++ b/apps/comments/l10n/nl.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Reacties",
"New comment …" : "Nieuwe reactie ...",
"Delete comment" : "Verwijder reactie",
"Post" : "Reageer",
"Cancel" : "Annuleren",
"Edit comment" : "Bewerk reactie",
"[Deleted user]" : "[Verwijderde gebruiker]",
- "Comments" : "Reacties",
"No comments yet, start the conversation!" : "Nog geen reacties, start de discussie!",
"More comments …" : "Meer reacties ...",
"Save" : "Opslaan",
diff --git a/apps/comments/l10n/nl.json b/apps/comments/l10n/nl.json
index 184a35733ec..9d029701360 100644
--- a/apps/comments/l10n/nl.json
+++ b/apps/comments/l10n/nl.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Reacties",
"New comment …" : "Nieuwe reactie ...",
"Delete comment" : "Verwijder reactie",
"Post" : "Reageer",
"Cancel" : "Annuleren",
"Edit comment" : "Bewerk reactie",
"[Deleted user]" : "[Verwijderde gebruiker]",
- "Comments" : "Reacties",
"No comments yet, start the conversation!" : "Nog geen reacties, start de discussie!",
"More comments …" : "Meer reacties ...",
"Save" : "Opslaan",
diff --git a/apps/comments/l10n/pl.js b/apps/comments/l10n/pl.js
index 155de5cfa30..2590b02933f 100644
--- a/apps/comments/l10n/pl.js
+++ b/apps/comments/l10n/pl.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Komentarze",
"New comment …" : "Nowy komentarz ...",
"Delete comment" : "Skasuj komentarz",
"Post" : "Zapisz",
"Cancel" : "Anuluj",
"Edit comment" : "Edytuj komentarz",
"[Deleted user]" : "[Usunięty użytkownik]",
- "Comments" : "Komentarze",
"No comments yet, start the conversation!" : "Brak komentarzy, zacznij konwersację!",
"More comments …" : "Więcej komentarzy ...",
"Save" : "Zapisz",
diff --git a/apps/comments/l10n/pl.json b/apps/comments/l10n/pl.json
index 76d903b5e75..c4822fccf99 100644
--- a/apps/comments/l10n/pl.json
+++ b/apps/comments/l10n/pl.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Komentarze",
"New comment …" : "Nowy komentarz ...",
"Delete comment" : "Skasuj komentarz",
"Post" : "Zapisz",
"Cancel" : "Anuluj",
"Edit comment" : "Edytuj komentarz",
"[Deleted user]" : "[Usunięty użytkownik]",
- "Comments" : "Komentarze",
"No comments yet, start the conversation!" : "Brak komentarzy, zacznij konwersację!",
"More comments …" : "Więcej komentarzy ...",
"Save" : "Zapisz",
diff --git a/apps/comments/l10n/pt_BR.js b/apps/comments/l10n/pt_BR.js
index f7df79b8c33..c33a30bf9f2 100644
--- a/apps/comments/l10n/pt_BR.js
+++ b/apps/comments/l10n/pt_BR.js
@@ -1,12 +1,12 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Comentários",
"Delete comment" : "Apague o comentário",
"Post" : "Postar",
"Cancel" : "Cancelar",
"Edit comment" : "Editar comentário",
"[Deleted user]" : "[Usuário excluído]",
- "Comments" : "Comentários",
"Save" : "Salvar",
"Allowed characters {count} of {max}" : "Caracteres permitidos {count} de {max}",
"Error occurred while retrieving comment with id {id}" : "Ocorreu um erro durante a recuperação do comentário com o id {id}",
diff --git a/apps/comments/l10n/pt_BR.json b/apps/comments/l10n/pt_BR.json
index 319b66cbeb5..eda539256dc 100644
--- a/apps/comments/l10n/pt_BR.json
+++ b/apps/comments/l10n/pt_BR.json
@@ -1,10 +1,10 @@
{ "translations": {
+ "Comments" : "Comentários",
"Delete comment" : "Apague o comentário",
"Post" : "Postar",
"Cancel" : "Cancelar",
"Edit comment" : "Editar comentário",
"[Deleted user]" : "[Usuário excluído]",
- "Comments" : "Comentários",
"Save" : "Salvar",
"Allowed characters {count} of {max}" : "Caracteres permitidos {count} de {max}",
"Error occurred while retrieving comment with id {id}" : "Ocorreu um erro durante a recuperação do comentário com o id {id}",
diff --git a/apps/comments/l10n/ru.js b/apps/comments/l10n/ru.js
index 65c4505fc98..26b7a7a6e47 100644
--- a/apps/comments/l10n/ru.js
+++ b/apps/comments/l10n/ru.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Коментарии",
"New comment …" : "Новый комментарий...",
"Delete comment" : "Удалить комментарий",
"Post" : "Опубликовать",
"Cancel" : "Отмена",
"Edit comment" : "Редактировать комментарий",
"[Deleted user]" : "[Удалённый пользователь]",
- "Comments" : "Коментарии",
"No comments yet, start the conversation!" : "Комментарии отсутствуют, начните обсуждение!",
"More comments …" : "Больше комментариев...",
"Save" : "Сохранить",
diff --git a/apps/comments/l10n/ru.json b/apps/comments/l10n/ru.json
index 23ba8e796e4..72a613bfd0f 100644
--- a/apps/comments/l10n/ru.json
+++ b/apps/comments/l10n/ru.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Коментарии",
"New comment …" : "Новый комментарий...",
"Delete comment" : "Удалить комментарий",
"Post" : "Опубликовать",
"Cancel" : "Отмена",
"Edit comment" : "Редактировать комментарий",
"[Deleted user]" : "[Удалённый пользователь]",
- "Comments" : "Коментарии",
"No comments yet, start the conversation!" : "Комментарии отсутствуют, начните обсуждение!",
"More comments …" : "Больше комментариев...",
"Save" : "Сохранить",
diff --git a/apps/comments/l10n/tr.js b/apps/comments/l10n/tr.js
index 8694eb2a0ff..3ece94a7f3b 100644
--- a/apps/comments/l10n/tr.js
+++ b/apps/comments/l10n/tr.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "Yorumlar",
"New comment …" : "Yorum ekle ...",
"Delete comment" : "Yorumu sil",
"Post" : "Gönder",
"Cancel" : "İptal",
"Edit comment" : "Yorumu düzenle",
"[Deleted user]" : "[Silinmiş kullanıcı]",
- "Comments" : "Yorumlar",
"No comments yet, start the conversation!" : "Henüz bir yorum yok! Bir sohbet başlatın!",
"More comments …" : "Diğer yorumlar ...",
"Save" : "Kaydet",
diff --git a/apps/comments/l10n/tr.json b/apps/comments/l10n/tr.json
index a423d403858..03a24460d8e 100644
--- a/apps/comments/l10n/tr.json
+++ b/apps/comments/l10n/tr.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "Yorumlar",
"New comment …" : "Yorum ekle ...",
"Delete comment" : "Yorumu sil",
"Post" : "Gönder",
"Cancel" : "İptal",
"Edit comment" : "Yorumu düzenle",
"[Deleted user]" : "[Silinmiş kullanıcı]",
- "Comments" : "Yorumlar",
"No comments yet, start the conversation!" : "Henüz bir yorum yok! Bir sohbet başlatın!",
"More comments …" : "Diğer yorumlar ...",
"Save" : "Kaydet",
diff --git a/apps/comments/l10n/zh_TW.js b/apps/comments/l10n/zh_TW.js
index 8d68e206192..e55ab63f281 100644
--- a/apps/comments/l10n/zh_TW.js
+++ b/apps/comments/l10n/zh_TW.js
@@ -1,13 +1,13 @@
OC.L10N.register(
"comments",
{
+ "Comments" : "留言",
"New comment …" : "新留言…",
"Delete comment" : "刪除留言",
"Post" : "送出",
"Cancel" : "取消",
"Edit comment" : "編輯留言",
"[Deleted user]" : "[已刪除的使用者]",
- "Comments" : "留言",
"No comments yet, start the conversation!" : "尚無留言,開始討論 !",
"More comments …" : "其他留言…",
"Save" : "儲存",
diff --git a/apps/comments/l10n/zh_TW.json b/apps/comments/l10n/zh_TW.json
index 405dd106ef2..796ac3af26e 100644
--- a/apps/comments/l10n/zh_TW.json
+++ b/apps/comments/l10n/zh_TW.json
@@ -1,11 +1,11 @@
{ "translations": {
+ "Comments" : "留言",
"New comment …" : "新留言…",
"Delete comment" : "刪除留言",
"Post" : "送出",
"Cancel" : "取消",
"Edit comment" : "編輯留言",
"[Deleted user]" : "[已刪除的使用者]",
- "Comments" : "留言",
"No comments yet, start the conversation!" : "尚無留言,開始討論 !",
"More comments …" : "其他留言…",
"Save" : "儲存",
diff --git a/apps/comments/lib/AppInfo/Application.php b/apps/comments/lib/AppInfo/Application.php
new file mode 100644
index 00000000000..f168779cd0d
--- /dev/null
+++ b/apps/comments/lib/AppInfo/Application.php
@@ -0,0 +1,35 @@
+<?php
+
+/**
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * 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/>.
+ */
+
+namespace OCA\Comments\AppInfo;
+
+use OCA\Comments\Controller\Notifications;
+use OCP\AppFramework\App;
+
+class Application extends App {
+
+ public function __construct (array $urlParams = array()) {
+ parent::__construct('comments', $urlParams);
+ $container = $this->getContainer();
+
+ $container->registerAlias('NotificationsController', Notifications::class);
+ }
+}
diff --git a/apps/comments/lib/Controller/Notifications.php b/apps/comments/lib/Controller/Notifications.php
new file mode 100644
index 00000000000..c2a8175d17a
--- /dev/null
+++ b/apps/comments/lib/Controller/Notifications.php
@@ -0,0 +1,134 @@
+<?php
+
+/**
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * 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/>.
+ *
+ */
+
+namespace OCA\Comments\Controller;
+
+use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\NotFoundResponse;
+use OCP\AppFramework\Http\RedirectResponse;
+use OCP\AppFramework\Http\Response;
+use OCP\Comments\IComment;
+use OCP\Comments\ICommentsManager;
+use OCP\Files\Folder;
+use OCP\IRequest;
+use OCP\IURLGenerator;
+use OCP\IUserSession;
+use OCP\Notification\IManager;
+
+/**
+ * Class Notifications
+ *
+ * @package OCA\Comments\Controller
+ */
+class Notifications extends Controller {
+ /** @var Folder */
+ protected $folder;
+
+ /** @var ICommentsManager */
+ protected $commentsManager;
+
+ /** @var IURLGenerator */
+ protected $urlGenerator;
+
+ /** @var IManager */
+ protected $notificationManager;
+
+ /** @var IUserSession */
+ protected $userSession;
+
+ /**
+ * Notifications constructor.
+ *
+ * @param string $appName
+ * @param IRequest $request
+ * @param ICommentsManager $commentsManager
+ * @param Folder $folder
+ * @param IURLGenerator $urlGenerator
+ * @param IManager $notificationManager
+ * @param IUserSession $userSession
+ */
+ public function __construct(
+ $appName,
+ IRequest $request,
+ ICommentsManager $commentsManager,
+ Folder $folder,
+ IURLGenerator $urlGenerator,
+ IManager $notificationManager,
+ IUserSession $userSession
+ ) {
+ parent::__construct($appName, $request);
+ $this->commentsManager = $commentsManager;
+ $this->folder = $folder;
+ $this->urlGenerator = $urlGenerator;
+ $this->notificationManager = $notificationManager;
+ $this->userSession = $userSession;
+ }
+
+ /**
+ * @NoAdminRequired
+ * @NoCSRFRequired
+ *
+ * @param string $id the comment ID
+ * @return Response
+ */
+ public function view($id) {
+ try {
+ $comment = $this->commentsManager->get($id);
+ if($comment->getObjectType() !== 'files') {
+ return new NotFoundResponse();
+ }
+ $files = $this->folder->getById($comment->getObjectId());
+ if(count($files) === 0) {
+ $this->markProcessed($comment);
+ return new NotFoundResponse();
+ }
+
+ $url = $this->urlGenerator->linkToRouteAbsolute(
+ 'files.viewcontroller.showFile',
+ [ 'fileid' => $comment->getObjectId() ]
+ );
+
+ $this->markProcessed($comment);
+
+ return new RedirectResponse($url);
+ } catch (\Exception $e) {
+ return new NotFoundResponse();
+ }
+ }
+
+ /**
+ * Marks the notification about a comment as processed
+ * @param IComment $comment
+ */
+ protected function markProcessed(IComment $comment) {
+ $user = $this->userSession->getUser();
+ if(is_null($user)) {
+ return;
+ }
+ $notification = $this->notificationManager->createNotification();
+ $notification->setApp('comments')
+ ->setObject('comment', $comment->getId())
+ ->setSubject('mention')
+ ->setUser($user->getUID());
+ $this->notificationManager->markProcessed($notification);
+ }
+}
diff --git a/apps/comments/lib/EventHandler.php b/apps/comments/lib/EventHandler.php
new file mode 100644
index 00000000000..8c20c698371
--- /dev/null
+++ b/apps/comments/lib/EventHandler.php
@@ -0,0 +1,91 @@
+<?php
+
+/**
+ * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Comments;
+
+use OCA\Comments\Activity\Listener as ActivityListener;
+use OCA\Comments\AppInfo\Application;
+use OCA\Comments\Notification\Listener as NotificationListener;
+use OCP\Comments\CommentsEvent;
+use OCP\Comments\ICommentsEventHandler;
+
+/**
+ * Class EventHandler
+ *
+ * @package OCA\Comments
+ */
+class EventHandler implements ICommentsEventHandler {
+ /** @var ActivityListener */
+ private $activityListener;
+
+ /** @var NotificationListener */
+ private $notificationListener;
+
+ public function __construct(ActivityListener $activityListener, NotificationListener $notificationListener) {
+ $this->activityListener = $activityListener;
+ $this->notificationListener = $notificationListener;
+ }
+
+ /**
+ * @param CommentsEvent $event
+ */
+ public function handle(CommentsEvent $event) {
+ if($event->getComment()->getObjectType() !== 'files') {
+ // this is a 'files'-specific Handler
+ return;
+ }
+
+ $eventType = $event->getEvent();
+ if( $eventType === CommentsEvent::EVENT_ADD
+ ) {
+ $this->notificationHandler($event);
+ $this->activityHandler($event);
+ return;
+ }
+
+ $applicableEvents = [
+ CommentsEvent::EVENT_PRE_UPDATE,
+ CommentsEvent::EVENT_UPDATE,
+ CommentsEvent::EVENT_DELETE,
+ ];
+ if(in_array($eventType, $applicableEvents)) {
+ $this->notificationHandler($event);
+ return;
+ }
+ }
+
+ /**
+ * @param CommentsEvent $event
+ */
+ private function activityHandler(CommentsEvent $event) {
+ $this->activityListener->commentEvent($event);
+ }
+
+ /**
+ * @param CommentsEvent $event
+ */
+ private function notificationHandler(CommentsEvent $event) {
+ $this->notificationListener->evaluate($event);
+ }
+}
diff --git a/apps/comments/lib/Notification/Listener.php b/apps/comments/lib/Notification/Listener.php
new file mode 100644
index 00000000000..426e85cac83
--- /dev/null
+++ b/apps/comments/lib/Notification/Listener.php
@@ -0,0 +1,126 @@
+<?php
+/**
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Comments\Notification;
+
+use OCP\Comments\CommentsEvent;
+use OCP\Comments\IComment;
+use OCP\IURLGenerator;
+use OCP\IUserManager;
+use OCP\Notification\IManager;
+
+class Listener {
+ /** @var IManager */
+ protected $notificationManager;
+
+ /** @var IUserManager */
+ protected $userManager;
+
+ /** @var IURLGenerator */
+ protected $urlGenerator;
+
+ /**
+ * Listener constructor.
+ *
+ * @param IManager $notificationManager
+ * @param IUserManager $userManager
+ * @param IURLGenerator $urlGenerator
+ */
+ public function __construct(
+ IManager $notificationManager,
+ IUserManager $userManager,
+ IURLGenerator $urlGenerator
+ ) {
+
+ $this->notificationManager = $notificationManager;
+ $this->userManager = $userManager;
+ $this->urlGenerator = $urlGenerator;
+ }
+
+ /**
+ * @param CommentsEvent $event
+ */
+ public function evaluate(CommentsEvent $event) {
+ $comment = $event->getComment();
+
+ $mentions = $this->extractMentions($comment->getMessage());
+ if(empty($mentions)) {
+ // no one to notify
+ return;
+ }
+
+ $notification = $this->instantiateNotification($comment);
+
+ foreach($mentions as $mention) {
+ $user = substr($mention, 1); // @username → username
+ if( ($comment->getActorType() === 'users' && $user === $comment->getActorId())
+ || !$this->userManager->userExists($user)
+ ) {
+ // do not notify unknown users or yourself
+ continue;
+ }
+
+ $notification->setUser($user);
+ if( $event->getEvent() === CommentsEvent::EVENT_DELETE
+ || $event->getEvent() === CommentsEvent::EVENT_PRE_UPDATE)
+ {
+ $this->notificationManager->markProcessed($notification);
+ } else {
+ $this->notificationManager->notify($notification);
+ }
+ }
+ }
+
+ /**
+ * creates a notification instance and fills it with comment data
+ *
+ * @param IComment $comment
+ * @return \OCP\Notification\INotification
+ */
+ public function instantiateNotification(IComment $comment) {
+ $notification = $this->notificationManager->createNotification();
+ $notification
+ ->setApp('comments')
+ ->setObject('comment', $comment->getId())
+ ->setSubject('mention', [ $comment->getObjectType(), $comment->getObjectId() ])
+ ->setDateTime($comment->getCreationDateTime())
+ ->setLink($this->urlGenerator->linkToRouteAbsolute(
+ 'comments.Notifications.view',
+ ['id' => $comment->getId()])
+ );
+
+ return $notification;
+ }
+
+ /**
+ * extracts @-mentions out of a message body.
+ *
+ * @param string $message
+ * @return string[] containing the mentions, e.g. ['@alice', '@bob']
+ */
+ public function extractMentions($message) {
+ $ok = preg_match_all('/\B@[a-z0-9_\-@\.\']+/i', $message, $mentions);
+ if(!$ok || !isset($mentions[0]) || !is_array($mentions[0])) {
+ return [];
+ }
+ return array_unique($mentions[0]);
+ }
+}
diff --git a/apps/comments/lib/Notification/Notifier.php b/apps/comments/lib/Notification/Notifier.php
new file mode 100644
index 00000000000..3838a18f9f1
--- /dev/null
+++ b/apps/comments/lib/Notification/Notifier.php
@@ -0,0 +1,115 @@
+<?php
+/**
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Comments\Notification;
+
+use OCP\Comments\ICommentsManager;
+use OCP\Comments\NotFoundException;
+use OCP\Files\Folder;
+use OCP\IUserManager;
+use OCP\L10N\IFactory;
+use OCP\Notification\INotification;
+use OCP\Notification\INotifier;
+
+class Notifier implements INotifier {
+
+ /** @var IFactory */
+ protected $l10nFactory;
+
+ /** @var Folder */
+ protected $userFolder;
+
+ /** @var ICommentsManager */
+ protected $commentsManager;
+
+ /** @var IUserManager */
+ protected $userManager;
+
+ public function __construct(
+ IFactory $l10nFactory,
+ Folder $userFolder,
+ ICommentsManager $commentsManager,
+ IUserManager $userManager
+ ) {
+ $this->l10nFactory = $l10nFactory;
+ $this->userFolder = $userFolder;
+ $this->commentsManager = $commentsManager;
+ $this->userManager = $userManager;
+ }
+
+ /**
+ * @param INotification $notification
+ * @param string $languageCode The code of the language that should be used to prepare the notification
+ * @return INotification
+ * @throws \InvalidArgumentException When the notification was not prepared by a notifier
+ */
+ public function prepare(INotification $notification, $languageCode) {
+ if($notification->getApp() !== 'comments') {
+ throw new \InvalidArgumentException();
+ }
+ try {
+ $comment = $this->commentsManager->get($notification->getObjectId());
+ } catch(NotFoundException $e) {
+ // needs to be converted to InvalidArgumentException, otherwise none Notifications will be shown at all
+ throw new \InvalidArgumentException('Comment not found', 0, $e);
+ }
+ $l = $this->l10nFactory->get('comments', $languageCode);
+ $displayName = $comment->getActorId();
+ $isDeletedActor = $comment->getActorType() === ICommentsManager::DELETED_USER;
+ if($comment->getActorType() === 'users') {
+ $commenter = $this->userManager->get($comment->getActorId());
+ if(!is_null($commenter)) {
+ $displayName = $commenter->getDisplayName();
+ }
+ }
+ switch($notification->getSubject()) {
+ case 'mention':
+ $parameters = $notification->getSubjectParameters();
+ if($parameters[0] !== 'files') {
+ throw new \InvalidArgumentException('Unsupported comment object');
+ }
+ $nodes = $this->userFolder->getById($parameters[1]);
+ if(empty($nodes)) {
+ throw new \InvalidArgumentException('Cannot resolve file id to Node instance');
+ }
+ $fileName = $nodes[0]->getName();
+ if($isDeletedActor) {
+ $subject = (string) $l->t(
+ 'A (now) deleted user mentioned you in a comment on "%s".',
+ [ $fileName ]
+ );
+ } else {
+ $subject = (string) $l->t(
+ '%s mentioned you in a comment on "%s".',
+ [ $displayName, $fileName ]
+ );
+ }
+ $notification->setParsedSubject($subject);
+
+ return $notification;
+ break;
+
+ default:
+ throw new \InvalidArgumentException('Invalid subject');
+ }
+
+ }
+}
diff --git a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php
new file mode 100644
index 00000000000..c11d7857496
--- /dev/null
+++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Comments\Tests\Unit\AppInfo;
+
+use OCA\Comments\AppInfo\Application;
+use Test\TestCase;
+
+/**
+ * Class ApplicationTest
+ *
+ * @group DB
+ *
+ * @package OCA\Comments\Tests\Unit\AppInfo
+ */
+class ApplicationTest extends TestCase {
+ protected function setUp() {
+ parent::setUp();
+ \OC::$server->getUserManager()->createUser('dummy', '456');
+ \OC::$server->getUserSession()->setUser(\OC::$server->getUserManager()->get('dummy'));
+ }
+
+ protected function tearDown() {
+ \OC::$server->getUserManager()->get('dummy')->delete();
+ parent::tearDown();
+ }
+
+ public function test() {
+ $app = new Application();
+ $c = $app->getContainer();
+
+ // assert service instances in the container are properly setup
+ $s = $c->query('NotificationsController');
+ $this->assertInstanceOf('OCA\Comments\Controller\Notifications', $s);
+
+ $services = [
+ 'OCA\Comments\Activity\Extension',
+ 'OCA\Comments\Activity\Listener',
+ 'OCA\Comments\Notification\Listener'
+ ];
+
+ foreach($services as $service) {
+ $s = $c->query($service);
+ $this->assertInstanceOf($service, $s);
+ }
+ }
+}
diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php
new file mode 100644
index 00000000000..e887900a615
--- /dev/null
+++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php
@@ -0,0 +1,155 @@
+<?php
+/**
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Comments\Tests\Unit\Controller;
+
+use OCA\Comments\Controller\Notifications;
+use OCP\Comments\NotFoundException;
+use Test\TestCase;
+
+class NotificationsTest extends TestCase {
+ /** @var \OCA\Comments\Controller\Notifications */
+ protected $notificationsController;
+
+ /** @var \OCP\Comments\ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ protected $commentsManager;
+
+ /** @var \OCP\Files\Folder|\PHPUnit_Framework_MockObject_MockObject */
+ protected $folder;
+
+ /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ protected $session;
+
+ /** @var \OCP\Notification\IManager|\PHPUnit_Framework_MockObject_MockObject */
+ protected $notificationManager;
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->commentsManager = $this->getMockBuilder('\OCP\Comments\ICommentsManager')->getMock();
+ $this->folder = $this->getMockBuilder('\OCP\Files\Folder')->getMock();
+ $this->session = $this->getMockBuilder('\OCP\IUserSession')->getMock();
+ $this->notificationManager = $this->getMockBuilder('\OCP\Notification\IManager')->getMock();
+
+ $this->notificationsController = new Notifications(
+ 'comments',
+ $this->getMockBuilder('\OCP\IRequest')->getMock(),
+ $this->commentsManager,
+ $this->folder,
+ $this->getMockBuilder('\OCP\IURLGenerator')->getMock(),
+ $this->notificationManager,
+ $this->session
+ );
+ }
+
+ public function testViewSuccess() {
+ $comment = $this->getMockBuilder('\OCP\Comments\IComment')->getMock();
+ $comment->expects($this->any())
+ ->method('getObjectType')
+ ->will($this->returnValue('files'));
+
+ $this->commentsManager->expects($this->any())
+ ->method('get')
+ ->with('42')
+ ->will($this->returnValue($comment));
+
+ $file = $this->getMockBuilder('\OCP\Files\Node')->getMock();
+
+ $this->folder->expects($this->once())
+ ->method('getById')
+ ->will($this->returnValue([$file]));
+
+ $this->session->expects($this->once())
+ ->method('getUser')
+ ->will($this->returnValue($this->getMockBuilder('\OCP\IUser')->getMock()));
+
+ $notification = $this->getMockBuilder('\OCP\Notification\INotification')->getMock();
+ $notification->expects($this->any())
+ ->method($this->anything())
+ ->will($this->returnValue($notification));
+
+ $this->notificationManager->expects($this->once())
+ ->method('createNotification')
+ ->will($this->returnValue($notification));
+ $this->notificationManager->expects($this->once())
+ ->method('markProcessed')
+ ->with($notification);
+
+ $response = $this->notificationsController->view('42');
+ $this->assertInstanceOf('\OCP\AppFramework\Http\RedirectResponse', $response);
+ }
+
+ public function testViewInvalidComment() {
+ $this->commentsManager->expects($this->any())
+ ->method('get')
+ ->with('42')
+ ->will($this->throwException(new NotFoundException()));
+
+ $this->folder->expects($this->never())
+ ->method('getById');
+
+ $this->session->expects($this->never())
+ ->method('getUser');
+
+ $this->notificationManager->expects($this->never())
+ ->method('createNotification');
+ $this->notificationManager->expects($this->never())
+ ->method('markProcessed');
+
+ $response = $this->notificationsController->view('42');
+ $this->assertInstanceOf('\OCP\AppFramework\Http\NotFoundResponse', $response);
+ }
+
+ public function testViewNoFile() {
+ $comment = $this->getMockBuilder('\OCP\Comments\IComment')->getMock();
+ $comment->expects($this->any())
+ ->method('getObjectType')
+ ->will($this->returnValue('files'));
+
+ $this->commentsManager->expects($this->any())
+ ->method('get')
+ ->with('42')
+ ->will($this->returnValue($comment));
+
+ $this->folder->expects($this->once())
+ ->method('getById')
+ ->will($this->returnValue([]));
+
+ $this->session->expects($this->once())
+ ->method('getUser')
+ ->will($this->returnValue($this->getMockBuilder('\OCP\IUser')->getMock()));
+
+ $notification = $this->getMockBuilder('\OCP\Notification\INotification')->getMock();
+ $notification->expects($this->any())
+ ->method($this->anything())
+ ->will($this->returnValue($notification));
+
+ $this->notificationManager->expects($this->once())
+ ->method('createNotification')
+ ->will($this->returnValue($notification));
+ $this->notificationManager->expects($this->once())
+ ->method('markProcessed')
+ ->with($notification);
+
+ $response = $this->notificationsController->view('42');
+ $this->assertInstanceOf('\OCP\AppFramework\Http\NotFoundResponse', $response);
+ }
+}
diff --git a/apps/comments/tests/Unit/EventHandlerTest.php b/apps/comments/tests/Unit/EventHandlerTest.php
new file mode 100644
index 00000000000..bb714993f7a
--- /dev/null
+++ b/apps/comments/tests/Unit/EventHandlerTest.php
@@ -0,0 +1,119 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Comments\Tests\Unit\Notification;
+
+use OCA\Comments\EventHandler;
+use OCP\Comments\CommentsEvent;
+use OCP\Comments\IComment;
+use OCA\Comments\Activity\Listener as ActivityListener;
+use OCA\Comments\Notification\Listener as NotificationListener;
+use Test\TestCase;
+
+class EventHandlerTest extends TestCase {
+ /** @var EventHandler */
+ protected $eventHandler;
+
+ /** @var ActivityListener|\PHPUnit_Framework_MockObject_MockObject */
+ protected $activityListener;
+
+ /** @var NotificationListener|\PHPUnit_Framework_MockObject_MockObject */
+ protected $notificationListener;
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->activityListener = $this->getMockBuilder(ActivityListener::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->notificationListener = $this->getMockBuilder(NotificationListener::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->eventHandler = new EventHandler($this->activityListener, $this->notificationListener);
+ }
+
+ public function testNotFiles() {
+ /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ $comment = $this->getMockBuilder(IComment::class)->getMock();
+ $comment->expects($this->once())
+ ->method('getObjectType')
+ ->willReturn('smiles');
+
+ /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ $event = $this->getMockBuilder(CommentsEvent::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $event->expects($this->once())
+ ->method('getComment')
+ ->willReturn($comment);
+ $event->expects($this->never())
+ ->method('getEvent');
+
+ $this->eventHandler->handle($event);
+ }
+
+ public function handledProvider() {
+ return [
+ [CommentsEvent::EVENT_DELETE],
+ [CommentsEvent::EVENT_UPDATE],
+ [CommentsEvent::EVENT_PRE_UPDATE],
+ [CommentsEvent::EVENT_ADD]
+ ];
+ }
+
+ /**
+ * @dataProvider handledProvider
+ * @param string $eventType
+ */
+ public function testHandled($eventType) {
+ /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ $comment = $this->getMockBuilder(IComment::class)->getMock();
+ $comment->expects($this->once())
+ ->method('getObjectType')
+ ->willReturn('files');
+
+ /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ $event = $this->getMockBuilder(CommentsEvent::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $event->expects($this->atLeastOnce())
+ ->method('getComment')
+ ->willReturn($comment);
+ $event->expects($this->atLeastOnce())
+ ->method('getEvent')
+ ->willReturn($eventType);
+
+ $this->notificationListener->expects($this->once())
+ ->method('evaluate')
+ ->with($event);
+
+ $this->activityListener->expects($this->any())
+ ->method('commentEvent')
+ ->with($event);
+
+ $this->eventHandler->handle($event);
+ }
+
+}
diff --git a/apps/comments/tests/Unit/Notification/ListenerTest.php b/apps/comments/tests/Unit/Notification/ListenerTest.php
new file mode 100644
index 00000000000..12f388fcff9
--- /dev/null
+++ b/apps/comments/tests/Unit/Notification/ListenerTest.php
@@ -0,0 +1,339 @@
+<?php
+/**
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Comments\Tests\Unit\Notification;
+
+use OCA\Comments\Notification\Listener;
+use OCP\Comments\CommentsEvent;
+use OCP\Comments\IComment;
+use OCP\IURLGenerator;
+use OCP\IUserManager;
+use OCP\Notification\IManager;
+use OCP\Notification\INotification;
+use Test\TestCase;
+
+class ListenerTest extends TestCase {
+ /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ protected $notificationManager;
+
+ /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ protected $userManager;
+
+ /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ protected $urlGenerator;
+
+ /** @var Listener */
+ protected $listener;
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->notificationManager = $this->getMockBuilder('\OCP\Notification\IManager')->getMock();
+ $this->userManager = $this->getMockBuilder('\OCP\IUserManager')->getMock();
+ $this->urlGenerator = $this->getMockBuilder('OCP\IURLGenerator')->getMock();
+
+ $this->listener = new Listener(
+ $this->notificationManager,
+ $this->userManager,
+ $this->urlGenerator
+ );
+ }
+
+ public function eventProvider() {
+ return [
+ [CommentsEvent::EVENT_ADD, 'notify'],
+ [CommentsEvent::EVENT_UPDATE, 'notify'],
+ [CommentsEvent::EVENT_PRE_UPDATE, 'markProcessed'],
+ [CommentsEvent::EVENT_DELETE, 'markProcessed']
+ ];
+ }
+
+ /**
+ * @dataProvider eventProvider
+ * @param string $eventType
+ * @param string $notificationMethod
+ */
+ public function testEvaluate($eventType, $notificationMethod) {
+ $message = '@foobar and @barfoo you should know, @foo@bar.com is valid' .
+ ' and so is @bar@foo.org@foobar.io I hope that clarifies everything.' .
+ ' cc @23452-4333-54353-2342 @yolo!';
+
+ /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ $comment = $this->getMockBuilder('\OCP\Comments\IComment')->getMock();
+ $comment->expects($this->any())
+ ->method('getObjectType')
+ ->will($this->returnValue('files'));
+ $comment->expects($this->any())
+ ->method('getCreationDateTime')
+ ->will($this->returnValue(new \DateTime()));
+ $comment->expects($this->once())
+ ->method('getMessage')
+ ->will($this->returnValue($message));
+
+ /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ $event = $this->getMockBuilder('\OCP\Comments\CommentsEvent')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $event->expects($this->once())
+ ->method('getComment')
+ ->will($this->returnValue($comment));
+ $event->expects(($this->any()))
+ ->method(('getEvent'))
+ ->will($this->returnValue($eventType));
+
+ /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('\OCP\Notification\INotification')->getMock();
+ $notification->expects($this->any())
+ ->method($this->anything())
+ ->will($this->returnValue($notification));
+ $notification->expects($this->exactly(6))
+ ->method('setUser');
+
+ $this->notificationManager->expects($this->once())
+ ->method('createNotification')
+ ->will($this->returnValue($notification));
+ $this->notificationManager->expects($this->exactly(6))
+ ->method($notificationMethod)
+ ->with($this->isInstanceOf('\OCP\Notification\INotification'));
+
+ $this->userManager->expects($this->exactly(6))
+ ->method('userExists')
+ ->withConsecutive(
+ ['foobar'],
+ ['barfoo'],
+ ['foo@bar.com'],
+ ['bar@foo.org@foobar.io'],
+ ['23452-4333-54353-2342'],
+ ['yolo']
+ )
+ ->will($this->returnValue(true));
+
+ $this->listener->evaluate($event);
+ }
+
+ /**
+ * @dataProvider eventProvider
+ * @param string $eventType
+ */
+ public function testEvaluateNoMentions($eventType) {
+ $message = 'a boring comment without mentions';
+
+ /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ $comment = $this->getMockBuilder('\OCP\Comments\IComment')->getMock();
+ $comment->expects($this->any())
+ ->method('getObjectType')
+ ->will($this->returnValue('files'));
+ $comment->expects($this->any())
+ ->method('getCreationDateTime')
+ ->will($this->returnValue(new \DateTime()));
+ $comment->expects($this->once())
+ ->method('getMessage')
+ ->will($this->returnValue($message));
+
+ /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ $event = $this->getMockBuilder('\OCP\Comments\CommentsEvent')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $event->expects($this->once())
+ ->method('getComment')
+ ->will($this->returnValue($comment));
+ $event->expects(($this->any()))
+ ->method(('getEvent'))
+ ->will($this->returnValue($eventType));
+
+ $this->notificationManager->expects($this->never())
+ ->method('createNotification');
+ $this->notificationManager->expects($this->never())
+ ->method('notify');
+ $this->notificationManager->expects($this->never())
+ ->method('markProcessed');
+
+ $this->userManager->expects($this->never())
+ ->method('userExists');
+
+ $this->listener->evaluate($event);
+ }
+
+ public function testEvaluateUserDoesNotExist() {
+ $message = '@foobar bla bla bla';
+
+ /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ $comment = $this->getMockBuilder('\OCP\Comments\IComment')->getMock();
+ $comment->expects($this->any())
+ ->method('getObjectType')
+ ->will($this->returnValue('files'));
+ $comment->expects($this->any())
+ ->method('getCreationDateTime')
+ ->will($this->returnValue(new \DateTime()));
+ $comment->expects($this->once())
+ ->method('getMessage')
+ ->will($this->returnValue($message));
+
+ /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ $event = $this->getMockBuilder('\OCP\Comments\CommentsEvent')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $event->expects($this->once())
+ ->method('getComment')
+ ->will($this->returnValue($comment));
+ $event->expects(($this->any()))
+ ->method(('getEvent'))
+ ->will($this->returnValue(CommentsEvent::EVENT_ADD));
+
+ /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('\OCP\Notification\INotification')->getMock();
+ $notification->expects($this->any())
+ ->method($this->anything())
+ ->will($this->returnValue($notification));
+ $notification->expects($this->never())
+ ->method('setUser');
+
+ $this->notificationManager->expects($this->once())
+ ->method('createNotification')
+ ->will($this->returnValue($notification));
+ $this->notificationManager->expects($this->never())
+ ->method('notify');
+
+ $this->userManager->expects($this->once())
+ ->method('userExists')
+ ->withConsecutive(
+ ['foobar']
+ )
+ ->will($this->returnValue(false));
+
+ $this->listener->evaluate($event);
+ }
+
+ /**
+ * @dataProvider eventProvider
+ * @param string $eventType
+ * @param string $notificationMethod
+ */
+ public function testEvaluateOneMentionPerUser($eventType, $notificationMethod) {
+ $message = '@foobar bla bla bla @foobar';
+
+ /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ $comment = $this->getMockBuilder('\OCP\Comments\IComment')->getMock();
+ $comment->expects($this->any())
+ ->method('getObjectType')
+ ->will($this->returnValue('files'));
+ $comment->expects($this->any())
+ ->method('getCreationDateTime')
+ ->will($this->returnValue(new \DateTime()));
+ $comment->expects($this->once())
+ ->method('getMessage')
+ ->will($this->returnValue($message));
+
+ /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ $event = $this->getMockBuilder('\OCP\Comments\CommentsEvent')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $event->expects($this->once())
+ ->method('getComment')
+ ->will($this->returnValue($comment));
+ $event->expects(($this->any()))
+ ->method(('getEvent'))
+ ->will($this->returnValue($eventType));
+
+ /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('\OCP\Notification\INotification')->getMock();
+ $notification->expects($this->any())
+ ->method($this->anything())
+ ->will($this->returnValue($notification));
+ $notification->expects($this->once())
+ ->method('setUser');
+
+ $this->notificationManager->expects($this->once())
+ ->method('createNotification')
+ ->will($this->returnValue($notification));
+ $this->notificationManager->expects($this->once())
+ ->method($notificationMethod)
+ ->with($this->isInstanceOf('\OCP\Notification\INotification'));
+
+ $this->userManager->expects($this->once())
+ ->method('userExists')
+ ->withConsecutive(
+ ['foobar']
+ )
+ ->will($this->returnValue(true));
+
+ $this->listener->evaluate($event);
+ }
+
+ /**
+ * @dataProvider eventProvider
+ * @param string $eventType
+ */
+ public function testEvaluateNoSelfMention($eventType) {
+ $message = '@foobar bla bla bla';
+
+ /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ $comment = $this->getMockBuilder('\OCP\Comments\IComment')->getMock();
+ $comment->expects($this->any())
+ ->method('getObjectType')
+ ->will($this->returnValue('files'));
+ $comment->expects($this->any())
+ ->method('getActorType')
+ ->will($this->returnValue('users'));
+ $comment->expects($this->any())
+ ->method('getActorId')
+ ->will($this->returnValue('foobar'));
+ $comment->expects($this->any())
+ ->method('getCreationDateTime')
+ ->will($this->returnValue(new \DateTime()));
+ $comment->expects($this->once())
+ ->method('getMessage')
+ ->will($this->returnValue($message));
+
+ /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ $event = $this->getMockBuilder('\OCP\Comments\CommentsEvent')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $event->expects($this->once())
+ ->method('getComment')
+ ->will($this->returnValue($comment));
+ $event->expects(($this->any()))
+ ->method(('getEvent'))
+ ->will($this->returnValue($eventType));
+
+ /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('\OCP\Notification\INotification')->getMock();
+ $notification->expects($this->any())
+ ->method($this->anything())
+ ->will($this->returnValue($notification));
+ $notification->expects($this->never())
+ ->method('setUser');
+
+ $this->notificationManager->expects($this->once())
+ ->method('createNotification')
+ ->will($this->returnValue($notification));
+ $this->notificationManager->expects($this->never())
+ ->method('notify');
+ $this->notificationManager->expects($this->never())
+ ->method('markProcessed');
+
+ $this->userManager->expects($this->never())
+ ->method('userExists');
+
+ $this->listener->evaluate($event);
+ }
+
+}
diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php
new file mode 100644
index 00000000000..b297611308d
--- /dev/null
+++ b/apps/comments/tests/Unit/Notification/NotifierTest.php
@@ -0,0 +1,498 @@
+<?php
+/**
+ * @copyright Copyright (c) 2016 Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Comments\Tests\Unit\Notification;
+
+use OCA\Comments\Notification\Notifier;
+use OCP\Comments\IComment;
+use OCP\Comments\ICommentsManager;
+use OCP\Comments\NotFoundException;
+use OCP\Files\Folder;
+use OCP\Files\Node;
+use OCP\IL10N;
+use OCP\IUser;
+use OCP\IUserManager;
+use OCP\L10N\IFactory;
+use OCP\Notification\INotification;
+use Test\TestCase;
+
+class NotifierTest extends TestCase {
+
+ /** @var Notifier */
+ protected $notifier;
+
+ /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ protected $l10nFactory;
+
+ /** @var Folder|\PHPUnit_Framework_MockObject_MockObject */
+ protected $folder;
+
+ /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ protected $commentsManager;
+
+ /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ protected $userManager;
+
+
+ /** @var string */
+ protected $lc = 'tlh_KX';
+
+ /** @var INotification|\PHPUnit_Framework_MockObject_MockObject */
+ protected $notification;
+
+ /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ protected $l;
+
+ /** @var IComment|\PHPUnit_Framework_MockObject_MockObject */
+ protected $comment;
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->l10nFactory = $this->getMockBuilder('OCP\L10N\IFactory')->getMock();
+ $this->folder = $this->getMockBuilder('OCP\Files\Folder')->getMock();
+ $this->commentsManager = $this->getMockBuilder('OCP\Comments\ICommentsManager')->getMock();
+ $this->userManager = $this->getMockBuilder('OCP\IUserManager')->getMock();
+
+ $this->notifier = new Notifier(
+ $this->l10nFactory,
+ $this->folder,
+ $this->commentsManager,
+ $this->userManager
+ );
+
+ $this->l = $this->getMockBuilder('OCP\IL10N')->getMock();
+ $this->notification = $this->getMockBuilder('OCP\Notification\INotification')->getMock();
+ $this->comment = $this->getMockBuilder('OCP\Comments\IComment')->getMock();
+ }
+
+ public function testPrepareSuccess() {
+ $fileName = 'Gre\'thor.odp';
+ $displayName = 'Huraga';
+ $message = 'Hurage mentioned you in a comment on "Gre\'thor.odp".';
+
+ /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ $user = $this->getMockBuilder('OCP\IUser')->getMock();
+ $user->expects($this->once())
+ ->method('getDisplayName')
+ ->willReturn($displayName);
+
+ /** @var Node|\PHPUnit_Framework_MockObject_MockObject */
+ $node = $this->getMockBuilder('OCP\Files\Node')->getMock();
+ $node
+ ->expects($this->once())
+ ->method('getName')
+ ->willReturn($fileName);
+
+ $this->folder
+ ->expects($this->once())
+ ->method('getById')
+ ->with('678')
+ ->willReturn([$node]);
+
+ $this->notification
+ ->expects($this->once())
+ ->method('getApp')
+ ->willReturn('comments');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubject')
+ ->willReturn('mention');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubjectParameters')
+ ->willReturn(['files', '678']);
+ $this->notification
+ ->expects($this->once())
+ ->method('setParsedSubject')
+ ->with($message);
+
+ $this->l
+ ->expects($this->once())
+ ->method('t')
+ ->with('%s mentioned you in a comment on "%s".', [$displayName, $fileName])
+ ->willReturn($message);
+
+ $this->l10nFactory
+ ->expects($this->once())
+ ->method('get')
+ ->willReturn($this->l);
+
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorId')
+ ->willReturn('huraga');
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorType')
+ ->willReturn('users');
+
+ $this->commentsManager
+ ->expects(($this->once()))
+ ->method('get')
+ ->willReturn($this->comment);
+
+ $this->userManager
+ ->expects($this->once())
+ ->method('get')
+ ->with('huraga')
+ ->willReturn($user);
+
+ $this->notifier->prepare($this->notification, $this->lc);
+ }
+
+ public function testPrepareSuccessDeletedUser() {
+ $fileName = 'Gre\'thor.odp';
+ $message = 'A (now) deleted user mentioned you in a comment on "Gre\'thor.odp".';
+
+ /** @var Node|\PHPUnit_Framework_MockObject_MockObject */
+ $node = $this->getMockBuilder('OCP\Files\Node')->getMock();
+ $node
+ ->expects($this->once())
+ ->method('getName')
+ ->willReturn($fileName);
+
+ $this->folder
+ ->expects($this->once())
+ ->method('getById')
+ ->with('678')
+ ->willReturn([$node]);
+
+ $this->notification
+ ->expects($this->once())
+ ->method('getApp')
+ ->willReturn('comments');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubject')
+ ->willReturn('mention');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubjectParameters')
+ ->willReturn(['files', '678']);
+ $this->notification
+ ->expects($this->once())
+ ->method('setParsedSubject')
+ ->with($message);
+
+ $this->l
+ ->expects($this->once())
+ ->method('t')
+ ->with('A (now) deleted user mentioned you in a comment on "%s".', [ $fileName ])
+ ->willReturn($message);
+
+ $this->l10nFactory
+ ->expects($this->once())
+ ->method('get')
+ ->willReturn($this->l);
+
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorId')
+ ->willReturn('huraga');
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorType')
+ ->willReturn(ICommentsManager::DELETED_USER);
+
+ $this->commentsManager
+ ->expects(($this->once()))
+ ->method('get')
+ ->willReturn($this->comment);
+
+ $this->userManager
+ ->expects($this->never())
+ ->method('get');
+
+ $this->notifier->prepare($this->notification, $this->lc);
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ */
+ public function testPrepareDifferentApp() {
+ $this->folder
+ ->expects($this->never())
+ ->method('getById');
+
+ $this->notification
+ ->expects($this->once())
+ ->method('getApp')
+ ->willReturn('constructions');
+ $this->notification
+ ->expects($this->never())
+ ->method('getSubject');
+ $this->notification
+ ->expects($this->never())
+ ->method('getSubjectParameters');
+ $this->notification
+ ->expects($this->never())
+ ->method('setParsedSubject');
+
+ $this->l10nFactory
+ ->expects($this->never())
+ ->method('get');
+
+ $this->commentsManager
+ ->expects(($this->never()))
+ ->method('get');
+
+ $this->userManager
+ ->expects($this->never())
+ ->method('get');
+
+ $this->notifier->prepare($this->notification, $this->lc);
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ */
+ public function testPrepareNotFound() {
+ $this->folder
+ ->expects($this->never())
+ ->method('getById');
+
+ $this->notification
+ ->expects($this->once())
+ ->method('getApp')
+ ->willReturn('comments');
+ $this->notification
+ ->expects($this->never())
+ ->method('getSubject');
+ $this->notification
+ ->expects($this->never())
+ ->method('getSubjectParameters');
+ $this->notification
+ ->expects($this->never())
+ ->method('setParsedSubject');
+
+ $this->l10nFactory
+ ->expects($this->never())
+ ->method('get');
+
+ $this->commentsManager
+ ->expects(($this->once()))
+ ->method('get')
+ ->willThrowException(new NotFoundException());
+
+ $this->userManager
+ ->expects($this->never())
+ ->method('get');
+
+ $this->notifier->prepare($this->notification, $this->lc);
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ */
+ public function testPrepareDifferentSubject() {
+ $displayName = 'Huraga';
+
+ /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ $user = $this->getMockBuilder('OCP\IUser')->getMock();
+ $user->expects($this->once())
+ ->method('getDisplayName')
+ ->willReturn($displayName);
+
+ $this->folder
+ ->expects($this->never())
+ ->method('getById');
+
+ $this->notification
+ ->expects($this->once())
+ ->method('getApp')
+ ->willReturn('comments');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubject')
+ ->willReturn('unlike');
+ $this->notification
+ ->expects($this->never())
+ ->method('getSubjectParameters');
+ $this->notification
+ ->expects($this->never())
+ ->method('setParsedSubject');
+
+ $this->l
+ ->expects($this->never())
+ ->method('t');
+
+ $this->l10nFactory
+ ->expects($this->once())
+ ->method('get')
+ ->willReturn($this->l);
+
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorId')
+ ->willReturn('huraga');
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorType')
+ ->willReturn('users');
+
+ $this->commentsManager
+ ->expects(($this->once()))
+ ->method('get')
+ ->willReturn($this->comment);
+
+ $this->userManager
+ ->expects($this->once())
+ ->method('get')
+ ->with('huraga')
+ ->willReturn($user);
+
+ $this->notifier->prepare($this->notification, $this->lc);
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ */
+ public function testPrepareNotFiles() {
+ $displayName = 'Huraga';
+
+ /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ $user = $this->getMockBuilder('OCP\IUser')->getMock();
+ $user->expects($this->once())
+ ->method('getDisplayName')
+ ->willReturn($displayName);
+
+ $this->folder
+ ->expects($this->never())
+ ->method('getById');
+
+ $this->notification
+ ->expects($this->once())
+ ->method('getApp')
+ ->willReturn('comments');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubject')
+ ->willReturn('mention');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubjectParameters')
+ ->willReturn(['ships', '678']);
+ $this->notification
+ ->expects($this->never())
+ ->method('setParsedSubject');
+
+ $this->l
+ ->expects($this->never())
+ ->method('t');
+
+ $this->l10nFactory
+ ->expects($this->once())
+ ->method('get')
+ ->willReturn($this->l);
+
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorId')
+ ->willReturn('huraga');
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorType')
+ ->willReturn('users');
+
+ $this->commentsManager
+ ->expects(($this->once()))
+ ->method('get')
+ ->willReturn($this->comment);
+
+ $this->userManager
+ ->expects($this->once())
+ ->method('get')
+ ->with('huraga')
+ ->willReturn($user);
+
+ $this->notifier->prepare($this->notification, $this->lc);
+ }
+
+ /**
+ * @expectedException \InvalidArgumentException
+ */
+ public function testPrepareUnresolvableFileID() {
+ $displayName = 'Huraga';
+
+ /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ $user = $this->getMockBuilder('OCP\IUser')->getMock();
+ $user->expects($this->once())
+ ->method('getDisplayName')
+ ->willReturn($displayName);
+
+ $this->folder
+ ->expects($this->once())
+ ->method('getById')
+ ->with('678')
+ ->willReturn([]);
+
+ $this->notification
+ ->expects($this->once())
+ ->method('getApp')
+ ->willReturn('comments');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubject')
+ ->willReturn('mention');
+ $this->notification
+ ->expects($this->once())
+ ->method('getSubjectParameters')
+ ->willReturn(['files', '678']);
+ $this->notification
+ ->expects($this->never())
+ ->method('setParsedSubject');
+
+ $this->l
+ ->expects($this->never())
+ ->method('t');
+
+ $this->l10nFactory
+ ->expects($this->once())
+ ->method('get')
+ ->willReturn($this->l);
+
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorId')
+ ->willReturn('huraga');
+ $this->comment
+ ->expects($this->any())
+ ->method('getActorType')
+ ->willReturn('users');
+
+ $this->commentsManager
+ ->expects(($this->once()))
+ ->method('get')
+ ->willReturn($this->comment);
+
+ $this->userManager
+ ->expects($this->once())
+ ->method('get')
+ ->with('huraga')
+ ->willReturn($user);
+
+ $this->notifier->prepare($this->notification, $this->lc);
+ }
+
+}
diff --git a/apps/dav/l10n/fi_FI.js b/apps/dav/l10n/fi_FI.js
new file mode 100644
index 00000000000..c2b9b8fef54
--- /dev/null
+++ b/apps/dav/l10n/fi_FI.js
@@ -0,0 +1,17 @@
+OC.L10N.register(
+ "dav",
+ {
+ "Contact birthdays" : "Yhteystietojen syntymäpäivät",
+ "Personal" : "Henkilökohtainen",
+ "Contacts" : "Yhteystiedot",
+ "Technical details" : "Tekniset yksityiskohdat",
+ "Remote Address: %s" : "Etäosoite: %s",
+ "Request ID: %s" : "Pyynnön tunniste: %s",
+ "Type: %s" : "Tyyppi: %s",
+ "Code: %s" : "Koodi: %s",
+ "Message: %s" : "Viesti: %s",
+ "File: %s" : "Tiedosto: %s",
+ "Line: %s" : "Rivi: %s",
+ "Trace" : "Jäljitys"
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/apps/dav/l10n/fi_FI.json b/apps/dav/l10n/fi_FI.json
new file mode 100644
index 00000000000..8adef493226
--- /dev/null
+++ b/apps/dav/l10n/fi_FI.json
@@ -0,0 +1,15 @@
+{ "translations": {
+ "Contact birthdays" : "Yhteystietojen syntymäpäivät",
+ "Personal" : "Henkilökohtainen",
+ "Contacts" : "Yhteystiedot",
+ "Technical details" : "Tekniset yksityiskohdat",
+ "Remote Address: %s" : "Etäosoite: %s",
+ "Request ID: %s" : "Pyynnön tunniste: %s",
+ "Type: %s" : "Tyyppi: %s",
+ "Code: %s" : "Koodi: %s",
+ "Message: %s" : "Viesti: %s",
+ "File: %s" : "Tiedosto: %s",
+ "Line: %s" : "Rivi: %s",
+ "Trace" : "Jäljitys"
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/apps/dav/l10n/lt_LT.js b/apps/dav/l10n/lt_LT.js
new file mode 100644
index 00000000000..57d19b9271b
--- /dev/null
+++ b/apps/dav/l10n/lt_LT.js
@@ -0,0 +1,17 @@
+OC.L10N.register(
+ "dav",
+ {
+ "Contact birthdays" : "Kontaktų gimtadieniai",
+ "Personal" : "Asmeniniai",
+ "Contacts" : "Kontaktai",
+ "Technical details" : "Techninės detalės",
+ "Remote Address: %s" : "Nutolęs adresas: %s",
+ "Request ID: %s" : "Užklausos ID: %s",
+ "Type: %s" : "Tipas: %s",
+ "Code: %s" : "Kodas: %s",
+ "Message: %s" : "Žinutė: %s",
+ "File: %s" : "Failas: %s",
+ "Line: %s" : "Eilutė: %s",
+ "Trace" : "Pėdsakas"
+},
+"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);");
diff --git a/apps/dav/l10n/lt_LT.json b/apps/dav/l10n/lt_LT.json
new file mode 100644
index 00000000000..6d3315f68ea
--- /dev/null
+++ b/apps/dav/l10n/lt_LT.json
@@ -0,0 +1,15 @@
+{ "translations": {
+ "Contact birthdays" : "Kontaktų gimtadieniai",
+ "Personal" : "Asmeniniai",
+ "Contacts" : "Kontaktai",
+ "Technical details" : "Techninės detalės",
+ "Remote Address: %s" : "Nutolęs adresas: %s",
+ "Request ID: %s" : "Užklausos ID: %s",
+ "Type: %s" : "Tipas: %s",
+ "Code: %s" : "Kodas: %s",
+ "Message: %s" : "Žinutė: %s",
+ "File: %s" : "Failas: %s",
+ "Line: %s" : "Eilutė: %s",
+ "Trace" : "Pėdsakas"
+},"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);"
+} \ No newline at end of file
diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php
index 101e3d87721..f247921be79 100644
--- a/apps/dav/lib/Comments/CommentNode.php
+++ b/apps/dav/lib/Comments/CommentNode.php
@@ -173,7 +173,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
* @param $propertyValue
* @return bool
* @throws BadRequest
- * @throws Forbidden
+ * @throws \Exception
*/
public function updateComment($propertyValue) {
$this->checkWriteAccessOnComment();
diff --git a/apps/federatedfilesharing/l10n/fi_FI.js b/apps/federatedfilesharing/l10n/fi_FI.js
index b1ec2e6f074..591c51453b6 100644
--- a/apps/federatedfilesharing/l10n/fi_FI.js
+++ b/apps/federatedfilesharing/l10n/fi_FI.js
@@ -2,11 +2,34 @@ OC.L10N.register(
"federatedfilesharing",
{
"Federated sharing" : "Federoitu jakaminen",
+ "Do you want to add the remote share {name} from {owner}@{remote}?" : "Haluatko lisätä etäjaon {name} kohteesta {owner}@{remote}?",
+ "Remote share" : "Etäjako",
+ "Remote share password" : "Etäjaon salasana",
+ "Cancel" : "Peruuta",
+ "Add remote share" : "Lisää etäjako",
+ "Copied!" : "Kopioitu!",
+ "Not supported!" : "Ei tuettu!",
+ "Press ⌘-C to copy." : "Paina ⌘-C kopioidaksesi.",
+ "Press Ctrl-C to copy." : "Paina Ctrl-C kopioidaksesi.",
"Invalid Federated Cloud ID" : "Virheellinen federoidun pilven tunniste",
+ "Server to server sharing is not enabled on this server" : "Palvelimien kesken jakaminen ei ole käytössä tällä palvelimella",
+ "Couldn't establish a federated share." : "Ei voinut muodostaa federoitua jakoa.",
+ "Couldn't establish a federated share, maybe the password was wrong." : "Ei voinut muodostaa federoitua jakoa. Ehkä salasana oli väärin.",
+ "Federated Share request was successful, you will receive a invitation. Check your notifications." : "Federoidun jaon pyyntö onnistui. Tulet saamaan kutsun. Tarkista ilmoituksesi.",
+ "The mountpoint name contains invalid characters." : "Liitospisteen nimi sisältää virheellisiä merkkejä.",
+ "Not allowed to create a federated share with the owner." : "Omistajan kanssa ei ole sallittua luoda federoitua jakoa",
+ "Invalid or untrusted SSL certificate" : "Virheellinen tai ei-luotettu SSL-varmenne",
+ "Could not authenticate to remote share, password might be wrong" : "Tunnistautuminen etäjakoa kohtaan epäonnistui. Salasana saattaa olla väärä",
+ "Storage not valid" : "Tallennustila ei ole kelvollinen",
+ "Federated Share successfully added" : "Federoitu jako lisätty onnistuneesti",
+ "Couldn't add remote share" : "Etäjaon liittäminen epäonnistui",
"Sharing %s failed, because this item is already shared with %s" : "Kohteen %s jakaminen epäonnistui, koska kohde on jo jaettu käyttäjän %s kanssa",
"Not allowed to create a federated share with the same user" : "Saman käyttäjän kanssa ei ole sallittua luoda federoitua jakoa",
"File is already shared with %s" : "Tiedosto on jo jaettu kohteen %s kanssa",
"Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Kohteen %s jakaminen epäonnistui, kohdetta %s ei löytynyt. Kenties palvelin ei ole juuri nyt tavoitettavissa.",
+ "Could not find share" : "Ei löytynyt jakoa",
+ "You received \"/%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Vastaanotit \"/%3$s\":n etäjakona käyttäjältä %1$s (%2$s:n puolesta)",
+ "You received \"/%3$s\" as a remote share from %1$s" : "Vastaanotit \"/%3$s\":n etäjakona käyttäjältä %1$s",
"Accept" : "Hyväksy",
"Decline" : "Kieltäydy",
"Share with me through my #Nextcloud Federated Cloud ID, see %s" : "Jaa kanssani käyttäen #Nextcloud ja federoitua pilvitunnistetta, katso %s",
diff --git a/apps/federatedfilesharing/l10n/fi_FI.json b/apps/federatedfilesharing/l10n/fi_FI.json
index 1ea4661a589..59e9eeb4ea8 100644
--- a/apps/federatedfilesharing/l10n/fi_FI.json
+++ b/apps/federatedfilesharing/l10n/fi_FI.json
@@ -1,10 +1,33 @@
{ "translations": {
"Federated sharing" : "Federoitu jakaminen",
+ "Do you want to add the remote share {name} from {owner}@{remote}?" : "Haluatko lisätä etäjaon {name} kohteesta {owner}@{remote}?",
+ "Remote share" : "Etäjako",
+ "Remote share password" : "Etäjaon salasana",
+ "Cancel" : "Peruuta",
+ "Add remote share" : "Lisää etäjako",
+ "Copied!" : "Kopioitu!",
+ "Not supported!" : "Ei tuettu!",
+ "Press ⌘-C to copy." : "Paina ⌘-C kopioidaksesi.",
+ "Press Ctrl-C to copy." : "Paina Ctrl-C kopioidaksesi.",
"Invalid Federated Cloud ID" : "Virheellinen federoidun pilven tunniste",
+ "Server to server sharing is not enabled on this server" : "Palvelimien kesken jakaminen ei ole käytössä tällä palvelimella",
+ "Couldn't establish a federated share." : "Ei voinut muodostaa federoitua jakoa.",
+ "Couldn't establish a federated share, maybe the password was wrong." : "Ei voinut muodostaa federoitua jakoa. Ehkä salasana oli väärin.",
+ "Federated Share request was successful, you will receive a invitation. Check your notifications." : "Federoidun jaon pyyntö onnistui. Tulet saamaan kutsun. Tarkista ilmoituksesi.",
+ "The mountpoint name contains invalid characters." : "Liitospisteen nimi sisältää virheellisiä merkkejä.",
+ "Not allowed to create a federated share with the owner." : "Omistajan kanssa ei ole sallittua luoda federoitua jakoa",
+ "Invalid or untrusted SSL certificate" : "Virheellinen tai ei-luotettu SSL-varmenne",
+ "Could not authenticate to remote share, password might be wrong" : "Tunnistautuminen etäjakoa kohtaan epäonnistui. Salasana saattaa olla väärä",
+ "Storage not valid" : "Tallennustila ei ole kelvollinen",
+ "Federated Share successfully added" : "Federoitu jako lisätty onnistuneesti",
+ "Couldn't add remote share" : "Etäjaon liittäminen epäonnistui",
"Sharing %s failed, because this item is already shared with %s" : "Kohteen %s jakaminen epäonnistui, koska kohde on jo jaettu käyttäjän %s kanssa",
"Not allowed to create a federated share with the same user" : "Saman käyttäjän kanssa ei ole sallittua luoda federoitua jakoa",
"File is already shared with %s" : "Tiedosto on jo jaettu kohteen %s kanssa",
"Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Kohteen %s jakaminen epäonnistui, kohdetta %s ei löytynyt. Kenties palvelin ei ole juuri nyt tavoitettavissa.",
+ "Could not find share" : "Ei löytynyt jakoa",
+ "You received \"/%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "Vastaanotit \"/%3$s\":n etäjakona käyttäjältä %1$s (%2$s:n puolesta)",
+ "You received \"/%3$s\" as a remote share from %1$s" : "Vastaanotit \"/%3$s\":n etäjakona käyttäjältä %1$s",
"Accept" : "Hyväksy",
"Decline" : "Kieltäydy",
"Share with me through my #Nextcloud Federated Cloud ID, see %s" : "Jaa kanssani käyttäen #Nextcloud ja federoitua pilvitunnistetta, katso %s",
diff --git a/apps/federation/l10n/de_DE.js b/apps/federation/l10n/de_DE.js
index c83bdad5868..5421e2fa50c 100644
--- a/apps/federation/l10n/de_DE.js
+++ b/apps/federation/l10n/de_DE.js
@@ -3,7 +3,7 @@ OC.L10N.register(
{
"Added to the list of trusted servers" : "Der Liste der vertrauenswürdigen Server hinzugefügt",
"Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Servern.",
- "No server to federate with found" : "Kein server Gebunden, der sich verbinden ließe",
+ "No server to federate with found" : "Kein Server gefunden, der sich verbinden ließe",
"Could not add server" : "Konnte Server nicht hinzufügen",
"Federation" : "Federation",
"Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Federation erlaubt es Ihnen sich mit anderen vertrauenswürdigen Servern zu verbinden um das Benutzerverzeichnis auszutauschen. Diese Funktion wird beispielsweise für die Autovervollständigung externer Benutzer genutzt und ermöglicht das Teilen von Inhalten mit ihnen (\"federated sharing\").",
diff --git a/apps/federation/l10n/de_DE.json b/apps/federation/l10n/de_DE.json
index 6ca52a00452..039ec743911 100644
--- a/apps/federation/l10n/de_DE.json
+++ b/apps/federation/l10n/de_DE.json
@@ -1,7 +1,7 @@
{ "translations": {
"Added to the list of trusted servers" : "Der Liste der vertrauenswürdigen Server hinzugefügt",
"Server is already in the list of trusted servers." : "Server ist bereits in der Liste der vertrauenswürdigen Servern.",
- "No server to federate with found" : "Kein server Gebunden, der sich verbinden ließe",
+ "No server to federate with found" : "Kein Server gefunden, der sich verbinden ließe",
"Could not add server" : "Konnte Server nicht hinzufügen",
"Federation" : "Federation",
"Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Federation erlaubt es Ihnen sich mit anderen vertrauenswürdigen Servern zu verbinden um das Benutzerverzeichnis auszutauschen. Diese Funktion wird beispielsweise für die Autovervollständigung externer Benutzer genutzt und ermöglicht das Teilen von Inhalten mit ihnen (\"federated sharing\").",
diff --git a/apps/federation/l10n/fi_FI.js b/apps/federation/l10n/fi_FI.js
index 53052a96406..578b3ea7dba 100644
--- a/apps/federation/l10n/fi_FI.js
+++ b/apps/federation/l10n/fi_FI.js
@@ -12,6 +12,8 @@ OC.L10N.register(
"+ Add Nextcloud server" : "+ Lisää Nextcloud-palvelin",
"Nextcloud Server" : "Nextcloud-palvelin",
"Server added to the list of trusted Nextclouds" : "Palvelin lisätty luotettujen palvelimien luetteloon",
- "No Nextcloud server found" : "Nextcloud-palvelinta ei löytynyt"
+ "No Nextcloud server found" : "Nextcloud-palvelinta ei löytynyt",
+ "Nextcloud Federation allows you to connect with other trusted Nextclouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Nextcould federointi sallii sinun liittyä toisten luotettujen Nextcloud -palvelimien käyttäjäluetteloihin. Sitä käytetään esimerkiksi ulkoisten käyttäjänimien automaattiseen täydentämiseen.",
+ "Trusted Nextcloud Servers" : "Luotetut Nextcloud -palvelimet"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/federation/l10n/fi_FI.json b/apps/federation/l10n/fi_FI.json
index 4cc9068a74e..4f3a4b1a3ac 100644
--- a/apps/federation/l10n/fi_FI.json
+++ b/apps/federation/l10n/fi_FI.json
@@ -10,6 +10,8 @@
"+ Add Nextcloud server" : "+ Lisää Nextcloud-palvelin",
"Nextcloud Server" : "Nextcloud-palvelin",
"Server added to the list of trusted Nextclouds" : "Palvelin lisätty luotettujen palvelimien luetteloon",
- "No Nextcloud server found" : "Nextcloud-palvelinta ei löytynyt"
+ "No Nextcloud server found" : "Nextcloud-palvelinta ei löytynyt",
+ "Nextcloud Federation allows you to connect with other trusted Nextclouds to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Nextcould federointi sallii sinun liittyä toisten luotettujen Nextcloud -palvelimien käyttäjäluetteloihin. Sitä käytetään esimerkiksi ulkoisten käyttäjänimien automaattiseen täydentämiseen.",
+ "Trusted Nextcloud Servers" : "Luotetut Nextcloud -palvelimet"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/files/l10n/bg_BG.js b/apps/files/l10n/bg_BG.js
index d080e4b7c69..9a2095fb479 100644
--- a/apps/files/l10n/bg_BG.js
+++ b/apps/files/l10n/bg_BG.js
@@ -1,8 +1,8 @@
OC.L10N.register(
"files",
{
- "Storage not available" : "Липсва дисковото устройство.",
- "Storage invalid" : "Невалидно дисково устройство.",
+ "Storage not available" : "Хранилището не е налично.",
+ "Storage invalid" : "Невалидно хранилище.",
"Unknown error" : "Непозната грешка.",
"Unable to set upload directory." : "Неуспешно задаване на директория за качване.",
"Invalid Token" : "Невалиеден токен.",
@@ -14,7 +14,7 @@ OC.L10N.register(
"No file was uploaded" : "Неуспешно качване.",
"Missing a temporary folder" : "Липсва временна папка.",
"Failed to write to disk" : "Възникна проблем при запис на диска.",
- "Not enough storage available" : "Недостатъчно място.",
+ "Not enough storage available" : "Недостатъчно място в хранилището",
"The target folder has been moved or deleted." : "Крайната папка е изтрита или преместена.",
"Upload failed. Could not find uploaded file" : "Неуспешно качване. Не бе открит качения файл.",
"Upload failed. Could not get file info." : "Неуспешно качване. Не се получи информация за файла.",
@@ -28,33 +28,44 @@ OC.L10N.register(
"Unable to upload {filename} as it is a directory or has 0 bytes" : "Неуспешно качване на {filename}, защото е директория или е с размер от 0 байта.",
"Total file size {size1} exceeds upload limit {size2}" : "Общия размер {size1} надминава лимита за качване {size2}.",
"Not enough free space, you are uploading {size1} but only {size2} is left" : "Няма достатъчно свободно място, ти се опитваш да качиш {size1}, но са останали само {size2}.",
+ "Error uploading file \"{fileName}\": {message}" : "Грешка при качването на файла \"{fileName}\": {message}",
"Could not get result from server." : "Не се получи резултат от сървърът.",
"Uploading..." : "Качване...",
+ "Any moment now..." : "Всеки момент...",
+ "Soon..." : "Скоро...",
"File upload is in progress. Leaving the page now will cancel the upload." : "Извършва се качване на файлове. Затварянето на тази страница ще прекъсне качването.",
"Actions" : "Действия",
"Download" : "Изтегли",
"Rename" : "Преименуване",
"Delete" : "Изтрий",
- "Disconnect storage" : "Извади дисковото устройство.",
+ "Disconnect storage" : "Извади хранилището",
"Unshare" : "Премахване на споделяне",
- "Details" : "Подробности",
+ "Details" : "Детайли",
"Select" : "Избери",
"Pending" : "Чакащо",
"Unable to determine date" : "Неуспешно установяване на дата",
- "No entries in this folder match '{filter}'" : "Нищо в тази папка не отговаря на '{filter}'",
+ "This operation is forbidden" : "Операцията е забранена",
+ "Could not move \"{file}\", target exists" : "Файлът \"{file}\" не може да бъде преместен защото съществува в дестинацията",
+ "Could not move \"{file}\"" : "Файлът \"{file}\" не може да бъде преместен",
+ "{newName} already exists" : "{newName} вече съществува",
+ "Error deleting file \"{fileName}\"." : "Грешка при изтриването на файла \"{fileName}\".",
+ "No entries in this folder match '{filter}'" : "Нищо в тази папка не пасва на '{filter}'",
"Name" : "Име",
"Size" : "Размер",
"Modified" : "Променен на",
"_%n folder_::_%n folders_" : ["%n папка","%n папки"],
"_%n file_::_%n files_" : ["%n файл","%n файла"],
"{dirs} and {files}" : "{dirs} и {files}",
+ "_including %n hidden_::_including %n hidden_" : ["включително %n скрит","включително %n скрити"],
"You don’t have permission to upload or create files here" : "Нямаш разрешение да създаваш или качваш файлове тук.",
"_Uploading %n file_::_Uploading %n files_" : ["Качване на %n файл","Качване на %n файла."],
"New" : "Създай",
"\"{name}\" is an invalid file name." : "\"{name}\" е непозволено име за файл.",
"File name cannot be empty." : "Името на файла не може да бъде оставено празно.",
- "Your storage is full, files can not be updated or synced anymore!" : "Заделеното място е запълнено, повече файлове не могат да бъдат синхронизирани или опреснени!",
- "Your storage is almost full ({usedSpacePercent}%)" : "Заделеното място е почити запълнено ({usedSpacePercent}%).",
+ "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!" : "Хранилището е запълнено. Поради това качването и синхронизирането на файлове е невъзможно!",
+ "Storage of {owner} is almost full ({usedSpacePercent}%)" : "Хранилището на {owner} е почти запълнено ({usedSpacePercent}%)",
+ "Your storage is almost full ({usedSpacePercent}%)" : "Вашето хранилище е почти запълнено ({usedSpacePercent}%).",
"_matches '{filter}'_::_match '{filter}'_" : ["пасва на '{filter}'","пасват на '{filter}'\n "],
"Favorited" : "Отбелязано в любими",
"Favorite" : "Любими",
@@ -62,10 +73,10 @@ OC.L10N.register(
"New folder" : "Нова папка",
"Upload" : "Качване",
"An error occurred while trying to update the tags" : "Настъпи грешка при опита за промяна на бележките",
- "A new file or folder has been <strong>created</strong>" : "Нов файл или папка беше <strong>създаден/а</strong>",
- "A file or folder has been <strong>changed</strong>" : "Файл или папка беше <strong>променен/а</strong>",
- "A file or folder has been <strong>deleted</strong>" : "Файл или папка беше <strong>изтрит/а</strong>",
- "A file or folder has been <strong>restored</strong>" : "Файл или папка беше <strong>възстановен/а</strong>",
+ "A new file or folder has been <strong>created</strong>" : "<strong>Създаване</strong> на нов файл / папка",
+ "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Изпращай известия за създаване / промяна само за <strong>любимите файлове</strong> <em>(Само за потока)</em>",
+ "A file or folder has been <strong>deleted</strong>" : "<strong>Изтриване</strong> на файл / папка",
+ "A file or folder has been <strong>restored</strong>" : "<strong>Възстановяване</strong> на файл / папка",
"You created %1$s" : "Вие създадохте %1$s.",
"%2$s created %1$s" : "%2$s създаде %1$s.",
"%1$s was created in a public folder" : "%1$s е създаден в публична папка",
@@ -75,22 +86,37 @@ OC.L10N.register(
"%2$s deleted %1$s" : "%2$s изтри %1$s.",
"You restored %1$s" : "Вие възстановихте %1$s",
"%2$s restored %1$s" : "%2$s възстанови %1$s",
+ "You renamed %2$s to %1$s" : "Преименувахте %2$s на %1$s",
+ "%2$s renamed %3$s to %1$s" : "%2$s преименува %3$s на %1$s",
+ "You moved %2$s to %1$s" : "Преместихте %2$s в %1$s",
+ "%2$s moved %3$s to %1$s" : "%2$s премести %3$s в %1$s",
+ "Changed by %2$s" : "Променен от %2$s",
+ "Deleted by %2$s" : "Изтрит от %2$s",
+ "Restored by %2$s" : "Възстанвен от %2$s",
+ "Renamed by %2$s" : "Преимеуван от %2$s",
+ "Moved by %2$s" : "Преместен от %2$s",
"Upload (max. %s)" : "Качи (макс. %s)",
"File handling" : "Операция с файла",
"Maximum upload size" : "Максимален размер",
"max. possible: " : "максимално:",
"Save" : "Запис",
+ "With PHP-FPM it might take 5 minutes for changes to be applied." : "Ако ползвате PHP-FPM прилагането на една промяна може да отнеме 5 минути.",
"Settings" : "Настройки",
+ "Show hidden files" : "Показвай и скрити файлове",
"WebDAV" : "WebDAV",
+ "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Ползвайте горния адрес <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">за да достъпите файловете чрез WebDAV</a>",
"No files in here" : "Тук няма файлове",
"Upload some content or sync with your devices!" : "Качи съдържание или синхронизирай с твоите устройства!",
"No entries found in this folder" : "Няма намерени записи в тази папка",
"Select all" : "Избери всички",
"Upload too large" : "Прекалено голям файл за качване.",
- "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Файловете, които се опитваш да качиш са по-големи от позволеното на този сървър.",
+ "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Файловете, които се опитвате да качите са по-големи от позволеното на сървъра.",
"No favorites" : "Няма любими",
"Files and folders you mark as favorite will show up here" : "Файловете и папките които отбелязваш като любими ще се показват тук",
"Text file" : "Текстов файл",
- "New text file.txt" : "Нов текст file.txt"
+ "New text file.txt" : "Нов текст file.txt",
+ "{newname} already exists" : "{newname} вече съществува",
+ "A file or folder has been <strong>changed</strong>" : "<strong>Промяна</strong> на файл / папка",
+ "Use this address to <a href=\"%s\" target=\"_blank\">access your Files via WebDAV</a>" : "Ползвайте следния адрес <a href=\"%s\" target=\"_blank\">за да достъпите файловете чрез WebDAV</a>"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/files/l10n/bg_BG.json b/apps/files/l10n/bg_BG.json
index 080390bd8a6..576c19895b2 100644
--- a/apps/files/l10n/bg_BG.json
+++ b/apps/files/l10n/bg_BG.json
@@ -1,6 +1,6 @@
{ "translations": {
- "Storage not available" : "Липсва дисковото устройство.",
- "Storage invalid" : "Невалидно дисково устройство.",
+ "Storage not available" : "Хранилището не е налично.",
+ "Storage invalid" : "Невалидно хранилище.",
"Unknown error" : "Непозната грешка.",
"Unable to set upload directory." : "Неуспешно задаване на директория за качване.",
"Invalid Token" : "Невалиеден токен.",
@@ -12,7 +12,7 @@
"No file was uploaded" : "Неуспешно качване.",
"Missing a temporary folder" : "Липсва временна папка.",
"Failed to write to disk" : "Възникна проблем при запис на диска.",
- "Not enough storage available" : "Недостатъчно място.",
+ "Not enough storage available" : "Недостатъчно място в хранилището",
"The target folder has been moved or deleted." : "Крайната папка е изтрита или преместена.",
"Upload failed. Could not find uploaded file" : "Неуспешно качване. Не бе открит качения файл.",
"Upload failed. Could not get file info." : "Неуспешно качване. Не се получи информация за файла.",
@@ -26,33 +26,44 @@
"Unable to upload {filename} as it is a directory or has 0 bytes" : "Неуспешно качване на {filename}, защото е директория или е с размер от 0 байта.",
"Total file size {size1} exceeds upload limit {size2}" : "Общия размер {size1} надминава лимита за качване {size2}.",
"Not enough free space, you are uploading {size1} but only {size2} is left" : "Няма достатъчно свободно място, ти се опитваш да качиш {size1}, но са останали само {size2}.",
+ "Error uploading file \"{fileName}\": {message}" : "Грешка при качването на файла \"{fileName}\": {message}",
"Could not get result from server." : "Не се получи резултат от сървърът.",
"Uploading..." : "Качване...",
+ "Any moment now..." : "Всеки момент...",
+ "Soon..." : "Скоро...",
"File upload is in progress. Leaving the page now will cancel the upload." : "Извършва се качване на файлове. Затварянето на тази страница ще прекъсне качването.",
"Actions" : "Действия",
"Download" : "Изтегли",
"Rename" : "Преименуване",
"Delete" : "Изтрий",
- "Disconnect storage" : "Извади дисковото устройство.",
+ "Disconnect storage" : "Извади хранилището",
"Unshare" : "Премахване на споделяне",
- "Details" : "Подробности",
+ "Details" : "Детайли",
"Select" : "Избери",
"Pending" : "Чакащо",
"Unable to determine date" : "Неуспешно установяване на дата",
- "No entries in this folder match '{filter}'" : "Нищо в тази папка не отговаря на '{filter}'",
+ "This operation is forbidden" : "Операцията е забранена",
+ "Could not move \"{file}\", target exists" : "Файлът \"{file}\" не може да бъде преместен защото съществува в дестинацията",
+ "Could not move \"{file}\"" : "Файлът \"{file}\" не може да бъде преместен",
+ "{newName} already exists" : "{newName} вече съществува",
+ "Error deleting file \"{fileName}\"." : "Грешка при изтриването на файла \"{fileName}\".",
+ "No entries in this folder match '{filter}'" : "Нищо в тази папка не пасва на '{filter}'",
"Name" : "Име",
"Size" : "Размер",
"Modified" : "Променен на",
"_%n folder_::_%n folders_" : ["%n папка","%n папки"],
"_%n file_::_%n files_" : ["%n файл","%n файла"],
"{dirs} and {files}" : "{dirs} и {files}",
+ "_including %n hidden_::_including %n hidden_" : ["включително %n скрит","включително %n скрити"],
"You don’t have permission to upload or create files here" : "Нямаш разрешение да създаваш или качваш файлове тук.",
"_Uploading %n file_::_Uploading %n files_" : ["Качване на %n файл","Качване на %n файла."],
"New" : "Създай",
"\"{name}\" is an invalid file name." : "\"{name}\" е непозволено име за файл.",
"File name cannot be empty." : "Името на файла не може да бъде оставено празно.",
- "Your storage is full, files can not be updated or synced anymore!" : "Заделеното място е запълнено, повече файлове не могат да бъдат синхронизирани или опреснени!",
- "Your storage is almost full ({usedSpacePercent}%)" : "Заделеното място е почити запълнено ({usedSpacePercent}%).",
+ "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!" : "Хранилището е запълнено. Поради това качването и синхронизирането на файлове е невъзможно!",
+ "Storage of {owner} is almost full ({usedSpacePercent}%)" : "Хранилището на {owner} е почти запълнено ({usedSpacePercent}%)",
+ "Your storage is almost full ({usedSpacePercent}%)" : "Вашето хранилище е почти запълнено ({usedSpacePercent}%).",
"_matches '{filter}'_::_match '{filter}'_" : ["пасва на '{filter}'","пасват на '{filter}'\n "],
"Favorited" : "Отбелязано в любими",
"Favorite" : "Любими",
@@ -60,10 +71,10 @@
"New folder" : "Нова папка",
"Upload" : "Качване",
"An error occurred while trying to update the tags" : "Настъпи грешка при опита за промяна на бележките",
- "A new file or folder has been <strong>created</strong>" : "Нов файл или папка беше <strong>създаден/а</strong>",
- "A file or folder has been <strong>changed</strong>" : "Файл или папка беше <strong>променен/а</strong>",
- "A file or folder has been <strong>deleted</strong>" : "Файл или папка беше <strong>изтрит/а</strong>",
- "A file or folder has been <strong>restored</strong>" : "Файл или папка беше <strong>възстановен/а</strong>",
+ "A new file or folder has been <strong>created</strong>" : "<strong>Създаване</strong> на нов файл / папка",
+ "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Изпращай известия за създаване / промяна само за <strong>любимите файлове</strong> <em>(Само за потока)</em>",
+ "A file or folder has been <strong>deleted</strong>" : "<strong>Изтриване</strong> на файл / папка",
+ "A file or folder has been <strong>restored</strong>" : "<strong>Възстановяване</strong> на файл / папка",
"You created %1$s" : "Вие създадохте %1$s.",
"%2$s created %1$s" : "%2$s създаде %1$s.",
"%1$s was created in a public folder" : "%1$s е създаден в публична папка",
@@ -73,22 +84,37 @@
"%2$s deleted %1$s" : "%2$s изтри %1$s.",
"You restored %1$s" : "Вие възстановихте %1$s",
"%2$s restored %1$s" : "%2$s възстанови %1$s",
+ "You renamed %2$s to %1$s" : "Преименувахте %2$s на %1$s",
+ "%2$s renamed %3$s to %1$s" : "%2$s преименува %3$s на %1$s",
+ "You moved %2$s to %1$s" : "Преместихте %2$s в %1$s",
+ "%2$s moved %3$s to %1$s" : "%2$s премести %3$s в %1$s",
+ "Changed by %2$s" : "Променен от %2$s",
+ "Deleted by %2$s" : "Изтрит от %2$s",
+ "Restored by %2$s" : "Възстанвен от %2$s",
+ "Renamed by %2$s" : "Преимеуван от %2$s",
+ "Moved by %2$s" : "Преместен от %2$s",
"Upload (max. %s)" : "Качи (макс. %s)",
"File handling" : "Операция с файла",
"Maximum upload size" : "Максимален размер",
"max. possible: " : "максимално:",
"Save" : "Запис",
+ "With PHP-FPM it might take 5 minutes for changes to be applied." : "Ако ползвате PHP-FPM прилагането на една промяна може да отнеме 5 минути.",
"Settings" : "Настройки",
+ "Show hidden files" : "Показвай и скрити файлове",
"WebDAV" : "WebDAV",
+ "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Ползвайте горния адрес <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">за да достъпите файловете чрез WebDAV</a>",
"No files in here" : "Тук няма файлове",
"Upload some content or sync with your devices!" : "Качи съдържание или синхронизирай с твоите устройства!",
"No entries found in this folder" : "Няма намерени записи в тази папка",
"Select all" : "Избери всички",
"Upload too large" : "Прекалено голям файл за качване.",
- "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Файловете, които се опитваш да качиш са по-големи от позволеното на този сървър.",
+ "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Файловете, които се опитвате да качите са по-големи от позволеното на сървъра.",
"No favorites" : "Няма любими",
"Files and folders you mark as favorite will show up here" : "Файловете и папките които отбелязваш като любими ще се показват тук",
"Text file" : "Текстов файл",
- "New text file.txt" : "Нов текст file.txt"
+ "New text file.txt" : "Нов текст file.txt",
+ "{newname} already exists" : "{newname} вече съществува",
+ "A file or folder has been <strong>changed</strong>" : "<strong>Промяна</strong> на файл / папка",
+ "Use this address to <a href=\"%s\" target=\"_blank\">access your Files via WebDAV</a>" : "Ползвайте следния адрес <a href=\"%s\" target=\"_blank\">за да достъпите файловете чрез WebDAV</a>"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/files/l10n/es.js b/apps/files/l10n/es.js
index 6301a480564..cddc5461015 100644
--- a/apps/files/l10n/es.js
+++ b/apps/files/l10n/es.js
@@ -109,7 +109,9 @@ OC.L10N.register(
"You restored %1$s" : "Usted restauró %1$s",
"%2$s restored %1$s" : "%2$s recuperó %1$s",
"You renamed %2$s to %1$s" : "Has renombrado %2$s a %1$s",
+ "%2$s renamed %3$s to %1$s" : "%2$s renombrado %3$s a %1$s",
"You moved %2$s to %1$s" : "Has movido %2$s a %1$s",
+ "%2$s moved %3$s to %1$s" : "%2$s movido %3$s a %1$s",
"Changed by %2$s" : "Cambiado por %2$s",
"Deleted by %2$s" : "Eliminado por %2$s",
"Restored by %2$s" : "Restaurado por %2$s",
diff --git a/apps/files/l10n/es.json b/apps/files/l10n/es.json
index 74b0e0154d6..b228016a1e2 100644
--- a/apps/files/l10n/es.json
+++ b/apps/files/l10n/es.json
@@ -107,7 +107,9 @@
"You restored %1$s" : "Usted restauró %1$s",
"%2$s restored %1$s" : "%2$s recuperó %1$s",
"You renamed %2$s to %1$s" : "Has renombrado %2$s a %1$s",
+ "%2$s renamed %3$s to %1$s" : "%2$s renombrado %3$s a %1$s",
"You moved %2$s to %1$s" : "Has movido %2$s a %1$s",
+ "%2$s moved %3$s to %1$s" : "%2$s movido %3$s a %1$s",
"Changed by %2$s" : "Cambiado por %2$s",
"Deleted by %2$s" : "Eliminado por %2$s",
"Restored by %2$s" : "Restaurado por %2$s",
diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php
index d3994bbdf9f..742948b7ac3 100644
--- a/apps/files/lib/Command/TransferOwnership.php
+++ b/apps/files/lib/Command/TransferOwnership.php
@@ -28,6 +28,7 @@ use OC\Files\Filesystem;
use OC\Files\View;
use OCP\Files\FileInfo;
use OCP\Files\Mount\IMountManager;
+use OCP\IUser;
use OCP\IUserManager;
use OCP\Share\IManager;
use OCP\Share\IShare;
@@ -92,15 +93,22 @@ class TransferOwnership extends Command {
protected function execute(InputInterface $input, OutputInterface $output) {
$this->sourceUser = $input->getArgument('source-user');
$this->destinationUser = $input->getArgument('destination-user');
- if (!$this->userManager->userExists($this->sourceUser)) {
+ $source = $this->userManager->get($this->sourceUser);
+ $destination = $this->userManager->get($this->destinationUser);
+
+ if (!$source instanceof IUser) {
$output->writeln("<error>Unknown source user $this->sourceUser</error>");
return;
}
- if (!$this->userManager->userExists($this->destinationUser)) {
+
+ if (!$destination instanceof IUser) {
$output->writeln("<error>Unknown destination user $this->destinationUser</error>");
return;
}
-
+
+ $this->sourceUser = $source->getUID();
+ $this->destinationUser = $destination->getUID();
+
// target user has to be ready
if (!\OC::$server->getEncryptionManager()->isReadyForUser($this->destinationUser)) {
$output->writeln("<error>The target user is not ready to accept files. The user has at least to be logged in once.</error>");
diff --git a/apps/files_external/l10n/es.js b/apps/files_external/l10n/es.js
index 11f35b25a30..8de3f739529 100644
--- a/apps/files_external/l10n/es.js
+++ b/apps/files_external/l10n/es.js
@@ -102,6 +102,7 @@ OC.L10N.register(
"OpenStack Object Storage" : "Almacenamiento de objeto OpenStack",
"Service name" : "Nombre del servicio",
"Request timeout (seconds)" : "Tiempo agotado para petición (segundos)",
+ "External storages" : "Almacenamientos externos",
"The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte de cURL en PHP no está activado o instalado. No se puede montar %s. Pídale al administrador del sistema que lo instale.",
"No external storage configured" : "No hay ningún almacenamiento externo configurado",
"You can add external storages in the personal settings" : "Puede agregar almacenamientos externos en la configuración personal",
diff --git a/apps/files_external/l10n/es.json b/apps/files_external/l10n/es.json
index 84bc0589def..c7882f7c2f8 100644
--- a/apps/files_external/l10n/es.json
+++ b/apps/files_external/l10n/es.json
@@ -100,6 +100,7 @@
"OpenStack Object Storage" : "Almacenamiento de objeto OpenStack",
"Service name" : "Nombre del servicio",
"Request timeout (seconds)" : "Tiempo agotado para petición (segundos)",
+ "External storages" : "Almacenamientos externos",
"The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "El soporte de cURL en PHP no está activado o instalado. No se puede montar %s. Pídale al administrador del sistema que lo instale.",
"No external storage configured" : "No hay ningún almacenamiento externo configurado",
"You can add external storages in the personal settings" : "Puede agregar almacenamientos externos en la configuración personal",
diff --git a/apps/files_external/l10n/fr.js b/apps/files_external/l10n/fr.js
index bfa27723429..b3328dbc7cd 100644
--- a/apps/files_external/l10n/fr.js
+++ b/apps/files_external/l10n/fr.js
@@ -25,7 +25,7 @@ OC.L10N.register(
"Save" : "Enregistrer",
"Empty response from the server" : "Réponse vide du serveur",
"Couldn't access. Please logout and login to activate this mount point" : "Impossible d'accéder. Veuillez vous déconnecter et vous reconnecter pour activer ce point de montage.",
- "Couldn't get the information from the ownCloud server: {code} {type}" : "Impossible d'obtenir l'information depuis le serveur ownCloud : {code} {type}",
+ "Couldn't get the information from the ownCloud server: {code} {type}" : "Impossible d'obtenir l'information depuis le serveur Nextcloud : {code} {type}",
"Couldn't get the list of external mount points: {type}" : "Impossible de récupérer la liste des points de montage externes : {type}",
"There was an error with message: " : "Il y a eu une erreur avec le message :",
"External mount error" : "Erreur de point de montage externe",
diff --git a/apps/files_external/l10n/fr.json b/apps/files_external/l10n/fr.json
index ef5ecfecc70..e260de0300c 100644
--- a/apps/files_external/l10n/fr.json
+++ b/apps/files_external/l10n/fr.json
@@ -23,7 +23,7 @@
"Save" : "Enregistrer",
"Empty response from the server" : "Réponse vide du serveur",
"Couldn't access. Please logout and login to activate this mount point" : "Impossible d'accéder. Veuillez vous déconnecter et vous reconnecter pour activer ce point de montage.",
- "Couldn't get the information from the ownCloud server: {code} {type}" : "Impossible d'obtenir l'information depuis le serveur ownCloud : {code} {type}",
+ "Couldn't get the information from the ownCloud server: {code} {type}" : "Impossible d'obtenir l'information depuis le serveur Nextcloud : {code} {type}",
"Couldn't get the list of external mount points: {type}" : "Impossible de récupérer la liste des points de montage externes : {type}",
"There was an error with message: " : "Il y a eu une erreur avec le message :",
"External mount error" : "Erreur de point de montage externe",
diff --git a/apps/files_sharing/l10n/es.js b/apps/files_sharing/l10n/es.js
index 7a36982e2ec..e379100c2bf 100644
--- a/apps/files_sharing/l10n/es.js
+++ b/apps/files_sharing/l10n/es.js
@@ -109,6 +109,7 @@ OC.L10N.register(
"Not allowed to create a federated share with the same user server" : "No se permite crear un recurso compartido federado con el mismo servidor del usuario",
"Invalid or untrusted SSL certificate" : "Certificado SSL no válido o no confiable",
"Could not authenticate to remote share, password might be wrong" : "No se ha podido autenticar para compartir remotamente, quizás esté mal la contraseña",
+ "Storage not valid" : "Almacenamiento inválido",
"Couldn't add remote share" : "No se ha podido añadir el recurso compartido remoto",
"Do you want to add the remote share {name} from {owner}@{remote}?" : "¿Desea añadir el recurso compartido remoto {name} de {owner}@{remote}?",
"Remote share" : "Recurso compartido remoto",
diff --git a/apps/files_sharing/l10n/es.json b/apps/files_sharing/l10n/es.json
index a0504544e7c..2d7b4018ca0 100644
--- a/apps/files_sharing/l10n/es.json
+++ b/apps/files_sharing/l10n/es.json
@@ -107,6 +107,7 @@
"Not allowed to create a federated share with the same user server" : "No se permite crear un recurso compartido federado con el mismo servidor del usuario",
"Invalid or untrusted SSL certificate" : "Certificado SSL no válido o no confiable",
"Could not authenticate to remote share, password might be wrong" : "No se ha podido autenticar para compartir remotamente, quizás esté mal la contraseña",
+ "Storage not valid" : "Almacenamiento inválido",
"Couldn't add remote share" : "No se ha podido añadir el recurso compartido remoto",
"Do you want to add the remote share {name} from {owner}@{remote}?" : "¿Desea añadir el recurso compartido remoto {name} de {owner}@{remote}?",
"Remote share" : "Recurso compartido remoto",
diff --git a/apps/files_sharing/l10n/fi_FI.js b/apps/files_sharing/l10n/fi_FI.js
index 7285abe441d..27517db2d36 100644
--- a/apps/files_sharing/l10n/fi_FI.js
+++ b/apps/files_sharing/l10n/fi_FI.js
@@ -14,6 +14,7 @@ OC.L10N.register(
"No compatible server found at {remote}" : "Yhteensopivaa palvelinta ei löytynyt osoitteesta {remote}",
"Invalid server URL" : "Virheellinen palvelimen URL",
"Failed to add the public link to your Nextcloud" : "Julkisen linkin lisääminen Nextcloudiisi epäonnistui",
+ "Share" : "Jaa",
"No expiration date set" : "Ei vanhenemispäivää asetettu",
"Shared by" : "Jakanut",
"Sharing" : "Jakaminen",
diff --git a/apps/files_sharing/l10n/fi_FI.json b/apps/files_sharing/l10n/fi_FI.json
index a3ed07dd6cd..507c2cc374b 100644
--- a/apps/files_sharing/l10n/fi_FI.json
+++ b/apps/files_sharing/l10n/fi_FI.json
@@ -12,6 +12,7 @@
"No compatible server found at {remote}" : "Yhteensopivaa palvelinta ei löytynyt osoitteesta {remote}",
"Invalid server URL" : "Virheellinen palvelimen URL",
"Failed to add the public link to your Nextcloud" : "Julkisen linkin lisääminen Nextcloudiisi epäonnistui",
+ "Share" : "Jaa",
"No expiration date set" : "Ei vanhenemispäivää asetettu",
"Shared by" : "Jakanut",
"Sharing" : "Jakaminen",
diff --git a/apps/files_sharing/l10n/fr.js b/apps/files_sharing/l10n/fr.js
index 0e46b616178..b303d139c11 100644
--- a/apps/files_sharing/l10n/fr.js
+++ b/apps/files_sharing/l10n/fr.js
@@ -118,7 +118,7 @@ OC.L10N.register(
"Cancel" : "Annuler",
"Add remote share" : "Ajouter un partage distant",
"No ownCloud installation (7 or higher) found at {remote}" : "Aucune installation ownCloud (7 ou supérieur) trouvée sur {remote}",
- "Invalid ownCloud url" : "URL ownCloud non valide",
+ "Invalid ownCloud url" : "URL Nextcloud non valide",
"You received \"/%2$s\" as a remote share from %1$s" : "Vous avez reçu \"/%2$s\" comme partage distant de %1$s",
"Accept" : "Accepter",
"Decline" : "Refuser",
diff --git a/apps/files_sharing/l10n/fr.json b/apps/files_sharing/l10n/fr.json
index d47676ff93d..29bdbbc32a7 100644
--- a/apps/files_sharing/l10n/fr.json
+++ b/apps/files_sharing/l10n/fr.json
@@ -116,7 +116,7 @@
"Cancel" : "Annuler",
"Add remote share" : "Ajouter un partage distant",
"No ownCloud installation (7 or higher) found at {remote}" : "Aucune installation ownCloud (7 ou supérieur) trouvée sur {remote}",
- "Invalid ownCloud url" : "URL ownCloud non valide",
+ "Invalid ownCloud url" : "URL Nextcloud non valide",
"You received \"/%2$s\" as a remote share from %1$s" : "Vous avez reçu \"/%2$s\" comme partage distant de %1$s",
"Accept" : "Accepter",
"Decline" : "Refuser",
diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php
index 34f73c7ac07..8d00d176678 100644
--- a/apps/files_sharing/lib/API/Share20OCS.php
+++ b/apps/files_sharing/lib/API/Share20OCS.php
@@ -29,6 +29,7 @@ use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCS\OCSForbiddenException;
use OCP\AppFramework\OCS\OCSNotFoundException;
use OCP\AppFramework\OCSController;
+use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\IGroupManager;
use OCP\IL10N;
@@ -84,15 +85,15 @@ class Share20OCS extends OCSController {
* @param IL10N $l10n
*/
public function __construct(
- $appName,
- IRequest $request,
- IManager $shareManager,
- IGroupManager $groupManager,
- IUserManager $userManager,
- IRootFolder $rootFolder,
- IURLGenerator $urlGenerator,
- IUser $currentUser,
- IL10N $l10n
+ $appName,
+ IRequest $request,
+ IManager $shareManager,
+ IGroupManager $groupManager,
+ IUserManager $userManager,
+ IRootFolder $rootFolder,
+ IURLGenerator $urlGenerator,
+ IUser $currentUser,
+ IL10N $l10n
) {
parent::__construct($appName, $request);
@@ -110,10 +111,11 @@ class Share20OCS extends OCSController {
* Convert an IShare to an array for OCS output
*
* @param \OCP\Share\IShare $share
+ * @param Node|null $recipientNode
* @return array
* @throws NotFoundException In case the node can't be resolved.
*/
- protected function formatShare(\OCP\Share\IShare $share) {
+ protected function formatShare(\OCP\Share\IShare $share, Node $recipientNode = null) {
$sharedBy = $this->userManager->get($share->getSharedBy());
$shareOwner = $this->userManager->get($share->getShareOwner());
@@ -132,14 +134,22 @@ class Share20OCS extends OCSController {
];
$userFolder = $this->rootFolder->getUserFolder($this->currentUser->getUID());
- $nodes = $userFolder->getById($share->getNodeId());
+ if ($recipientNode) {
+ $node = $recipientNode;
+ } else {
+ $nodes = $userFolder->getById($share->getNodeId());
- if (empty($nodes)) {
- throw new NotFoundException();
+ if (empty($nodes)) {
+ // fallback to guessing the path
+ $node = $userFolder->get($share->getTarget());
+ if ($node === null) {
+ throw new NotFoundException();
+ }
+ } else {
+ $node = $nodes[0];
+ }
}
- $node = $nodes[0];
-
$result['path'] = $userFolder->getRelativePath($node->getPath());
if ($node instanceOf \OCP\Files\Folder) {
$result['item_type'] = 'folder';
@@ -402,7 +412,7 @@ class Share20OCS extends OCSController {
} catch (GenericShareException $e) {
$code = $e->getCode() === 0 ? 403 : $e->getCode();
throw new OCSException($e->getHint(), $code);
- }catch (\Exception $e) {
+ } catch (\Exception $e) {
throw new OCSForbiddenException($e->getMessage());
}
@@ -421,7 +431,7 @@ class Share20OCS extends OCSController {
$shares = array_merge($userShares, $groupShares);
- $shares = array_filter($shares, function(IShare $share) {
+ $shares = array_filter($shares, function (IShare $share) {
return $share->getShareOwner() !== $this->currentUser->getUID();
});
@@ -541,7 +551,7 @@ class Share20OCS extends OCSController {
$formatted = [];
foreach ($shares as $share) {
try {
- $formatted[] = $this->formatShare($share);
+ $formatted[] = $this->formatShare($share, $path);
} catch (NotFoundException $e) {
//Ignore share
}
@@ -708,7 +718,8 @@ class Share20OCS extends OCSController {
// If the share is shared with you (or a group you are a member of)
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER &&
- $share->getSharedWith() === $this->currentUser->getUID()) {
+ $share->getSharedWith() === $this->currentUser->getUID()
+ ) {
return true;
}
@@ -743,7 +754,7 @@ class Share20OCS extends OCSController {
throw new \Exception('Invalid date. Format must be YYYY-MM-DD');
}
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
return $date;
}
@@ -761,7 +772,7 @@ class Share20OCS extends OCSController {
// First check if it is an internal share.
try {
- $share = $this->shareManager->getShareById('ocinternal:'.$id);
+ $share = $this->shareManager->getShareById('ocinternal:' . $id);
} catch (ShareNotFound $e) {
if (!$this->shareManager->outgoingServer2ServerSharesAllowed()) {
throw new ShareNotFound();
@@ -775,6 +786,7 @@ class Share20OCS extends OCSController {
/**
* Lock a Node
+ *
* @param \OCP\Files\Node $node
*/
private function lock(\OCP\Files\Node $node) {
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php
index a62c29c5cad..aff3aadd7e7 100644
--- a/apps/files_sharing/tests/ApiTest.php
+++ b/apps/files_sharing/tests/ApiTest.php
@@ -29,6 +29,7 @@
namespace OCA\Files_Sharing\Tests;
+use OC\Files\Cache\Scanner;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCS\OCSForbiddenException;
@@ -72,6 +73,8 @@ class ApiTest extends TestCase {
$this->view->mkdir($this->folder . $this->subfolder . $this->subsubfolder);
$this->view->file_put_contents($this->folder.$this->filename, $this->data);
$this->view->file_put_contents($this->folder . $this->subfolder . $this->filename, $this->data);
+ $mount = $this->view->getMount($this->filename);
+ $mount->getStorage()->getScanner()->scan('', Scanner::SCAN_RECURSIVE);
$this->userFolder = \OC::$server->getUserFolder(self::TEST_FILES_SHARING_API_USER1);
}
@@ -113,10 +116,8 @@ class ApiTest extends TestCase {
);
}
- /**
- * @medium
- */
function testCreateShareUserFile() {
+ $this->setUp(); // for some reasons phpunit refuses to do this for us only for this test
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1);
$result = $ocs->createShare($this->filename, \OCP\Constants::PERMISSION_ALL, \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2);
$ocs->cleanup();
@@ -627,7 +628,7 @@ class ApiTest extends TestCase {
);
foreach ($testValues as $value) {
- $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
+ $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
$result = $ocs->getShares('false', 'false', 'true', $value['query']);
$ocs->cleanup();
@@ -764,6 +765,7 @@ class ApiTest extends TestCase {
* @medium
*/
function testGetShareMultipleSharedFolder() {
+ $this->setUp();
$node1 = $this->userFolder->get($this->folder . $this->subfolder);
$share1 = $this->shareManager->newShare();
$share1->setNode($node1)
@@ -789,8 +791,9 @@ class ApiTest extends TestCase {
->setPermissions(1);
$share3 = $this->shareManager->createShare($share3);
+ // $request = $this->createRequest(['path' => $this->subfolder]);
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
- $result1 = $ocs->getShares();
+ $result1 = $ocs->getShares('false','false','false', $this->subfolder);
$ocs->cleanup();
// test should return one share within $this->folder
@@ -798,8 +801,9 @@ class ApiTest extends TestCase {
$this->assertCount(1, $data1);
$s1 = reset($data1);
+ //$request = $this->createRequest(['path' => $this->folder.$this->subfolder]);
$ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER2);
- $result2 = $ocs->getShares();
+ $result2 = $ocs->getShares('false', 'false', 'false', $this->folder . $this->subfolder);
$ocs->cleanup();
// test should return one share within $this->folder
@@ -807,7 +811,7 @@ class ApiTest extends TestCase {
$this->assertCount(1, $data2);
$s2 = reset($data2);
- $this->assertEquals($this->folder.$this->subfolder, $s1['path']);
+ $this->assertEquals($this->subfolder, $s1['path']);
$this->assertEquals($this->folder.$this->subfolder, $s2['path']);
$this->shareManager->deleteShare($share1);
@@ -1193,14 +1197,11 @@ class ApiTest extends TestCase {
* Tests mounting a folder that is an external storage mount point.
*/
public function testShareStorageMountPoint() {
- self::$tempStorage = new \OC\Files\Storage\Temporary(array());
- self::$tempStorage->file_put_contents('test.txt', 'abcdef');
- self::$tempStorage->getScanner()->scan('');
-
- // needed because the sharing code sometimes switches the user internally and mounts the user's
- // storages. In our case the temp storage isn't mounted automatically, so doing it in the post hook
- // (similar to how ext storage works)
- \OCP\Util::connectHook('OC_Filesystem', 'post_initMountPoints', '\OCA\Files_Sharing\Tests\ApiTest', 'initTestMountPointsHook');
+ $tempStorage = new \OC\Files\Storage\Temporary(array());
+ $tempStorage->file_put_contents('test.txt', 'abcdef');
+ $tempStorage->getScanner()->scan('');
+
+ $this->registerMount(self::TEST_FILES_SHARING_API_USER1, $tempStorage, self::TEST_FILES_SHARING_API_USER1 . '/files' . self::TEST_FOLDER_NAME);
// logging in will auto-mount the temp storage for user1 as well
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php
index 096bbe85776..48476888bdd 100644
--- a/apps/files_sharing/tests/External/ManagerTest.php
+++ b/apps/files_sharing/tests/External/ManagerTest.php
@@ -58,7 +58,7 @@ class ManagerTest extends TestCase {
* @var \OCP\IUser
*/
private $user;
- private $mountProvider;
+ private $testMountProvider;
protected function setUp() {
parent::setUp();
@@ -82,13 +82,13 @@ class ManagerTest extends TestCase {
$discoveryManager,
$this->uid
);
- $this->mountProvider = new MountProvider(\OC::$server->getDatabaseConnection(), function() {
+ $this->testMountProvider = new MountProvider(\OC::$server->getDatabaseConnection(), function() {
return $this->manager;
});
}
private function setupMounts() {
- $mounts = $this->mountProvider->getMountsForUser($this->user, new StorageFactory());
+ $mounts = $this->testMountProvider->getMountsForUser($this->user, new StorageFactory());
foreach ($mounts as $mount) {
$this->mountManager->addMount($mount);
}
diff --git a/apps/files_sharing/tests/SizePropagationTest.php b/apps/files_sharing/tests/SizePropagationTest.php
index 3655977fd94..04db505e8a5 100644
--- a/apps/files_sharing/tests/SizePropagationTest.php
+++ b/apps/files_sharing/tests/SizePropagationTest.php
@@ -38,7 +38,6 @@ use Test\Traits\UserTrait;
*/
class SizePropagationTest extends TestCase {
use UserTrait;
- use MountProviderTrait;
protected function setupUser($name, $password = '') {
$this->createUser($name, $password);
diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php
index 0ad58151dbb..1777eb5bad2 100644
--- a/apps/files_sharing/tests/TestCase.php
+++ b/apps/files_sharing/tests/TestCase.php
@@ -31,8 +31,10 @@
namespace OCA\Files_Sharing\Tests;
+use OC\Files\Cache\Scanner;
use OC\Files\Filesystem;
use OCA\Files_Sharing\AppInfo\Application;
+use Test\Traits\MountProviderTrait;
/**
* Class TestCase
@@ -42,6 +44,7 @@ use OCA\Files_Sharing\AppInfo\Application;
* Base class for sharing tests.
*/
abstract class TestCase extends \Test\TestCase {
+ use MountProviderTrait;
const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
diff --git a/apps/files_trashbin/l10n/bg_BG.js b/apps/files_trashbin/l10n/bg_BG.js
index 767f529a9a1..72abc2fea14 100644
--- a/apps/files_trashbin/l10n/bg_BG.js
+++ b/apps/files_trashbin/l10n/bg_BG.js
@@ -8,6 +8,8 @@ OC.L10N.register(
"Delete" : "Изтрий",
"Delete permanently" : "Изтрий завинаги",
"Error" : "Грешка",
+ "This operation is forbidden" : "Операцията е забранена",
+ "This directory is unavailable, please check the logs or contact the administrator" : "Директорията не е налична. Моля проверете журнала или се свържете с администратор",
"restored" : "възстановено",
"No deleted files" : "Няма изтрити файлове",
"You will be able to recover deleted files from here" : "Имате възможност да възстановите изтрити файлове от тук",
diff --git a/apps/files_trashbin/l10n/bg_BG.json b/apps/files_trashbin/l10n/bg_BG.json
index 824d1e44254..f1efd5a4c26 100644
--- a/apps/files_trashbin/l10n/bg_BG.json
+++ b/apps/files_trashbin/l10n/bg_BG.json
@@ -6,6 +6,8 @@
"Delete" : "Изтрий",
"Delete permanently" : "Изтрий завинаги",
"Error" : "Грешка",
+ "This operation is forbidden" : "Операцията е забранена",
+ "This directory is unavailable, please check the logs or contact the administrator" : "Директорията не е налична. Моля проверете журнала или се свържете с администратор",
"restored" : "възстановено",
"No deleted files" : "Няма изтрити файлове",
"You will be able to recover deleted files from here" : "Имате възможност да възстановите изтрити файлове от тук",
diff --git a/apps/systemtags/l10n/fi_FI.js b/apps/systemtags/l10n/fi_FI.js
index 7b0f2f82143..74546964a72 100644
--- a/apps/systemtags/l10n/fi_FI.js
+++ b/apps/systemtags/l10n/fi_FI.js
@@ -2,16 +2,41 @@ OC.L10N.register(
"systemtags",
{
"Tags" : "Tunnisteet",
+ "Update" : "Päivitys",
+ "Create" : "Luo",
+ "Select tag…" : "Valitse tunniste…",
"Tagged files" : "Tunnisteella merkityt tiedostot",
"Select tags to filter by" : "Valitse suodatettavat tunnisteet",
"Please select tags to filter by" : "Valitse suodatettavat tunnisteet",
"No files found for the selected tags" : "Tiedostoja ei löytynyt valituilla tunnisteilla",
"<strong>System tags</strong> for a file have been modified" : "Tiedoston <strong>järjestelmätunnisteita</strong> on muokattu",
+ "You assigned system tag %3$s" : "Liitit järjestelmätunnisteen %3$s",
+ "%1$s assigned system tag %3$s" : "%1$s liitti järjestelmätunnisteen %3$s",
+ "You unassigned system tag %3$s" : "Poistit järjestelmätunnisteen %3$s",
+ "%1$s unassigned system tag %3$s" : "%1$s poisti järjestelmätunnisteen %3$s",
+ "You created system tag %2$s" : "Loit järjestelmätunnisteen %2$s",
+ "%1$s created system tag %2$s" : "%1$s loi järjestelmätunnisteen %2$s",
+ "You deleted system tag %2$s" : "Poistit järjestelmätunnisteen %2$s",
+ "%1$s deleted system tag %2$s" : "%1$s poisti järjestelmätunnisteen %2$s",
+ "You updated system tag %3$s to %2$s" : "Päivitit järjestelmätunnisteen %3$s tunnisteeksi %2$s",
+ "%1$s updated system tag %3$s to %2$s" : "%1$s päivitti järjestelmätunnisteen %3$s tunnisteeksi %2$s",
+ "You assigned system tag %3$s to %2$s" : "Liitit järjestelmätunnisteen %3$s kohteeseen %2$s",
+ "%1$s assigned system tag %3$s to %2$s" : "%1$s liitti järjestelmätunnisteen %3$s kohteeseen %2$s",
+ "You unassigned system tag %3$s from %2$s" : "Poistit järjestelmätunnisteen %3$s kohteesta %2$s",
+ "%1$s unassigned system tag %3$s from %2$s" : "%1$s poisti järjestelmätunnisteen %3$s kohteesta %2$s",
+ "%s (restricted)" : "%s (rajoitettu)",
"%s (invisible)" : "%s (näkymätön)",
+ "Collaborative tags" : "Yhteistyölliset tunnisteet",
+ "Name" : "Nimi",
+ "Delete" : "Poista",
+ "Public" : "Julkinen",
+ "Restricted" : "Rajoitettu",
+ "Invisible" : "Näkymätön",
+ "Reset" : "Palauta",
"No files in here" : "Täällä ei ole tiedostoja",
"No entries found in this folder" : "Ei kohteita tässä kansiossa",
- "Name" : "Nimi",
"Size" : "Koko",
- "Modified" : "Muokattu"
+ "Modified" : "Muokattu",
+ "%s (not-assignable)" : "%s (ei liitettävissä)"
},
"nplurals=2; plural=(n != 1);");
diff --git a/apps/systemtags/l10n/fi_FI.json b/apps/systemtags/l10n/fi_FI.json
index cac70e226b3..811e493b027 100644
--- a/apps/systemtags/l10n/fi_FI.json
+++ b/apps/systemtags/l10n/fi_FI.json
@@ -1,15 +1,40 @@
{ "translations": {
"Tags" : "Tunnisteet",
+ "Update" : "Päivitys",
+ "Create" : "Luo",
+ "Select tag…" : "Valitse tunniste…",
"Tagged files" : "Tunnisteella merkityt tiedostot",
"Select tags to filter by" : "Valitse suodatettavat tunnisteet",
"Please select tags to filter by" : "Valitse suodatettavat tunnisteet",
"No files found for the selected tags" : "Tiedostoja ei löytynyt valituilla tunnisteilla",
"<strong>System tags</strong> for a file have been modified" : "Tiedoston <strong>järjestelmätunnisteita</strong> on muokattu",
+ "You assigned system tag %3$s" : "Liitit järjestelmätunnisteen %3$s",
+ "%1$s assigned system tag %3$s" : "%1$s liitti järjestelmätunnisteen %3$s",
+ "You unassigned system tag %3$s" : "Poistit järjestelmätunnisteen %3$s",
+ "%1$s unassigned system tag %3$s" : "%1$s poisti järjestelmätunnisteen %3$s",
+ "You created system tag %2$s" : "Loit järjestelmätunnisteen %2$s",
+ "%1$s created system tag %2$s" : "%1$s loi järjestelmätunnisteen %2$s",
+ "You deleted system tag %2$s" : "Poistit järjestelmätunnisteen %2$s",
+ "%1$s deleted system tag %2$s" : "%1$s poisti järjestelmätunnisteen %2$s",
+ "You updated system tag %3$s to %2$s" : "Päivitit järjestelmätunnisteen %3$s tunnisteeksi %2$s",
+ "%1$s updated system tag %3$s to %2$s" : "%1$s päivitti järjestelmätunnisteen %3$s tunnisteeksi %2$s",
+ "You assigned system tag %3$s to %2$s" : "Liitit järjestelmätunnisteen %3$s kohteeseen %2$s",
+ "%1$s assigned system tag %3$s to %2$s" : "%1$s liitti järjestelmätunnisteen %3$s kohteeseen %2$s",
+ "You unassigned system tag %3$s from %2$s" : "Poistit järjestelmätunnisteen %3$s kohteesta %2$s",
+ "%1$s unassigned system tag %3$s from %2$s" : "%1$s poisti järjestelmätunnisteen %3$s kohteesta %2$s",
+ "%s (restricted)" : "%s (rajoitettu)",
"%s (invisible)" : "%s (näkymätön)",
+ "Collaborative tags" : "Yhteistyölliset tunnisteet",
+ "Name" : "Nimi",
+ "Delete" : "Poista",
+ "Public" : "Julkinen",
+ "Restricted" : "Rajoitettu",
+ "Invisible" : "Näkymätön",
+ "Reset" : "Palauta",
"No files in here" : "Täällä ei ole tiedostoja",
"No entries found in this folder" : "Ei kohteita tässä kansiossa",
- "Name" : "Nimi",
"Size" : "Koko",
- "Modified" : "Muokattu"
+ "Modified" : "Muokattu",
+ "%s (not-assignable)" : "%s (ei liitettävissä)"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/apps/updatenotification/l10n/es.js b/apps/updatenotification/l10n/es.js
index ded4d8f1222..8aabb4c6c07 100644
--- a/apps/updatenotification/l10n/es.js
+++ b/apps/updatenotification/l10n/es.js
@@ -2,11 +2,13 @@ OC.L10N.register(
"updatenotification",
{
"Update notifications" : "Actualizar notificaciones",
+ "Could not start updater, please try the manual update" : "No se pudo iniciar el actualizador, por favor inténtalo de forma manual la actualización",
"{version} is available. Get more information on how to update." : "{version} está disponible. Obtenga más información sobre cómo actualizar.",
"Channel updated" : "Canal actualizado",
"Update to %1$s is available." : "Actualización a %1$s esta disponible.",
"Update for %1$s to version %2$s is available." : "La actualización de %1$s a la versión %2$s está disponible.",
"A new version is available: %s" : "Hay una nueva versión disponible: %s",
+ "Open updater" : "Abrir el actualizador",
"Download now" : "Descargar ahora",
"Your version is up to date." : "Su versión está actualizada.",
"Checked on %s" : "Revisado el %s",
diff --git a/apps/updatenotification/l10n/es.json b/apps/updatenotification/l10n/es.json
index c85e1f55557..d6cf3719da8 100644
--- a/apps/updatenotification/l10n/es.json
+++ b/apps/updatenotification/l10n/es.json
@@ -1,10 +1,12 @@
{ "translations": {
"Update notifications" : "Actualizar notificaciones",
+ "Could not start updater, please try the manual update" : "No se pudo iniciar el actualizador, por favor inténtalo de forma manual la actualización",
"{version} is available. Get more information on how to update." : "{version} está disponible. Obtenga más información sobre cómo actualizar.",
"Channel updated" : "Canal actualizado",
"Update to %1$s is available." : "Actualización a %1$s esta disponible.",
"Update for %1$s to version %2$s is available." : "La actualización de %1$s a la versión %2$s está disponible.",
"A new version is available: %s" : "Hay una nueva versión disponible: %s",
+ "Open updater" : "Abrir el actualizador",
"Download now" : "Descargar ahora",
"Your version is up to date." : "Su versión está actualizada.",
"Checked on %s" : "Revisado el %s",
diff --git a/apps/workflowengine/l10n/de.js b/apps/workflowengine/l10n/de.js
index 5101509f86d..f83b164487c 100644
--- a/apps/workflowengine/l10n/de.js
+++ b/apps/workflowengine/l10n/de.js
@@ -14,7 +14,7 @@ OC.L10N.register(
"less or equals" : "weniger oder gleich",
"greater or equals" : "größer oder gleich",
"greater" : "größer",
- "File system tag" : "Datei Zusammenarbeits-Tag",
+ "File system tag" : "Dateisystem-Tag",
"is tagged with" : "ist zugewiesen",
"is not tagged with" : "ist nicht zugewiesen",
"Select tag…" : "Wähle einen Tag…",
@@ -23,16 +23,16 @@ OC.L10N.register(
"does not match IPv4" : "entspricht nicht IPv4",
"matches IPv6" : "entspricht IPv6",
"does not match IPv6" : "entspricht nicht IPv6",
- "Request time" : "Anfrage Zeitpunkt",
+ "Request time" : "Anfrage-Zeitpunkt",
"between" : "zwischen",
"not between" : "nicht zwischen",
"Start" : "Beginn",
"End" : "Ende",
"Select timezone…" : "Wähle eine Zeitzone…",
- "Request URL" : "Anfrage URL",
+ "Request URL" : "Anfrage-URL",
"Predefined URLs" : "Vordefinierte URLs",
"Files WebDAV" : "WebDAV für Dateien",
- "Request user agent" : "Anfrage Benutzeragent",
+ "Request user agent" : "User-Agent",
"Sync clients" : "Sync-Clients",
"Android client" : "Android Client",
"iOS client" : "iOS Client",
@@ -59,7 +59,7 @@ OC.L10N.register(
"Check %s is invalid" : "Check %s ist ungültig",
"Check #%s does not exist" : "Check #%s existiert nicht",
"Workflow" : "Workflow",
- "Open documentation" : "Öffne Dokumentation",
+ "Open documentation" : "Dokumentation öffnen",
"Add rule group" : "Regelgruppe hinzufügen",
"Short rule description" : "Kurze Regelbeschreibung",
"Add rule" : "Regel hinzufügen",
diff --git a/apps/workflowengine/l10n/de.json b/apps/workflowengine/l10n/de.json
index 8a81877f923..afa06aff5e4 100644
--- a/apps/workflowengine/l10n/de.json
+++ b/apps/workflowengine/l10n/de.json
@@ -12,7 +12,7 @@
"less or equals" : "weniger oder gleich",
"greater or equals" : "größer oder gleich",
"greater" : "größer",
- "File system tag" : "Datei Zusammenarbeits-Tag",
+ "File system tag" : "Dateisystem-Tag",
"is tagged with" : "ist zugewiesen",
"is not tagged with" : "ist nicht zugewiesen",
"Select tag…" : "Wähle einen Tag…",
@@ -21,16 +21,16 @@
"does not match IPv4" : "entspricht nicht IPv4",
"matches IPv6" : "entspricht IPv6",
"does not match IPv6" : "entspricht nicht IPv6",
- "Request time" : "Anfrage Zeitpunkt",
+ "Request time" : "Anfrage-Zeitpunkt",
"between" : "zwischen",
"not between" : "nicht zwischen",
"Start" : "Beginn",
"End" : "Ende",
"Select timezone…" : "Wähle eine Zeitzone…",
- "Request URL" : "Anfrage URL",
+ "Request URL" : "Anfrage-URL",
"Predefined URLs" : "Vordefinierte URLs",
"Files WebDAV" : "WebDAV für Dateien",
- "Request user agent" : "Anfrage Benutzeragent",
+ "Request user agent" : "User-Agent",
"Sync clients" : "Sync-Clients",
"Android client" : "Android Client",
"iOS client" : "iOS Client",
@@ -57,7 +57,7 @@
"Check %s is invalid" : "Check %s ist ungültig",
"Check #%s does not exist" : "Check #%s existiert nicht",
"Workflow" : "Workflow",
- "Open documentation" : "Öffne Dokumentation",
+ "Open documentation" : "Dokumentation öffnen",
"Add rule group" : "Regelgruppe hinzufügen",
"Short rule description" : "Kurze Regelbeschreibung",
"Add rule" : "Regel hinzufügen",
diff --git a/apps/workflowengine/l10n/de_DE.js b/apps/workflowengine/l10n/de_DE.js
index 1bd80c12eaf..55e23518b64 100644
--- a/apps/workflowengine/l10n/de_DE.js
+++ b/apps/workflowengine/l10n/de_DE.js
@@ -14,25 +14,25 @@ OC.L10N.register(
"less or equals" : "weniger oder gleich",
"greater or equals" : "größer oder gleich",
"greater" : "größer",
- "File system tag" : "Datei-System-tag",
+ "File system tag" : "Dateisystem-Tag",
"is tagged with" : "hat den Tag",
"is not tagged with" : "hat nicht den Tag",
"Select tag…" : "Wählen Sie einen Tag",
"Request remote address" : "Fordere entfernte Adresse an",
- "matches IPv4" : "passt zu IPv4",
- "does not match IPv4" : "passt nicht zu IPv4",
- "matches IPv6" : "passt zu IPv6",
- "does not match IPv6" : "passt nicht zu IPv6",
- "Request time" : "Anforderungszeit",
+ "matches IPv4" : "entspricht IPv4",
+ "does not match IPv4" : "entspricht nicht IPv4",
+ "matches IPv6" : "entspricht IPv6",
+ "does not match IPv6" : "entspricht nicht IPv6",
+ "Request time" : "Anfrage-Zeitpunkt",
"between" : "zwischen",
"not between" : "nicht zwischen",
"Start" : "Start",
"End" : "Ende",
"Select timezone…" : "Wählen Sie die Zeitzone",
- "Request URL" : "Fordere URL an",
+ "Request URL" : "Anfrage-URL",
"Predefined URLs" : "Vordefinierte URLs",
- "Files WebDAV" : "Dateien WebDAV",
- "Request user agent" : "Benutzeragenten anfordern",
+ "Files WebDAV" : "WebDAV für Dateien",
+ "Request user agent" : "User-Agent",
"Sync clients" : "Sync-Clients",
"Android client" : "Android Client",
"iOS client" : "iOS Client",
@@ -42,7 +42,7 @@ OC.L10N.register(
"is not member of" : "Ist kein Mitglied von",
"The given operator is invalid" : "Der eingegebene Operator ist falsch",
"The given regular expression is invalid" : "Der eingegebene reguläre Ausdruck ist falsch",
- "The given file size is invalid" : "Die eingegebne Dateigröße ist ungültig",
+ "The given file size is invalid" : "Die eingegebene Dateigröße ist ungültig",
"The given tag id is invalid" : "Die eingegebene Tag-ID ist ungültig",
"The given IP range is invalid" : "Der eingegebene IP-Bereich ist falsch",
"The given IP range is not valid for IPv4" : "Der eingegebene IP-Bereich ist für IPv4 ungültig",
@@ -59,7 +59,7 @@ OC.L10N.register(
"Check %s is invalid" : "Prüfe ob %s ungültig ist",
"Check #%s does not exist" : "Prüfe ob #%s nicht existiert",
"Workflow" : "Workflow",
- "Open documentation" : "Öffne Dokumentation",
+ "Open documentation" : "Dokumentation öffnen",
"Add rule group" : "Regelgruppe hinzufügen",
"Short rule description" : "Kurze Regelbeschreibung",
"Add rule" : "Regel hinzufügen",
diff --git a/apps/workflowengine/l10n/de_DE.json b/apps/workflowengine/l10n/de_DE.json
index ace7c8ff6ee..4e44958cf39 100644
--- a/apps/workflowengine/l10n/de_DE.json
+++ b/apps/workflowengine/l10n/de_DE.json
@@ -12,25 +12,25 @@
"less or equals" : "weniger oder gleich",
"greater or equals" : "größer oder gleich",
"greater" : "größer",
- "File system tag" : "Datei-System-tag",
+ "File system tag" : "Dateisystem-Tag",
"is tagged with" : "hat den Tag",
"is not tagged with" : "hat nicht den Tag",
"Select tag…" : "Wählen Sie einen Tag",
"Request remote address" : "Fordere entfernte Adresse an",
- "matches IPv4" : "passt zu IPv4",
- "does not match IPv4" : "passt nicht zu IPv4",
- "matches IPv6" : "passt zu IPv6",
- "does not match IPv6" : "passt nicht zu IPv6",
- "Request time" : "Anforderungszeit",
+ "matches IPv4" : "entspricht IPv4",
+ "does not match IPv4" : "entspricht nicht IPv4",
+ "matches IPv6" : "entspricht IPv6",
+ "does not match IPv6" : "entspricht nicht IPv6",
+ "Request time" : "Anfrage-Zeitpunkt",
"between" : "zwischen",
"not between" : "nicht zwischen",
"Start" : "Start",
"End" : "Ende",
"Select timezone…" : "Wählen Sie die Zeitzone",
- "Request URL" : "Fordere URL an",
+ "Request URL" : "Anfrage-URL",
"Predefined URLs" : "Vordefinierte URLs",
- "Files WebDAV" : "Dateien WebDAV",
- "Request user agent" : "Benutzeragenten anfordern",
+ "Files WebDAV" : "WebDAV für Dateien",
+ "Request user agent" : "User-Agent",
"Sync clients" : "Sync-Clients",
"Android client" : "Android Client",
"iOS client" : "iOS Client",
@@ -40,7 +40,7 @@
"is not member of" : "Ist kein Mitglied von",
"The given operator is invalid" : "Der eingegebene Operator ist falsch",
"The given regular expression is invalid" : "Der eingegebene reguläre Ausdruck ist falsch",
- "The given file size is invalid" : "Die eingegebne Dateigröße ist ungültig",
+ "The given file size is invalid" : "Die eingegebene Dateigröße ist ungültig",
"The given tag id is invalid" : "Die eingegebene Tag-ID ist ungültig",
"The given IP range is invalid" : "Der eingegebene IP-Bereich ist falsch",
"The given IP range is not valid for IPv4" : "Der eingegebene IP-Bereich ist für IPv4 ungültig",
@@ -57,7 +57,7 @@
"Check %s is invalid" : "Prüfe ob %s ungültig ist",
"Check #%s does not exist" : "Prüfe ob #%s nicht existiert",
"Workflow" : "Workflow",
- "Open documentation" : "Öffne Dokumentation",
+ "Open documentation" : "Dokumentation öffnen",
"Add rule group" : "Regelgruppe hinzufügen",
"Short rule description" : "Kurze Regelbeschreibung",
"Add rule" : "Regel hinzufügen",
diff --git a/apps/workflowengine/l10n/es.js b/apps/workflowengine/l10n/es.js
index 6f8a7e7cdae..6624f68b6cb 100644
--- a/apps/workflowengine/l10n/es.js
+++ b/apps/workflowengine/l10n/es.js
@@ -40,12 +40,22 @@ OC.L10N.register(
"is member of" : "es miembro de",
"is not member of" : "no es miembro de",
"The given operator is invalid" : "La operación dada no es valida",
+ "The given regular expression is invalid" : "La expresión regular dada no es valida",
"The given file size is invalid" : "El tamaño de fichero dado no es valido ",
"The given tag id is invalid" : "El id de etiqueta dado no es valido",
"The given IP range is invalid" : "El rango de IPs no es valido",
+ "The given IP range is not valid for IPv4" : "El rango de IP no es valida para IPv4",
+ "The given IP range is not valid for IPv6" : "El rango de IP no es valida para IPv6",
+ "The given start time is invalid" : "La hora de inicio dada no es válida",
"The given end time is invalid" : "El tiempo final no es valido",
+ "The given group does not exist" : "El grupo dado no existe",
+ "Check %s is invalid or does not exist" : "Chequeo %s no es valido o no existe",
+ "Operation #%s does not exist" : "Operación #%s no existe",
"Operation %s does not exist" : "Operación %s no existe",
"Operation %s is invalid" : "Operación %s no es valida",
+ "Check %s does not exist" : "Chequeo %s no existe",
+ "Check %s is invalid" : "Chequeo %s no es valido",
+ "Check #%s does not exist" : "El chequeo #%s no existe",
"Open documentation" : "Documentación abierta",
"Add rule" : "Añadir regla",
"Reset" : "Reiniciar",
diff --git a/apps/workflowengine/l10n/es.json b/apps/workflowengine/l10n/es.json
index 2f6009d846b..8ccc9869320 100644
--- a/apps/workflowengine/l10n/es.json
+++ b/apps/workflowengine/l10n/es.json
@@ -38,12 +38,22 @@
"is member of" : "es miembro de",
"is not member of" : "no es miembro de",
"The given operator is invalid" : "La operación dada no es valida",
+ "The given regular expression is invalid" : "La expresión regular dada no es valida",
"The given file size is invalid" : "El tamaño de fichero dado no es valido ",
"The given tag id is invalid" : "El id de etiqueta dado no es valido",
"The given IP range is invalid" : "El rango de IPs no es valido",
+ "The given IP range is not valid for IPv4" : "El rango de IP no es valida para IPv4",
+ "The given IP range is not valid for IPv6" : "El rango de IP no es valida para IPv6",
+ "The given start time is invalid" : "La hora de inicio dada no es válida",
"The given end time is invalid" : "El tiempo final no es valido",
+ "The given group does not exist" : "El grupo dado no existe",
+ "Check %s is invalid or does not exist" : "Chequeo %s no es valido o no existe",
+ "Operation #%s does not exist" : "Operación #%s no existe",
"Operation %s does not exist" : "Operación %s no existe",
"Operation %s is invalid" : "Operación %s no es valida",
+ "Check %s does not exist" : "Chequeo %s no existe",
+ "Check %s is invalid" : "Chequeo %s no es valido",
+ "Check #%s does not exist" : "El chequeo #%s no existe",
"Open documentation" : "Documentación abierta",
"Add rule" : "Añadir regla",
"Reset" : "Reiniciar",