Merge pull request #51216 from nextcloud/fix/noid/remote-account-activity-translation

fix: remote account activity translation
pull/51082/head
Sebastian Krupinski 2025-03-07 15:09:37 +07:00 committed by GitHub
commit 49e52c1779
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 5 deletions

@ -25,8 +25,6 @@ use OCP\L10N\IFactory;
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 = [];
@ -59,7 +57,6 @@ class Provider implements IProvider {
}
$this->l = $this->languageFactory->get('files', $language);
$this->activityLang = $this->languageFactory->get('activity', $language);
if ($this->activityManager->isFormattingFilteredObject()) {
try {
@ -114,7 +111,7 @@ class Provider implements IProvider {
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);
@ -232,7 +229,7 @@ class Provider implements IProvider {
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);