Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix translation problem in notifications #2447

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading