Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

email_notifications: Add ``realm_name`` to email notifications.

khanhdqbb8365ab361a
diff --git a/templates/zerver/emails/missed_message.source.html b/templates/zerver/emails/missed_message.source.html
index 938bb3df7d9..a5e7d9a7802 100644
--- a/templates/zerver/emails/missed_message.source.html
+++ b/templates/zerver/emails/missed_message.source.html
@@ -35,11 +35,11 @@
{% trans %}You are receiving this because you have email notifications enabled for #{{ stream_name }}.{% endtrans %}<br />
{% endif %}
{% if reply_to_zulip %}
- {% trans notif_url=realm_uri + "/#settings/notifications" %}Reply to this email directly, <a href="{{ narrow_url }}">view it in Zulip</a>, or <a href="{{ notif_url }}">manage email preferences</a>.{% endtrans %}
+ {% trans notif_url=realm_uri + "/#settings/notifications" %}Reply to this email directly, <a href="{{ narrow_url }}">view it in {{ realm_name }} Zulip</a>, or <a href="{{ notif_url }}">manage email preferences</a>.{% endtrans %}
{% elif not show_message_content %}
- {% trans notif_url=realm_uri + "/#settings/notifications" %}<a href="{{ narrow_url }}">View or reply in Zulip</a>, or <a href="{{ notif_url }}">manage email preferences</a>.{% endtrans %} <br />
+ {% trans notif_url=realm_uri + "/#settings/notifications" %}<a href="{{ narrow_url }}">View or reply in {{ realm_name }} Zulip</a>, or <a href="{{ notif_url }}">manage email preferences</a>.{% endtrans %} <br />
{% else %}
- {% trans notif_url=realm_uri + "/#settings/notifications" %}<a href="{{ narrow_url }}">Reply in Zulip</a>, or <a href="{{ notif_url }}">manage email preferences</a>.{% endtrans %} <br />
+ {% trans notif_url=realm_uri + "/#settings/notifications" %}<a href="{{ narrow_url }}">Reply in {{ realm_name }} Zulip</a>, or <a href="{{ notif_url }}">manage email preferences</a>.{% endtrans %} <br />
<br />
{% trans url="https://zulip.readthedocs.io/en/latest/production/email-gateway.html" %}
Do not reply to this email. This Zulip server is not configured to accept incoming emails (<a href="{{ url }}">help</a>).
diff --git a/templates/zerver/emails/missed_message.txt b/templates/zerver/emails/missed_message.txt
index 861f090205c..2aad26d0f85 100644
--- a/templates/zerver/emails/missed_message.txt
+++ b/templates/zerver/emails/missed_message.txt
@@ -32,15 +32,15 @@ See {{ alert_notif_url }} for more details.
{% endif %}
{% if reply_to_zulip %}
-{% trans %}Reply to this email directly, or view it in Zulip:{% endtrans %}
+{% trans %}Reply to this email directly, or view it in {{ realm_name }} Zulip:{% endtrans %}
{{ narrow_url }}
{% elif not show_message_content %}
-{% trans %}View or reply in Zulip:{% endtrans %}
+{% trans %}View or reply in {{ realm_name }} Zulip:{% endtrans %}
{{ narrow_url }}
{% else %}
-{% trans %}Reply in Zulip:{% endtrans %}
+{% trans %}Reply in {{ realm_name }} Zulip:{% endtrans %}
{{ narrow_url }}
diff --git a/zerver/tests/test_email_notifications.py b/zerver/tests/test_email_notifications.py
index e3e146452c8..9cee153d684 100644
--- a/zerver/tests/test_email_notifications.py
+++ b/zerver/tests/test_email_notifications.py
@@ -527,7 +527,7 @@ class TestMissedMessages(ZulipTestCase):
verify_body_include = [
"This email does not include message content because you have disabled message ",
"http://zulip.testserver/help/pm-mention-alert-notifications ",
- "View or reply in Zulip",
+ "View or reply in Zulip Dev Zulip",
" Manage email preferences: http://zulip.testserver/#settings/notifications",
]
@@ -538,7 +538,7 @@ class TestMissedMessages(ZulipTestCase):
"1 2 3 4 5 6 7 8 9 10 @**King Hamlet**",
"private",
"group",
- "Reply to this email directly, or view it in Zulip",
+ "Reply to this email directly, or view it in Zulip Dev Zulip",
]
self._test_cases(
msg_id,
@@ -570,7 +570,7 @@ class TestMissedMessages(ZulipTestCase):
verify_body_include = [
"This email does not include message content because you have disabled message ",
"http://zulip.testserver/help/pm-mention-alert-notifications ",
- "View or reply in Zulip",
+ "View or reply in Zulip Dev Zulip",
" Manage email preferences: http://zulip.testserver/#settings/notifications",
]
email_subject = "New messages"
@@ -580,7 +580,7 @@ class TestMissedMessages(ZulipTestCase):
"1 2 3 4 5 @**all**",
"private",
"group",
- "Reply to this email directly, or view it in Zulip",
+ "Reply to this email directly, or view it in Zulip Dev Zulip",
]
self._test_cases(
msg_id,
@@ -648,14 +648,14 @@ class TestMissedMessages(ZulipTestCase):
verify_body_include = [
"This email does not include message content because your organization has disabled",
"http://zulip.testserver/help/hide-message-content-in-emails",
- "View or reply in Zulip",
+ "View or reply in Zulip Dev Zulip",
" Manage email preferences: http://zulip.testserver/#settings/notifications",
]
elif message_content_disabled_by_user:
verify_body_include = [
"This email does not include message content because you have disabled message ",
"http://zulip.testserver/help/pm-mention-alert-notifications ",
- "View or reply in Zulip",
+ "View or reply in Zulip Dev Zulip",
" Manage email preferences: http://zulip.testserver/#settings/notifications",
]
email_subject = "New messages"
@@ -664,7 +664,7 @@ class TestMissedMessages(ZulipTestCase):
"Extremely personal message!",
"mentioned",
"group",
- "Reply to this email directly, or view it in Zulip",
+ "Reply to this email directly, or view it in Zulip Dev Zulip",
]
self._test_cases(
msg_id,
@@ -681,7 +681,7 @@ class TestMissedMessages(ZulipTestCase):
self.example_user("hamlet"),
"Extremely personal message!",
)
- verify_body_include = ["Reply to this email directly, or view it in Zulip"]
+ verify_body_include = ["Reply to this email directly, or view it in Zulip Dev Zulip"]
email_subject = "PMs with Othello, the Moor of Venice"
self._test_cases(msg_id, verify_body_include, email_subject, send_as_user)
@@ -717,7 +717,7 @@ class TestMissedMessages(ZulipTestCase):
verify_body_include = [
"This email does not include message content because you have disabled message ",
"http://zulip.testserver/help/pm-mention-alert-notifications ",
- "View or reply in Zulip",
+ "View or reply in Zulip Dev Zulip",
" Manage email preferences: http://zulip.testserver/#settings/notifications",
]
email_subject = "New messages"
@@ -726,7 +726,7 @@ class TestMissedMessages(ZulipTestCase):
"Othello, the Moor of Venice Othello, the Moor of Venice",
"Group personal message!",
"mentioned",
- "Reply to this email directly, or view it in Zulip",
+ "Reply to this email directly, or view it in Zulip Dev Zulip",
]
self._test_cases(
msg_id,
@@ -1519,7 +1519,7 @@ class TestMissedMessages(ZulipTestCase):
self.example_user("hamlet"),
"```\n```",
)
- verify_body_include = ["view it in Zulip"]
+ verify_body_include = ["view it in Zulip Dev Zulip"]
email_subject = "PMs with Othello, the Moor of Venice"
self._test_cases(
msg_id, verify_body_include, email_subject, send_as_user=False, verify_html_body=True