-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Compute notification parsed subject from rich subject when possible #34807
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
Conversation
|
Could you please elaborate on the problem and the solution? :) |
| if ($subjectParameters['actor'] === $this->activityManager->getCurrentUserId()) { | ||
| $event->setParsedSubject($this->l->t('You commented')) | ||
| ->setRichSubject($this->l->t('You commented'), []); | ||
| $event->setRichSubject($this->l->t('You commented'), []); |
Check notice
Code scanning / Psalm
PossiblyNullReference
| ->setRichSubject($this->l->t('{author} commented'), [ | ||
| 'author' => $author, | ||
| ]); | ||
| $event->setRichSubject($this->l->t('{author} commented'), [ |
Check notice
Code scanning / Psalm
PossiblyNullReference
Both activity event and notification expects applications to give both a rich subject and a parsed subject, and same thing for message. Also, when doing this: Two strings are created for translators to translate, while they contain the same translatable text. This PR attempts to remove the duplicated code and strings by providing a suitable fallback in notification and activity event directly. |
|
(putting this back to developing, I’ll look into Joas feedback and special cases next week) |
|
/rebase |
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
…ect is able to do it Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
5ce21e5 to
8a04bf5
Compare
Signed-off-by: Côme Chilliet <[email protected]>
|
@CarlSchwan @ChristophWurst @miaulalala I need a codeowner approval here 🙏 |
ChristophWurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤞
|
Signed-off-by: Côme Chilliet <[email protected]>
|
hello @come-nc , |
Let’s avoid duplicated code and translation strings and ease application developpers lives.