diff --git a/templates/zerver/emails/followup_day1.source.html b/templates/zerver/emails/followup_day1.source.html index 8a8b15f4e6..997af01587 100644 --- a/templates/zerver/emails/followup_day1.source.html +++ b/templates/zerver/emails/followup_day1.source.html @@ -5,51 +5,55 @@ {% endblock %} {% block content %} -
{{ _('Welcome to Zulip!') }}
- +{% if realm_creation %} +{% if is_demo_org %}- {% if realm_creation %} - {% if is_demo_org %} - {% trans %}You've created a demo Zulip organization. Note that this organization will be automatically deleted in 30 days. Learn more about demo organizations here!{% endtrans %} - {% else %} - {% trans %}You've created the new Zulip organization {{ realm_name }}.{% endtrans %} - {% endif %} - {% else %} - {% trans %}You've joined the Zulip organization {{ realm_name }}.{% endtrans %} - {% endif %} + {% trans demo_organizations_help_link="https://zulip.com/help/demo-organizations" %}Congratulations, you have created a new Zulip demo organization. Note + that this organization will be automatically deleted in 30 days. Learn more + about demo organizations here! + {% endtrans %}
+{% else %} ++ {% trans %}Congratulations, you have created a new Zulip + organization: {{ realm_name }}.{% endtrans %} +
+{% endif %} +{% else %} +{{ _('Welcome to Zulip!') }}
++ {% trans %}You've joined the Zulip organization {{ realm_name }}. + {% endtrans %} +
+{% endif %}- {{ _('Your account details:') }} + {% trans apps_page_link="https://zulip.com/apps" %}You will use the following info to log into the Zulip web, mobile and desktop apps:{% endtrans %}
+ {% trans %}If you are new to Zulip, check out our Getting started guide!{% endtrans %} {% if is_realm_admin %} - {% trans %}Check out our guide for admins, become a Zulip pro with a few keyboard shortcuts, or dive right in!{% endtrans %} - {% else %} - {% trans %}Learn more about Zulip, become a pro with a few keyboard shortcuts, or dive right in!{% endtrans %} + {% trans %}We also have a guide for Setting up your organization.{% endtrans %} {% endif %}
- {{ _("Cheers,") }}
- {{ _("Team Zulip") }}
-
- {% trans %}PS: Follow us on Twitter, star us on GitHub, or chat with us live on the Zulip community server!{% endtrans %} + {% trans support_email=macros.email_tag(support_email) %}Questions? Contact +us any time at {{ support_email }}.{% endtrans %}
{% endblock %} diff --git a/templates/zerver/emails/followup_day1.txt b/templates/zerver/emails/followup_day1.txt index 149244f0ea..c9034d7e23 100644 --- a/templates/zerver/emails/followup_day1.txt +++ b/templates/zerver/emails/followup_day1.txt @@ -2,38 +2,31 @@ {% if realm_creation %} {% if is_demo_org %} - {% trans %}You've created a demo Zulip organization. Note that this organization will be automatically deleted in 30 days. Learn more about demo organizations here: https://zulip.com/help/demo-organizations{% endtrans %} + {% trans demo_organizations_help_link="https://zulip.com/help/demo-organizations" %} Congratulations, you have created a new demo Zulip organization. Note that this organization will be automatically deleted in 30 days. Learn more about demo organizations here: {{ demo_organizations_help_link }}!{% endtrans %} {% else %} - {% trans %}You've created the new Zulip organization {{ realm_name }}.{% endtrans %} + {% trans %}Congratulations, you have created a new Zulip organization: {{ realm_name }}.{% endtrans %} {% endif %} -{% trans %}You've created the new Zulip organization {{ realm_name }}.{% endtrans %} {% else %} {% trans %}You've joined the Zulip organization {{ realm_name }}.{% endtrans %} {% endif %} -{{ _('Your account details:') }} +{% trans apps_page_link="https://zulip.com/apps" %}You will use the following info to log into the Zulip web, mobile and desktop apps ({{ apps_page_link}}):{% endtrans %} + * {% trans organization_url=realm_uri %}Organization URL: {{ organization_url }}{% endtrans %} + {% if ldap %} {% if ldap_username %} -* {% trans %}Username: {{ ldap_username }}{% endtrans %} +* {% trans %}Your username: {{ ldap_username }}{% endtrans %} {% else %} * {{ _('Use your LDAP account to log in') }} {% endif %} {% else %} -* {% trans %}Email: {{ email }}{% endtrans %} +* {% trans %}Your account email: {{ email }}{% endtrans %} {% endif %} -{% trans apps_page_link="https://zulip.com/apps" %}(you'll need these to sign in to the mobile and desktop apps ({{ apps_page_link }})){% endtrans %} +{% trans %}If you are new to Zulip, check out our Getting started guide ({{ getting_user_started_link }})!{% endtrans %} {% if is_realm_admin %} -{% trans %}Check out our guide ({{ getting_started_link }}) for admins, become a Zulip pro with a few keyboard shortcuts ({{ keyboard_shortcuts_link }}), or dive right in to {{ realm_uri }}!{% endtrans %} -{% else %} -{% trans %}Learn more ({{ getting_started_link }}) about Zulip, become a pro with a few keyboard shortcuts ({{ keyboard_shortcuts_link }}), or dive right in to {{ realm_uri }}!{% endtrans %} +{% trans %} We also have a guide for Setting up your organization ({{ getting_organization_started_link }}).{% endtrans %} {% endif %} - - -{{ _("Cheers,") }} -{{ _("Team Zulip") }} - -{% trans %}PS: Check us out on Twitter (@zulip), star us on GitHub (https://github.com/zulip/zulip), or chat with us live on the Zulip community server (https://zulip.com/development-community/)!{% endtrans %} diff --git a/zerver/lib/email_notifications.py b/zerver/lib/email_notifications.py index 9aca51e2b0..9cab928456 100644 --- a/zerver/lib/email_notifications.py +++ b/zerver/lib/email_notifications.py @@ -687,12 +687,11 @@ def enqueue_welcome_emails(user: UserProfile, realm_creation: bool = False) -> N is_realm_admin=user.is_realm_admin, is_demo_org=user.realm.demo_organization_scheduled_deletion_date is not None, ) - if user.is_realm_admin: - context["getting_started_link"] = ( - user.realm.uri + "/help/getting-your-organization-started-with-zulip" - ) - else: - context["getting_started_link"] = "https://zulip.com" + + context["getting_organization_started_link"] = ( + user.realm.uri + "/help/getting-your-organization-started-with-zulip" + ) + context["getting_user_started_link"] = user.realm.uri + "/help/getting-started-with-zulip" # Imported here to avoid import cycles. from zproject.backends import ZulipLDAPAuthBackend, email_belongs_to_ldap diff --git a/zerver/tests/test_email_notifications.py b/zerver/tests/test_email_notifications.py index 9ea8bb645d..496fab74c9 100644 --- a/zerver/tests/test_email_notifications.py +++ b/zerver/tests/test_email_notifications.py @@ -214,7 +214,10 @@ class TestFollowupEmails(ZulipTestCase): email_data = orjson.loads(scheduled_emails[0].data) self.assertEqual(email_data["context"]["email"], self.example_email("hamlet")) self.assertEqual(email_data["context"]["is_realm_admin"], False) - self.assertEqual(email_data["context"]["getting_started_link"], "https://zulip.com") + self.assertEqual( + email_data["context"]["getting_user_started_link"], + "http://zulip.testserver/help/getting-started-with-zulip", + ) self.assertNotIn("ldap_username", email_data["context"]) ScheduledEmail.objects.all().delete() @@ -226,9 +229,13 @@ class TestFollowupEmails(ZulipTestCase): self.assertEqual(email_data["context"]["email"], self.example_email("iago")) self.assertEqual(email_data["context"]["is_realm_admin"], True) self.assertEqual( - email_data["context"]["getting_started_link"], + email_data["context"]["getting_organization_started_link"], "http://zulip.testserver/help/getting-your-organization-started-with-zulip", ) + self.assertEqual( + email_data["context"]["getting_user_started_link"], + "http://zulip.testserver/help/getting-started-with-zulip", + ) self.assertNotIn("ldap_username", email_data["context"]) # See https://zulip.readthedocs.io/en/latest/production/authentication-methods.html#ldap-including-active-directory @@ -350,7 +357,7 @@ class TestFollowupEmails(ZulipTestCase): self.assert_length(outbox, 1) message = outbox[0] - self.assertIn("You've created the new Zulip organization", message.body) + self.assertIn("you have created a new Zulip organization", message.body) self.assertNotIn("demo org", message.body) def test_followup_emails_for_demo_realms(self) -> None: @@ -372,7 +379,7 @@ class TestFollowupEmails(ZulipTestCase): self.assert_length(outbox, 1) message = outbox[0] - self.assertIn("You've created a demo Zulip organization", message.body) + self.assertIn("you have created a new demo Zulip organization", message.body) class TestMissedMessages(ZulipTestCase): diff --git a/zerver/tests/test_i18n.py b/zerver/tests/test_i18n.py index 1a7a819462..ff73ec9ea3 100644 --- a/zerver/tests/test_i18n.py +++ b/zerver/tests/test_i18n.py @@ -69,7 +69,9 @@ class EmailTranslationTestCase(ZulipTestCase): with self.settings(DEVELOPMENT_LOG_EMAILS=True): enqueue_welcome_emails(hamlet) - check_translation("Viele Grüße", "") + # TODO: Uncomment and replace with translation once we have German translations for the strings + # in followup_day1 emails. + # check_translation("Viele Grüße", "") class TranslationTestCase(ZulipTestCase):