diff options
author | Joas Schilling <coding@schilljs.com> | 2020-08-03 11:23:53 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-08-06 12:43:47 +0200 |
commit | f21361770418cc7d5246ef4d380b3619f7725b9a (patch) | |
tree | 89eea1ffe6ddc782e809ca6338477b5f6f0e9ab7 | |
parent | c6becac993d04f6e8e3ebe2009967b8c4528ade3 (diff) | |
download | nextcloud-server-f21361770418cc7d5246ef4d380b3619f7725b9a.tar.gz nextcloud-server-f21361770418cc7d5246ef4d380b3619f7725b9a.zip |
Fix missing placeholders in translations
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | apps/federatedfilesharing/lib/Notifier.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/apps/federatedfilesharing/lib/Notifier.php b/apps/federatedfilesharing/lib/Notifier.php index 42a07abb38a..0098d82d5c4 100644 --- a/apps/federatedfilesharing/lib/Notifier.php +++ b/apps/federatedfilesharing/lib/Notifier.php @@ -102,13 +102,15 @@ class Notifier implements INotifier { $params = $notification->getSubjectParameters(); if ($params[0] !== $params[1] && $params[1] !== null) { + $remoteInitiator = $this->createRemoteUser($params[0]); + $remoteOwner = $this->createRemoteUser($params[1]); + $params[3] = $remoteInitiator['name'] . '@' . $remoteInitiator['server']; + $params[4] = $remoteOwner['name'] . '@' . $remoteOwner['server']; + $notification->setParsedSubject( $l->t('You received "%3$s" as a remote share from %4$s (%1$s) (on behalf of %5$s (%2$s))', $params) ); - $initiator = $params[0]; - $owner = $params[1]; - $notification->setRichSubject( $l->t('You received {share} as a remote share from {user} (on behalf of {behalf})'), [ @@ -117,16 +119,18 @@ class Notifier implements INotifier { 'id' => $notification->getObjectId(), 'name' => $params[2], ], - 'user' => $this->createRemoteUser($initiator), - 'behalf' => $this->createRemoteUser($owner), + 'user' => $remoteInitiator, + 'behalf' => $remoteOwner, ] ); } else { + $remoteOwner = $this->createRemoteUser($params[0]); + $params[3] = $remoteOwner['name'] . '@' . $remoteOwner['server']; + $notification->setParsedSubject( $l->t('You received "%3$s" as a remote share from %4$s (%1$s)', $params) ); - $owner = $params[0]; $notification->setRichSubject( $l->t('You received {share} as a remote share from {user}'), @@ -136,7 +140,7 @@ class Notifier implements INotifier { 'id' => $notification->getObjectId(), 'name' => $params[2], ], - 'user' => $this->createRemoteUser($owner), + 'user' => $remoteOwner, ] ); } |