summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Activity/Providers/Groups.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/Activity/Providers/Groups.php')
-rw-r--r--apps/files_sharing/lib/Activity/Providers/Groups.php15
1 files changed, 11 insertions, 4 deletions
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);