Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remote account activity translation #51216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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

}

$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