mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
adjust wording of the notification
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
a35d4e7b44
commit
a9671a4dc2
2 changed files with 7 additions and 8 deletions
|
|
@ -93,13 +93,13 @@ class Notifier implements INotifier {
|
|||
$fileName = $nodes[0]->getName();
|
||||
if($isDeletedActor) {
|
||||
$subject = (string) $l->t(
|
||||
'You were mentioned in a comment on "%s" by a now deleted user.',
|
||||
'A (now) deleted user mentioned you in a comment on "%s".',
|
||||
[ $fileName ]
|
||||
);
|
||||
} else {
|
||||
$subject = (string) $l->t(
|
||||
'You were mentioned in a comment on "%s" by %s.',
|
||||
[ $fileName, $displayName ]
|
||||
'%s mentioned you in a comment on "%s".',
|
||||
[ $displayName, $fileName ]
|
||||
);
|
||||
}
|
||||
$notification->setParsedSubject($subject);
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class NotifierTest extends TestCase {
|
|||
public function testPrepareSuccess() {
|
||||
$fileName = 'Gre\'thor.odp';
|
||||
$displayName = 'Huraga';
|
||||
$message = 'You were mentioned in a comment on "Gre\'thor.odp" by Huraga.';
|
||||
$message = 'Hurage mentioned you in a comment on "Gre\'thor.odp".';
|
||||
|
||||
/** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
|
||||
$user = $this->getMockBuilder('OCP\IUser')->getMock();
|
||||
|
|
@ -130,7 +130,7 @@ class NotifierTest extends TestCase {
|
|||
$this->l
|
||||
->expects($this->once())
|
||||
->method('t')
|
||||
->with('You were mentioned in a comment on "%s" by %s.', [$fileName, $displayName])
|
||||
->with('%s mentioned you in a comment on "%s".', [$displayName, $fileName])
|
||||
->willReturn($message);
|
||||
|
||||
$this->l10nFactory
|
||||
|
|
@ -163,8 +163,7 @@ class NotifierTest extends TestCase {
|
|||
|
||||
public function testPrepareSuccessDeletedUser() {
|
||||
$fileName = 'Gre\'thor.odp';
|
||||
$displayName = 'a now deleted user';
|
||||
$message = 'You were mentioned in a comment on "Gre\'thor.odp" by a now deleted user.';
|
||||
$message = 'A (now) deleted user mentioned you in a comment on "Gre\'thor.odp".';
|
||||
|
||||
/** @var Node|\PHPUnit_Framework_MockObject_MockObject */
|
||||
$node = $this->getMockBuilder('OCP\Files\Node')->getMock();
|
||||
|
|
@ -199,7 +198,7 @@ class NotifierTest extends TestCase {
|
|||
$this->l
|
||||
->expects($this->once())
|
||||
->method('t')
|
||||
->with('You were mentioned in a comment on "%s" by a now deleted user.', [ $fileName ])
|
||||
->with('A (now) deleted user mentioned you in a comment on "%s".', [ $fileName ])
|
||||
->willReturn($message);
|
||||
|
||||
$this->l10nFactory
|
||||
|
|
|
|||
Loading…
Reference in a new issue