Skip to content

Commit

Permalink
Fix translation problem in notifications
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hartmann <[email protected]>
  • Loading branch information
Chartman123 authored and backportbot[bot] committed Dec 6, 2024
1 parent 8132e46 commit d742e50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function getSubjectString(IL10N $l10n, string $subject): string {
return $l10n->t('{user} has shared the form {formTitle} with team {circle}');

case ActivityConstants::SUBJECT_NEWSUBMISSION:
return $l10n->t('{user} answered your form {formTitle}');
return $l10n->t('Your form {formTitle} was answered by {user}');

default:
$this->logger->warning('Some unknown activity has been found: ' . $subject);
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/Activity/ProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ public function testFullParse() {
]);
$event->expects($this->once())
->method('setParsedSubject')
->with('The affected User answered your form SomeChangedNiceFormTitle');
->with('Your form SomeChangedNiceFormTitle was answered by The affected User');
$event->expects($this->once())
->method('setRichSubject')
->with('{user} answered your form {formTitle}', [
->with('Your form {formTitle} was answered by {user}', [
'user' => [
'type' => 'user',
'id' => 'affectedUser',
Expand Down Expand Up @@ -211,7 +211,7 @@ public function dataGetSubjectString() {
['newshare', '{user} has shared the form {formTitle} with you'],
['newgroupshare', '{user} has shared the form {formTitle} with group {group}'],
['newcircleshare', '{user} has shared the form {formTitle} with team {circle}'],
['newsubmission', '{user} answered your form {formTitle}']
['newsubmission', 'Your form {formTitle} was answered by {user}']
];
}
/**
Expand Down

0 comments on commit d742e50

Please sign in to comment.