summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-12-01 11:35:23 +0100
committerJoas Schilling <coding@schilljs.com>2016-12-01 11:35:23 +0100
commitb2f46bfa04fdd6f205fba1a5d4011a9e5c5637dd (patch)
tree17ac8c13c32c6cfc8ceafdf1afba948870561fba /apps
parent23a525a74b38b729eed2dad90d0f6bf41d95216c (diff)
downloadnextcloud-server-b2f46bfa04fdd6f205fba1a5d4011a9e5c5637dd.tar.gz
nextcloud-server-b2f46bfa04fdd6f205fba1a5d4011a9e5c5637dd.zip
Adjust all implementations in the server repo
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/comments/lib/Activity/Provider.php15
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Calendar.php15
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Event.php15
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Todo.php5
-rw-r--r--apps/files/lib/Activity/Provider.php15
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Downloads.php15
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Groups.php15
-rw-r--r--apps/files_sharing/lib/Activity/Providers/PublicLinks.php15
-rw-r--r--apps/files_sharing/lib/Activity/Providers/RemoteShares.php17
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Users.php15
-rw-r--r--apps/sharebymail/lib/Activity.php15
-rw-r--r--apps/systemtags/lib/Activity/Provider.php15
12 files changed, 125 insertions, 47 deletions
diff --git a/apps/comments/lib/Activity/Provider.php b/apps/comments/lib/Activity/Provider.php
index 9035087965c..170b20d7c27 100644
--- a/apps/comments/lib/Activity/Provider.php
+++ b/apps/comments/lib/Activity/Provider.php
@@ -30,9 +30,13 @@ use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class Provider implements IProvider {
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -52,14 +56,14 @@ class Provider implements IProvider {
protected $displayNames = [];
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param ICommentsManager $commentsManager
* @param IUserManager $userManager
* @param IManager $activityManager
*/
- public function __construct(IL10N $l, IURLGenerator $url, ICommentsManager $commentsManager, IUserManager $userManager, IManager $activityManager) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, ICommentsManager $commentsManager, IUserManager $userManager, IManager $activityManager) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->commentsManager = $commentsManager;
$this->userManager = $userManager;
@@ -67,17 +71,20 @@ class Provider implements IProvider {
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'comments') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('comments', $language);
+
if ($event->getSubject() === 'add_comment_subject') {
$this->parseMessage($event);
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/comment.svg')));
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
index 2e2ce5bc27a..d7730da61f4 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
@@ -27,6 +27,7 @@ use OCP\Activity\IManager;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class Calendar extends Base {
@@ -38,6 +39,9 @@ class Calendar extends Base {
const SUBJECT_UNSHARE_USER = 'calendar_user_unshare';
const SUBJECT_UNSHARE_GROUP = 'calendar_group_unshare';
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -51,32 +55,35 @@ class Calendar extends Base {
protected $eventMerger;
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
* @param IUserManager $userManager
* @param IEventMerger $eventMerger
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) {
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) {
parent::__construct($userManager);
- $this->l = $l;
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
$this->eventMerger = $eventMerger;
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('dav', $language);
+
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar-dark.svg')));
if ($event->getSubject() === self::SUBJECT_ADD) {
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
index 11c8d901ac9..daaace6b5be 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
@@ -27,6 +27,7 @@ use OCP\Activity\IManager;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class Event extends Base {
@@ -34,6 +35,9 @@ class Event extends Base {
const SUBJECT_OBJECT_UPDATE = 'object_update';
const SUBJECT_OBJECT_DELETE = 'object_delete';
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -47,32 +51,35 @@ class Event extends Base {
protected $eventMerger;
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
* @param IUserManager $userManager
* @param IEventMerger $eventMerger
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) {
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) {
parent::__construct($userManager);
- $this->l = $l;
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
$this->eventMerger = $eventMerger;
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar_event') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('dav', $language);
+
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'places/calendar-dark.svg')));
if ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_event') {
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
index 43ab9e9c448..747b39ddb7f 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Todo.php
@@ -26,17 +26,20 @@ use OCP\Activity\IEvent;
class Todo extends Event {
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar_todo') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('dav', $language);
+
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/checkmark.svg')));
if ($event->getSubject() === self::SUBJECT_OBJECT_ADD . '_todo') {
diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php
index 863e7644059..92686ec0c36 100644
--- a/apps/files/lib/Activity/Provider.php
+++ b/apps/files/lib/Activity/Provider.php
@@ -29,9 +29,13 @@ use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class Provider implements IProvider {
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -51,14 +55,14 @@ class Provider implements IProvider {
protected $displayNames = [];
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
* @param IUserManager $userManager
* @param IEventMerger $eventMerger
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IEventMerger $eventMerger) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
$this->userManager = $userManager;
@@ -66,17 +70,20 @@ class Provider implements IProvider {
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'files') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('files', $language);
+
if ($this->activityManager->isFormattingFilteredObject()) {
try {
return $this->parseShortVersion($event, $previousEvent);
diff --git a/apps/files_sharing/lib/Activity/Providers/Downloads.php b/apps/files_sharing/lib/Activity/Providers/Downloads.php
index 39e2a846b30..e1a25156441 100644
--- a/apps/files_sharing/lib/Activity/Providers/Downloads.php
+++ b/apps/files_sharing/lib/Activity/Providers/Downloads.php
@@ -26,9 +26,13 @@ use OCP\Activity\IManager;
use OCP\Activity\IProvider;
use OCP\IL10N;
use OCP\IURLGenerator;
+use OCP\L10N\IFactory;
class Downloads implements IProvider {
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -45,28 +49,31 @@ class Downloads implements IProvider {
const SUBJECT_SHARED_FOLDER_BY_EMAIL_DOWNLOADED = 'folder_shared_with_email_downloaded';
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'files_sharing') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('files_sharing', $language);
+
if ($this->activityManager->isFormattingFilteredObject()) {
try {
return $this->parseShortVersion($event);
diff --git a/apps/files_sharing/lib/Activity/Providers/Groups.php b/apps/files_sharing/lib/Activity/Providers/Groups.php
index c42cc1bb59b..326ebba9ef7 100644
--- a/apps/files_sharing/lib/Activity/Providers/Groups.php
+++ b/apps/files_sharing/lib/Activity/Providers/Groups.php
@@ -28,9 +28,13 @@ use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class Groups implements IProvider {
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -53,30 +57,33 @@ class Groups implements IProvider {
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
* @param IUserManager $userManager
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
$this->userManager = $userManager;
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'files_sharing') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('files_sharing', $language);
+
if ($this->activityManager->isFormattingFilteredObject()) {
try {
return $this->parseShortVersion($event);
diff --git a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
index a1c6333a86b..ec8152c5a32 100644
--- a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
+++ b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php
@@ -28,9 +28,13 @@ use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class PublicLinks implements IProvider {
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -55,30 +59,33 @@ class PublicLinks implements IProvider {
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
* @param IUserManager $userManager
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
$this->userManager = $userManager;
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'files_sharing') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('files_sharing', $language);
+
if ($this->activityManager->isFormattingFilteredObject()) {
try {
return $this->parseShortVersion($event);
diff --git a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
index 8760733a261..3ee5d82e932 100644
--- a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
+++ b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
@@ -26,11 +26,13 @@ use OCP\Activity\IManager;
use OCP\Activity\IProvider;
use OCP\IL10N;
use OCP\IURLGenerator;
-use OCP\IUser;
-use OCP\IUserManager;
+use OCP\L10N\IFactory;
class RemoteShares implements IProvider {
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -46,28 +48,31 @@ class RemoteShares implements IProvider {
const SUBJECT_REMOTE_SHARE_UNSHARED = 'remote_share_unshared';
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'files_sharing') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('files_sharing', $language);
+
if ($this->activityManager->isFormattingFilteredObject()) {
try {
return $this->parseShortVersion($event);
diff --git a/apps/files_sharing/lib/Activity/Providers/Users.php b/apps/files_sharing/lib/Activity/Providers/Users.php
index c85452aec06..d85eeadc315 100644
--- a/apps/files_sharing/lib/Activity/Providers/Users.php
+++ b/apps/files_sharing/lib/Activity/Providers/Users.php
@@ -28,9 +28,13 @@ use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class Users implements IProvider {
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -55,30 +59,33 @@ class Users implements IProvider {
const SUBJECT_UNSHARED_BY = 'unshared_by';
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
* @param IUserManager $userManager
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
$this->userManager = $userManager;
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'files_sharing') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('files_sharing', $language);
+
if ($this->activityManager->isFormattingFilteredObject()) {
try {
return $this->parseShortVersion($event);
diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php
index 58ab0a5cdcd..5342d013ade 100644
--- a/apps/sharebymail/lib/Activity.php
+++ b/apps/sharebymail/lib/Activity.php
@@ -29,9 +29,13 @@ use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class Activity implements IProvider {
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -56,14 +60,14 @@ class Activity implements IProvider {
const SUBJECT_SHARED_EMAIL_BY = 'shared_with_email_by';
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
* @param IUserManager $userManager
* @param IContactsManager $contactsManager
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IContactsManager $contactsManager) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IContactsManager $contactsManager) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
$this->userManager = $userManager;
@@ -71,17 +75,20 @@ class Activity implements IProvider {
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'sharebymail') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('sharebymail', $language);
+
if ($this->activityManager->isFormattingFilteredObject()) {
try {
return $this->parseShortVersion($event);
diff --git a/apps/systemtags/lib/Activity/Provider.php b/apps/systemtags/lib/Activity/Provider.php
index 37ede8c3b8f..5ef20c281bd 100644
--- a/apps/systemtags/lib/Activity/Provider.php
+++ b/apps/systemtags/lib/Activity/Provider.php
@@ -28,6 +28,7 @@ use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\L10N\IFactory;
class Provider implements IProvider {
@@ -38,6 +39,9 @@ class Provider implements IProvider {
const ASSIGN_TAG = 'assign_tag';
const UNASSIGN_TAG = 'unassign_tag';
+ /** @var IFactory */
+ protected $languageFactory;
+
/** @var IL10N */
protected $l;
@@ -54,30 +58,33 @@ class Provider implements IProvider {
protected $displayNames = [];
/**
- * @param IL10N $l
+ * @param IFactory $languageFactory
* @param IURLGenerator $url
* @param IManager $activityManager
* @param IUserManager $userManager
*/
- public function __construct(IL10N $l, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) {
- $this->l = $l;
+ public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager) {
+ $this->languageFactory = $languageFactory;
$this->url = $url;
$this->activityManager = $activityManager;
$this->userManager = $userManager;
}
/**
+ * @param string $language
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse(IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, IEvent $previousEvent = null) {
if ($event->getApp() !== 'systemtags') {
throw new \InvalidArgumentException();
}
+ $this->l = $this->languageFactory->get('systemtags', $language);
+
if ($this->activityManager->isFormattingFilteredObject()) {
try {
return $this->parseShortVersion($event);