Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions apps/files/lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
class Provider implements IProvider {
/** @var IL10N */
protected $l;
/** @var IL10N */
protected $activityLang;

/** @var string[] cached displayNames - key is the cloud id and value the displayname */
protected $displayNames = [];
Expand Down Expand Up @@ -59,7 +57,6 @@ public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
}

$this->l = $this->languageFactory->get('files', $language);
$this->activityLang = $this->languageFactory->get('activity', $language);

if ($this->activityManager->isFormattingFilteredObject()) {
try {
Expand Down Expand Up @@ -114,7 +111,7 @@ public function parseShortVersion(IEvent $event, ?IEvent $previousEvent = null):

if (!isset($parsedParameters['user'])) {
// External user via public link share
$subject = str_replace('{user}', $this->activityLang->t('"remote account"'), $subject);
$subject = str_replace('{user}', $this->l->t('"remote account"'), $subject);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickvergessen could you please check if this is fine? activityLang was introduced in #4969

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine, I guess (2016) we tried to avoid translating it twice.

}

$this->setSubjects($event, $subject, $parsedParameters);
Expand Down Expand Up @@ -232,7 +229,7 @@ public function parseLongVersion(IEvent $event, ?IEvent $previousEvent = null):

if (!isset($parsedParameters['user'])) {
// External user via public link share
$subject = str_replace('{user}', $this->activityLang->t('"remote account"'), $subject);
$subject = str_replace('{user}', $this->l->t('"remote account"'), $subject);
}

$this->setSubjects($event, $subject, $parsedParameters);
Expand Down
Loading