Skip to content

feat(notifications): add translation activity summary notification#19517

Merged
nijel merged 4 commits into
WeblateOrg:mainfrom
nijel:activity-summary
May 12, 2026
Merged

feat(notifications): add translation activity summary notification#19517
nijel merged 4 commits into
WeblateOrg:mainfrom
nijel:activity-summary

Conversation

@nijel
Copy link
Copy Markdown
Member

@nijel nijel commented May 12, 2026

This allows users to follow activity without being overwhelmed with all the details.

Fixes #13071

@nijel nijel added this to the 2026.5 milestone May 12, 2026
@nijel nijel requested a review from Copilot May 12, 2026 13:13
@nijel nijel self-assigned this May 12, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new digest-only email notification that summarizes translation activity over a period (aimed at making notification emails shorter and more actionable), replacing the previous default weekly “new strings” notification for watched projects.

Changes:

  • Added TranslationActivitySummaryNotification which builds per-translation counts and deep-links into search queries for the relevant activity.
  • Added new mail templates (HTML + subject) for the activity summary digest.
  • Updated defaults, docs, and tests to cover the new notification and the default-notification switch.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
weblate/accounts/notifications.py Adds the new digest-only notification logic and search-link generation.
weblate/templates/mail/translation_activity_summary.html New digest HTML template rendering per-translation activity counts with links.
weblate/templates/mail/translation_activity_summary_subject.txt New digest subject template for the activity summary.
weblate/accounts/data.py Switches the default weekly watched-project digest from NewStringNotificaton to the new summary.
weblate/accounts/tests/test_notifications.py Adds coverage for digest-only frequency and end-to-end weekly digest rendering/links.
docs/user/profile.rst Documents the new notification in the Notifications section.
docs/changes.rst Adds an entry to the changelog for the new notification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/user/profile.rst Outdated
Comment thread weblate/accounts/notifications.py
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
7609 2 7607 675
View the top 2 failed test(s) by shortest run time
weblate.accounts.tests.test_views.ProfileTest::test_watch
Stack Traces | 0.278s run time
self = <weblate.accounts.tests.test_views.ProfileTest testMethod=test_watch>

    def test_watch(self) -> None:
        self.assertEqual(self.user.profile.watched.count(), 0)
        self.assertEqual(self.user.subscription_set.count(), 10)
    
        # Watch project
        self.client.post(reverse("watch", kwargs={"path": self.project.get_url_path()}))
        self.assertEqual(self.user.profile.watched.count(), 1)
        self.assertEqual(
            self.user.subscription_set.filter(project=self.project).count(), 0
        )
    
        # Mute notifications for component
        self.client.post(reverse("mute", kwargs=self.kw_component))
>       self.assertEqual(
            self.user.subscription_set.filter(component=self.component).count(), 20
        )
E       AssertionError: 21 != 20

.../accounts/tests/test_views.py:985: AssertionError
weblate.accounts.tests.test_views.ProfileTest::test_watch_component
Stack Traces | 0.293s run time
self = <weblate.accounts.tests.test_views.ProfileTest testMethod=test_watch_component>

    def test_watch_component(self) -> None:
        self.assertEqual(self.user.profile.watched.count(), 0)
        self.assertEqual(self.user.subscription_set.count(), 10)
    
        # Watch component
        self.client.post(reverse("watch", kwargs=self.kw_component))
        self.assertEqual(self.user.profile.watched.count(), 1)
        # All project notifications should be muted
>       self.assertEqual(
            self.user.subscription_set.filter(project=self.project).count(), 20
        )
E       AssertionError: 21 != 20

.../accounts/tests/test_views.py:1016: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

This allows users to follow activity without being overwhelmed with all
the details.

Fixes WeblateOrg#13071
@nijel nijel force-pushed the activity-summary branch from 9cfa77e to 3e3349e Compare May 12, 2026 14:50
@nijel nijel enabled auto-merge (squash) May 12, 2026 15:31
@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented May 12, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 9 changed May 12, 2026, 7:22 PM

@nijel nijel merged commit 87a6fa1 into WeblateOrg:main May 12, 2026
30 of 32 checks passed
@nijel nijel deleted the activity-summary branch May 12, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More concise notification emails

2 participants