forked from mozilla/pontoon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use full URLs in notifications (mozilla#3468)
Some notification types (suggestions available for review, suggestions have been reviewed and new contributor has joined the team) use relative URLs. That means they won't work in emails. This patch fixes that. It also: * Moves notification content from multiline strings to HTML templates. * Moves management commands for sending notifications to the messaging module. * Moves notification template files to the messaging module.
- Loading branch information
Showing
10 changed files
with
73 additions
and
74 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
pontoon/messaging/templates/messaging/notifications/new_contributor.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<a href="{{ full_url('pontoon.contributors.contributor.username', user.username) }}">{{ user.name_or_email }}</a> has | ||
made their first contribution to <a href="{{ full_url('pontoon.teams.team', locale.code) }}">{{ locale.name }} ({{ | ||
locale.code }})</a>. | ||
|
||
Please welcome them to the team, and make sure to <a | ||
href="{{ full_url('pontoon.translate', locale.code, project.slug, entity.resource.path) }}?string={{ entity.pk }}">review | ||
their suggestions</a>. |
11 changes: 11 additions & 0 deletions
11
pontoon/messaging/templates/messaging/notifications/suggestions_reviewed.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Your suggestions have been reviewed: | ||
<ul> | ||
{% for notification in notifications %} | ||
{% set locale = notification.locale %} | ||
{% set project = notification.project %} | ||
{% set ids = notification.ids %} | ||
{% set msg = notification.msg %} | ||
<li><a href="{{ full_url('pontoon.translate', locale.code, project.slug, 'all-resources') }}?list={{ ids }}">{{ | ||
project.name }} ({{ locale.code }})</a>: {{ msg }}</a></li> | ||
{% endfor %} | ||
</ul> |
11 changes: 11 additions & 0 deletions
11
pontoon/messaging/templates/messaging/notifications/suggestions_submitted.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Unreviewed suggestions have been submitted for the following projects: | ||
<ul> | ||
{% for project_locale in project_locales %} | ||
<li> | ||
<a | ||
href="{{ full_url('pontoon.translate', project_locale.locale.code, project_locale.project.slug, 'all-resources') }}?status=unreviewed">{{ | ||
project_locale.project.name }} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> |
Empty file.
Empty file.
6 changes: 0 additions & 6 deletions
6
pontoon/projects/templates/projects/suggestion_notification.jinja
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters