Skip to content

Commit

Permalink
fix:remote account activity translation
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski authored and backportbot[bot] committed Mar 7, 2025
1 parent d4027ab commit 17b9a79
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/files/lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class Provider implements IProvider {

/** @var IL10N */
protected $l;
/** @var IL10N */
protected $activityLang;

/** @var IURLGenerator */
protected $url;
Expand Down Expand Up @@ -88,7 +86,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 @@ -143,7 +140,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);
}

$this->setSubjects($event, $subject, $parsedParameters);
Expand Down Expand Up @@ -261,7 +258,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

0 comments on commit 17b9a79

Please sign in to comment.