Skip to content

Commit dc119d3

Browse files
committed
chore: rely on notification global language
1 parent 0bbcd67 commit dc119d3

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

classes/ColdTrick/Questions/Notifications/CorrectAnswerHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class CorrectAnswerHandler extends NotificationEventHandler {
1313
* {@inheritdoc}
1414
*/
1515
protected function getNotificationSubject(\ElggUser $recipient, string $method): string {
16-
return elgg_echo('questions:notifications:answer:correct:subject', [$this->getQuestion()->getDisplayName()], $recipient->getLanguage());
16+
return elgg_echo('questions:notifications:answer:correct:subject', [$this->getQuestion()->getDisplayName()]);
1717
}
1818

1919
/**
2020
* {@inheritdoc}
2121
*/
2222
protected function getNotificationSummary(\ElggUser $recipient, string $method): string {
23-
return elgg_echo('questions:notifications:answer:correct:summary', [$this->getQuestion()->getDisplayName()], $recipient->getLanguage());
23+
return elgg_echo('questions:notifications:answer:correct:summary', [$this->getQuestion()->getDisplayName()]);
2424
}
2525

2626
/**
@@ -32,7 +32,7 @@ protected function getNotificationBody(\ElggUser $recipient, string $method): st
3232
$this->getQuestion()->getDisplayName(),
3333
$this->event->getObject()->description,
3434
$this->event->getObject()->getURL(),
35-
], $recipient->getLanguage());
35+
]);
3636
}
3737

3838
/**

classes/ColdTrick/Questions/Notifications/CreateAnswerHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ class CreateAnswerHandler extends NotificationEventHandler {
1313
* {@inheritdoc}
1414
*/
1515
protected function getNotificationSubject(\ElggUser $recipient, string $method): string {
16-
return elgg_echo('questions:notifications:answer:create:subject', [$this->getQuestion()->getDisplayName()], $recipient->getLanguage());
16+
return elgg_echo('questions:notifications:answer:create:subject', [$this->getQuestion()->getDisplayName()]);
1717
}
1818

1919
/**
2020
* {@inheritdoc}
2121
*/
2222
protected function getNotificationSummary(\ElggUser $recipient, string $method): string {
23-
return elgg_echo('questions:notifications:answer:create:summary', [$this->getQuestion()->getDisplayName()], $recipient->getLanguage());
23+
return elgg_echo('questions:notifications:answer:create:summary', [$this->getQuestion()->getDisplayName()]);
2424
}
2525

2626
/**
@@ -32,7 +32,7 @@ protected function getNotificationBody(\ElggUser $recipient, string $method): st
3232
$this->getQuestion()->getDisplayName(),
3333
$this->event->getObject()->description,
3434
$this->event->getObject()->getURL(),
35-
], $recipient->getLanguage());
35+
]);
3636
}
3737

3838
/**

classes/ColdTrick/Questions/Notifications/CreateQuestionHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ public function getSubscriptions(): array {
6868
* {@inheritdoc}
6969
*/
7070
protected function getNotificationSubject(\ElggUser $recipient, string $method): string {
71-
return elgg_echo('questions:notifications:create:subject', [], $recipient->getLanguage());
71+
return elgg_echo('questions:notifications:create:subject');
7272
}
7373

7474
/**
7575
* {@inheritdoc}
7676
*/
7777
protected function getNotificationSummary(\ElggUser $recipient, string $method): string {
78-
return elgg_echo('questions:notifications:create:summary', [], $recipient->getLanguage());
78+
return elgg_echo('questions:notifications:create:summary');
7979
}
8080

8181
/**
@@ -85,7 +85,7 @@ protected function getNotificationBody(\ElggUser $recipient, string $method): st
8585
return elgg_echo('questions:notifications:create:message', [
8686
$this->getQuestion()->getDisplayName(),
8787
$this->getQuestion()->getURL(),
88-
], $recipient->getLanguage());
88+
]);
8989
}
9090

9191
/**

classes/ColdTrick/Questions/Notifications/MoveQuestionHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ public function getSubscriptions(): array {
6363
* {@inheritdoc}
6464
*/
6565
protected function getNotificationSubject(\ElggUser $recipient, string $method): string {
66-
return elgg_echo('questions:notifications:move:subject', [], $recipient->getLanguage());
66+
return elgg_echo('questions:notifications:move:subject');
6767
}
6868

6969
/**
7070
* {@inheritdoc}
7171
*/
7272
protected function getNotificationSummary(\ElggUser $recipient, string $method): string {
73-
return elgg_echo('questions:notifications:move:summary', [], $recipient->getLanguage());
73+
return elgg_echo('questions:notifications:move:summary');
7474
}
7575

7676
/**
@@ -80,7 +80,7 @@ protected function getNotificationBody(\ElggUser $recipient, string $method): st
8080
return elgg_echo('questions:notifications:move:message', [
8181
$this->getQuestion()->getDisplayName(),
8282
$this->getQuestion()->getURL(),
83-
], $recipient->getLanguage());
83+
]);
8484
}
8585

8686
/**

0 commit comments

Comments
 (0)