[PR #4497] [MERGED] Notifications: User language for notification text #6363

Closed
opened 2026-02-05 10:30:21 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/4497
Author: @ssddanbrown
Created: 9/1/2023
Status: Merged
Merged: 9/2/2023
Merged by: @ssddanbrown

Base: developmentHead: notification_language


📝 Commits (3)

  • f91049a Notifications: Add test to check notification language
  • 3847a76 Notifications: Aligned how user language is used
  • a720b37 Testing: Added entity decode flag and phpunit env option

📊 Changes

16 files changed (+159 additions, -120 deletions)

View changed files

📝 app/Activity/Notifications/MessageParts/LinkedMailMessageLine.php (+8 -1)
📝 app/Activity/Notifications/MessageParts/ListMessageLine.php (+11 -1)
📝 app/Activity/Notifications/Messages/BaseActivityNotification.php (+5 -22)
📝 app/Activity/Notifications/Messages/CommentCreationNotification.php (+12 -9)
📝 app/Activity/Notifications/Messages/PageCreationNotification.php (+11 -8)
📝 app/Activity/Notifications/Messages/PageUpdateNotification.php (+12 -9)
📝 app/Notifications/ConfirmEmail.php (+7 -18)
📝 app/Notifications/MailNotification.php (+11 -5)
📝 app/Notifications/ResetPassword.php (+7 -21)
📝 app/Notifications/TestEmail.php (+4 -8)
📝 app/Notifications/UserInvite.php (+5 -13)
📝 app/Translation/LanguageManager.php (+10 -0)
📝 app/Users/Models/User.php (+9 -0)
📝 phpunit.xml (+1 -0)
📝 resources/views/vendor/notifications/email.blade.php (+2 -2)
📝 tests/Activity/WatchTest.php (+44 -3)

📄 Description

For #4480.

Todo

  • Add test case to cover.
  • Update notifications to use user language preference.
  • Test what occurs when a non-expected language preference exists.
  • Test bottom text, that's not controlled in notification class.
    • Check this for user invites (and other existing notifications) too. Likely need to add system in other places to properly pass notifications.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/4497 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 9/1/2023 **Status:** ✅ Merged **Merged:** 9/2/2023 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `development` ← **Head:** `notification_language` --- ### 📝 Commits (3) - [`f91049a`](https://github.com/BookStackApp/BookStack/commit/f91049a3f296a35aafcc6bf6d531910c5e33eea8) Notifications: Add test to check notification language - [`3847a76`](https://github.com/BookStackApp/BookStack/commit/3847a761347f708253e2f5c79b43bfc03d019aba) Notifications: Aligned how user language is used - [`a720b37`](https://github.com/BookStackApp/BookStack/commit/a720b3725de75ab60037aec0394889152a5dca4a) Testing: Added entity decode flag and phpunit env option ### 📊 Changes **16 files changed** (+159 additions, -120 deletions) <details> <summary>View changed files</summary> 📝 `app/Activity/Notifications/MessageParts/LinkedMailMessageLine.php` (+8 -1) 📝 `app/Activity/Notifications/MessageParts/ListMessageLine.php` (+11 -1) 📝 `app/Activity/Notifications/Messages/BaseActivityNotification.php` (+5 -22) 📝 `app/Activity/Notifications/Messages/CommentCreationNotification.php` (+12 -9) 📝 `app/Activity/Notifications/Messages/PageCreationNotification.php` (+11 -8) 📝 `app/Activity/Notifications/Messages/PageUpdateNotification.php` (+12 -9) 📝 `app/Notifications/ConfirmEmail.php` (+7 -18) 📝 `app/Notifications/MailNotification.php` (+11 -5) 📝 `app/Notifications/ResetPassword.php` (+7 -21) 📝 `app/Notifications/TestEmail.php` (+4 -8) 📝 `app/Notifications/UserInvite.php` (+5 -13) 📝 `app/Translation/LanguageManager.php` (+10 -0) 📝 `app/Users/Models/User.php` (+9 -0) 📝 `phpunit.xml` (+1 -0) 📝 `resources/views/vendor/notifications/email.blade.php` (+2 -2) 📝 `tests/Activity/WatchTest.php` (+44 -3) </details> ### 📄 Description For #4480. ### Todo - [x] Add test case to cover. - [x] Update notifications to use user language preference. - [x] Test what occurs when a non-expected language preference exists. - [x] Test bottom text, that's not controlled in notification class. - [x] Check this for user invites (and other existing notifications) too. Likely need to add system in other places to properly pass notifications. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:30:21 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6363