mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-24 23:11:33 +01:00
Improve notification description
This commit is contained in:
parent
8ff61b4517
commit
2910fcc1a4
@ -327,24 +327,24 @@ class NotificationType(enum.Enum):
|
|||||||
return self.name.lower()
|
return self.name.lower()
|
||||||
|
|
||||||
def get_description(self):
|
def get_description(self):
|
||||||
if self == NotificationType.OTHER:
|
if self == NotificationType.PACKAGE_EDIT:
|
||||||
return "Minor notifications not important enough for a dedicated category."
|
|
||||||
elif self == NotificationType.PACKAGE_EDIT:
|
|
||||||
return "When another user edits your packages, releases, etc."
|
return "When another user edits your packages, releases, etc."
|
||||||
elif self == NotificationType.PACKAGE_APPROVAL:
|
elif self == NotificationType.PACKAGE_APPROVAL:
|
||||||
return "Notifications from editors related to the package approval process."
|
return "Notifications from editors related to the package approval process."
|
||||||
elif self == NotificationType.NEW_THREAD:
|
elif self == NotificationType.NEW_THREAD:
|
||||||
return "When a thread is created on your package."
|
return "When a thread is created on your package."
|
||||||
elif self == NotificationType.NEW_REVIEW:
|
elif self == NotificationType.NEW_REVIEW:
|
||||||
return "When a user posts a review."
|
return "When a user posts a review on your package."
|
||||||
elif self == NotificationType.THREAD_REPLY:
|
elif self == NotificationType.THREAD_REPLY:
|
||||||
return "When someone replies to a thread you're watching."
|
return "When someone replies to a thread you're watching."
|
||||||
elif self == NotificationType.MAINTAINER:
|
elif self == NotificationType.MAINTAINER:
|
||||||
return "When your package's maintainers change."
|
return "When your package's maintainers change."
|
||||||
elif self == NotificationType.EDITOR_ALERT:
|
elif self == NotificationType.EDITOR_ALERT:
|
||||||
return "Important editor alerts."
|
return "For editors: Important alerts."
|
||||||
elif self == NotificationType.EDITOR_MISC:
|
elif self == NotificationType.EDITOR_MISC:
|
||||||
return "Miscellaneous editor alerts."
|
return "For editors: Minor notifications, including new threads."
|
||||||
|
elif self == NotificationType.OTHER:
|
||||||
|
return "Minor notifications not important enough for a dedicated category."
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
@ -2,17 +2,18 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2 style="margin-top: 0;">
|
<h2 style="margin-top: 0;">
|
||||||
{% if notification.package %}
|
{{ notification.title }}
|
||||||
{{ _("New notification on package %(package)s", package=notification.package.title) }}
|
|
||||||
{% else %}
|
|
||||||
{{ _("New notification") }}
|
|
||||||
{% endif %}
|
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p><small>{{ _("Triggered by %(username)s", username=notification.causer.display_name) }}</small></p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{{ notification.title }}
|
{% if notification.package %}
|
||||||
|
{{ _("From %(username)s and on package %(package)s.",
|
||||||
|
username=notification.causer.display_name, package=notification.package.title) }}
|
||||||
|
{% else %}
|
||||||
|
{{ _("From %(username)s.", username=notification.causer.display_name) }}
|
||||||
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -33,5 +34,7 @@
|
|||||||
|
|
|
|
||||||
<a href="{{ abs_url_for('users.unsubscribe', token=sub.token) }}">
|
<a href="{{ abs_url_for('users.unsubscribe', token=sub.token) }}">
|
||||||
{{ _("Unsubscribe") }}
|
{{ _("Unsubscribe") }}
|
||||||
</a>
|
</a> <br>
|
||||||
|
|
||||||
|
{{ _("This is a '%(type)s' notification.", type=notification.type.getTitle()) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user