From 93262e03ad10269ce4057d07c974c050e65b1f6b Mon Sep 17 00:00:00 2001 From: Vector73 Date: Thu, 9 May 2024 16:58:39 +0530 Subject: [PATCH] emails: Replace occurrences of uri with url in email templates. This commit replaces occurrences of realm_uri with realm_url in email templates and other related backend files. Co-authored-by: Junyao Chen --- locale/de/LC_MESSAGES/django.po | 12 ++++++------ templates/zerver/emails/account_registered.html | 4 ++-- templates/zerver/emails/account_registered.txt | 2 +- .../emails/confirm_demo_organization_email.html | 2 +- .../emails/confirm_demo_organization_email.txt | 2 +- templates/zerver/emails/confirm_new_email.html | 2 +- templates/zerver/emails/confirm_new_email.txt | 2 +- templates/zerver/emails/custom_email_base.pre.html | 2 +- templates/zerver/emails/deactivate.html | 2 +- templates/zerver/emails/deactivate.txt | 2 +- templates/zerver/emails/digest.html | 4 ++-- templates/zerver/emails/digest.txt | 4 ++-- templates/zerver/emails/missed_message.html | 10 +++++----- templates/zerver/emails/missed_message.txt | 6 +++--- templates/zerver/emails/notify_new_login.html | 8 ++++---- templates/zerver/emails/notify_new_login.txt | 4 ++-- templates/zerver/emails/onboarding_zulip_topics.html | 2 +- templates/zerver/emails/onboarding_zulip_topics.txt | 2 +- templates/zerver/emails/password_reset.html | 4 ++-- templates/zerver/emails/password_reset.txt | 6 +++--- templates/zerver/emails/realm_reactivation.html | 2 +- templates/zerver/emails/realm_reactivation.txt | 2 +- version.py | 2 +- zerver/actions/realm_settings.py | 2 +- zerver/context_processors.py | 2 +- zerver/forms.py | 2 +- zerver/lib/send_email.py | 2 +- .../management/commands/send_password_reset_email.py | 2 +- zerver/tests/test_signup.py | 2 +- zerver/views/users.py | 2 +- 30 files changed, 51 insertions(+), 51 deletions(-) diff --git a/locale/de/LC_MESSAGES/django.po b/locale/de/LC_MESSAGES/django.po index 1d35e351c6..65438bdb73 100644 --- a/locale/de/LC_MESSAGES/django.po +++ b/locale/de/LC_MESSAGES/django.po @@ -1920,9 +1920,9 @@ msgstr "Hallo," #, python-format msgid "" "We received a request to add the email address %(new_email)s to your Zulip " -"demo organization account on %(realm_uri)s. To confirm this update and set a" +"demo organization account on %(realm_url)s. To confirm this update and set a" " password for this account, please click below:" -msgstr "Wir haben eine Anfrage erhalten, die E-Mail-Adresse %(new_email)s zu deinem Zulip-Demo-Organisationskonto auf %(realm_uri)s hinzuzufügen. Um diese Änderung zu bestätigen und ein Passwort für dieses Konto festzulegen, klicke bitte unten:" +msgstr "Wir haben eine Anfrage erhalten, die E-Mail-Adresse %(new_email)s zu deinem Zulip-Demo-Organisationskonto auf %(realm_url)s hinzuzufügen. Um diese Änderung zu bestätigen und ein Passwort für dieses Konto festzulegen, klicke bitte unten:" #: templates/zerver/emails/confirm_demo_organization_email.html:11 msgid "Confirm and set password" @@ -1953,9 +1953,9 @@ msgstr "Falls du diese Änderung nicht vorgenommen hast, kontaktiere uns bitte s #, python-format msgid "" "We received a request to change the email address for the Zulip account on " -"%(realm_uri)s from %(old_email)s to %(new_email)s. To confirm this change, " +"%(realm_url)s from %(old_email)s to %(new_email)s. To confirm this change, " "please click below:" -msgstr "Wir haben eine Anfrage erhalten, die E-Mail-Adresse für den Zulip-Account auf %(realm_uri)s von %(old_email)s zu %(new_email)s zu ändern. Falls du diese Änderung bestätigen möchtest, klicke bitte hier unten: " +msgstr "Wir haben eine Anfrage erhalten, die E-Mail-Adresse für den Zulip-Account auf %(realm_url)s von %(old_email)s zu %(new_email)s zu ändern. Falls du diese Änderung bestätigen möchtest, klicke bitte hier unten: " #: templates/zerver/emails/confirm_new_email.html:11 msgid "Confirm email change" @@ -2775,8 +2775,8 @@ msgstr "" #, python-format msgid "" "Somebody (possibly you) requested a new password for the Zulip account " -"%(email)s on %(realm_uri)s." -msgstr "Jemand (möglicherweise du selbst) hat ein neues Passwort für dein Zulip-Konto %(email)s bei %(realm_uri)s angefordert." +"%(email)s on %(realm_url)s." +msgstr "Jemand (möglicherweise du selbst) hat ein neues Passwort für dein Zulip-Konto %(email)s bei %(realm_url)s angefordert." #: templates/zerver/emails/password_reset.html:13 msgid "Click the button below to reset your password." diff --git a/templates/zerver/emails/account_registered.html b/templates/zerver/emails/account_registered.html index eb22215d37..6dcc4ec232 100644 --- a/templates/zerver/emails/account_registered.html +++ b/templates/zerver/emails/account_registered.html @@ -31,7 +31,7 @@

{% 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 %}

- {{ _('Go to organization') }} + {{ _('Go to organization') }}

diff --git a/templates/zerver/emails/account_registered.txt b/templates/zerver/emails/account_registered.txt index 19a210c34d..c505e3323a 100644 --- a/templates/zerver/emails/account_registered.txt +++ b/templates/zerver/emails/account_registered.txt @@ -13,7 +13,7 @@ {% 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 %} +* {% trans organization_url=realm_url %}Organization URL: {{ organization_url }}{% endtrans %} {% if ldap %} {% if ldap_username %} diff --git a/templates/zerver/emails/confirm_demo_organization_email.html b/templates/zerver/emails/confirm_demo_organization_email.html index 7047fe33f8..8679d7a507 100644 --- a/templates/zerver/emails/confirm_demo_organization_email.html +++ b/templates/zerver/emails/confirm_demo_organization_email.html @@ -7,7 +7,7 @@ {% block content %}

{% trans %}Hi,{% endtrans %}

-

{% trans realm_uri=macros.link_tag(realm_uri), new_email=macros.email_tag(new_email) %}We received a request to add the email address {{ new_email }} to your Zulip demo organization account on {{ realm_uri }}. To confirm this update and set a password for this account, please click below:{% endtrans %} +

{% trans realm_url=macros.link_tag(realm_url), new_email=macros.email_tag(new_email) %}We received a request to add the email address {{ new_email }} to your Zulip demo organization account on {{ realm_url }}. To confirm this update and set a password for this account, please click below:{% endtrans %} {{_('Confirm and set password') }}

{% trans support_email=macros.email_tag(support_email) %}If you did not request this change, please contact us immediately at {{ support_email }}.{% endtrans %}

diff --git a/templates/zerver/emails/confirm_demo_organization_email.txt b/templates/zerver/emails/confirm_demo_organization_email.txt index 8f6d1e5585..1a649af517 100644 --- a/templates/zerver/emails/confirm_demo_organization_email.txt +++ b/templates/zerver/emails/confirm_demo_organization_email.txt @@ -4,7 +4,7 @@ Hi, {% trans -%} -We received a request to add the email address {{ new_email }} to your Zulip demo organization account on {{ realm_uri }}. To confirm this update and set a password for this account, please click below: +We received a request to add the email address {{ new_email }} to your Zulip demo organization account on {{ realm_url }}. To confirm this update and set a password for this account, please click below: {%- endtrans %} diff --git a/templates/zerver/emails/confirm_new_email.html b/templates/zerver/emails/confirm_new_email.html index 05c52694e4..a4b0e0bca5 100644 --- a/templates/zerver/emails/confirm_new_email.html +++ b/templates/zerver/emails/confirm_new_email.html @@ -7,7 +7,7 @@ {% block content %}

{% trans %}Hi,{% endtrans %}

-

{% trans realm_uri=macros.link_tag(realm_uri), old_email=macros.email_tag(old_email), new_email=macros.email_tag(new_email) %}We received a request to change the email address for the Zulip account on {{ realm_uri }} from {{ old_email }} to {{ new_email }}. To confirm this change, please click below:{% endtrans %} +

{% trans realm_url=macros.link_tag(realm_url), old_email=macros.email_tag(old_email), new_email=macros.email_tag(new_email) %}We received a request to change the email address for the Zulip account on {{ realm_url }} from {{ old_email }} to {{ new_email }}. To confirm this change, please click below:{% endtrans %} {{_('Confirm email change') }}

{% trans support_email=macros.email_tag(support_email) %}If you did not request this change, please contact us immediately at {{ support_email }}.{% endtrans %}

diff --git a/templates/zerver/emails/confirm_new_email.txt b/templates/zerver/emails/confirm_new_email.txt index debf0d672c..d79a87f082 100644 --- a/templates/zerver/emails/confirm_new_email.txt +++ b/templates/zerver/emails/confirm_new_email.txt @@ -4,7 +4,7 @@ Hi, {% trans -%} -We received a request to change the email address for the Zulip account on {{ realm_uri }} from {{ old_email }} to {{ new_email }}. To confirm this change, please click below: +We received a request to change the email address for the Zulip account on {{ realm_url }} from {{ old_email }} to {{ new_email }}. To confirm this change, please click below: {%- endtrans %} diff --git a/templates/zerver/emails/custom_email_base.pre.html b/templates/zerver/emails/custom_email_base.pre.html index d8ad3932c7..06edc72f6a 100644 --- a/templates/zerver/emails/custom_email_base.pre.html +++ b/templates/zerver/emails/custom_email_base.pre.html @@ -15,6 +15,6 @@ {% if remote_server_email %}

You are receiving this email to update you about important changes to Zulip's Terms of Service.

{% elif unsubscribe_link %} -

{{ _("Manage email preferences") }} | {{ _("Unsubscribe from marketing emails") }}

+

{{ _("Manage email preferences") }} | {{ _("Unsubscribe from marketing emails") }}

{% endif %} {% endblock %} diff --git a/templates/zerver/emails/deactivate.html b/templates/zerver/emails/deactivate.html index fe86fcdbee..eff7c2f61f 100644 --- a/templates/zerver/emails/deactivate.html +++ b/templates/zerver/emails/deactivate.html @@ -6,7 +6,7 @@ {% block content %} {% trans %} -Your Zulip account on {{ realm_uri }} has been deactivated, and you will no longer be able to log in. +Your Zulip account on {{ realm_url }} has been deactivated, and you will no longer be able to log in. {% endtrans %}

diff --git a/templates/zerver/emails/deactivate.txt b/templates/zerver/emails/deactivate.txt index 6c96153460..6bfa94764c 100644 --- a/templates/zerver/emails/deactivate.txt +++ b/templates/zerver/emails/deactivate.txt @@ -1,5 +1,5 @@ {% trans %} -Your Zulip account on {{ realm_uri }} has been deactivated, and you will no longer be able to log in. +Your Zulip account on {{ realm_url }} has been deactivated, and you will no longer be able to log in. {% endtrans %} {% if deactivation_notification_comment %} diff --git a/templates/zerver/emails/digest.html b/templates/zerver/emails/digest.html index ee2673a561..c974527c24 100644 --- a/templates/zerver/emails/digest.html +++ b/templates/zerver/emails/digest.html @@ -31,12 +31,12 @@
-

{% trans %}Click here to log in to Zulip and catch up.{% endtrans %}

+

{% trans %}Click here to log in to Zulip and catch up.{% endtrans %}

{% endblock %} {% block manage_preferences %}

- {% trans %}Manage email preferences{% endtrans %} | + {% trans %}Manage email preferences{% endtrans %} | {% trans %}Unsubscribe from digest emails{% endtrans %}

{% endblock %} diff --git a/templates/zerver/emails/digest.txt b/templates/zerver/emails/digest.txt index cb3715f520..4ffa1c6878 100644 --- a/templates/zerver/emails/digest.txt +++ b/templates/zerver/emails/digest.txt @@ -9,12 +9,12 @@ {{ new_channels.plain|display_list(1000) }}. {% endif %} -{% trans organization_url=realm_uri %}Click here to log in to Zulip and catch up: {{ organization_url }}.{% endtrans %} +{% trans organization_url=realm_url %}Click here to log in to Zulip and catch up: {{ organization_url }}.{% endtrans %} -- {% trans %}Manage email preferences:{% endtrans %} -{{ realm_uri }}/#settings/notifications +{{ realm_url }}/#settings/notifications {% trans %}Unsubscribe from digest emails:{% endtrans %} diff --git a/templates/zerver/emails/missed_message.html b/templates/zerver/emails/missed_message.html index 4c3b4bbac3..10ee724f6e 100644 --- a/templates/zerver/emails/missed_message.html +++ b/templates/zerver/emails/missed_message.html @@ -14,9 +14,9 @@ {% else %}
{% if message_content_disabled_by_realm %} - {% trans help_url=realm_uri + "/help/hide-message-content-in-emails" %}This email does not include message content because your organization has disabled message content appearing in email notifications.{% endtrans %} + {% trans help_url=realm_url + "/help/hide-message-content-in-emails" %}This email does not include message content because your organization has disabled message content appearing in email notifications.{% endtrans %} {% elif message_content_disabled_by_user %} - {% trans alert_notif_url=realm_uri + "/help/dm-mention-alert-notifications" %}This email does not include message content because you have disabled message content appearing in email notifications.{% endtrans %} + {% trans alert_notif_url=realm_url + "/help/dm-mention-alert-notifications" %}This email does not include message content because you have disabled message content appearing in email notifications.{% endtrans %} {% endif %}
{% endif %} @@ -43,11 +43,11 @@ {% trans %}You are receiving this because you have email notifications enabled for #{{ channel_name }}.{% endtrans %}
{% endif %} {% if reply_to_zulip %} - {% trans notif_url=realm_uri + "/#settings/notifications" %}Reply to this email directly, view it in {{ realm_name }} Zulip, or manage email preferences.{% endtrans %} + {% trans notif_url=realm_url + "/#settings/notifications" %}Reply to this email directly, view it in {{ realm_name }} Zulip, or manage email preferences.{% endtrans %} {% elif not show_message_content %} - {% trans notif_url=realm_uri + "/#settings/notifications" %}View or reply in {{ realm_name }} Zulip, or manage email preferences.{% endtrans %}
+ {% trans notif_url=realm_url + "/#settings/notifications" %}View or reply in {{ realm_name }} Zulip, or manage email preferences.{% endtrans %}
{% else %} - {% trans notif_url=realm_uri + "/#settings/notifications" %}Reply in {{ realm_name }} Zulip, or manage email preferences.{% endtrans %}
+ {% trans notif_url=realm_url + "/#settings/notifications" %}Reply in {{ realm_name }} Zulip, or manage email preferences.{% endtrans %}

{% 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 (help). diff --git a/templates/zerver/emails/missed_message.txt b/templates/zerver/emails/missed_message.txt index b806aabf54..01e29fb822 100644 --- a/templates/zerver/emails/missed_message.txt +++ b/templates/zerver/emails/missed_message.txt @@ -8,12 +8,12 @@ {% endfor %} {% else %} {% if message_content_disabled_by_realm %} -{% trans hide_content_url=realm_uri + "/help/hide-message-content-in-emails" %} +{% trans hide_content_url=realm_url + "/help/hide-message-content-in-emails" %} This email does not include message content because your organization has disabled message content appearing in email notifications. See {{ hide_content_url }} for more details. {% endtrans %} {% elif message_content_disabled_by_user %} -{% trans alert_notif_url=realm_uri + "/help/dm-mention-alert-notifications" %} +{% trans alert_notif_url=realm_url + "/help/dm-mention-alert-notifications" %} This email does not include message content because you have disabled message content appearing in email notifications. See {{ alert_notif_url }} for more details. {% endtrans %} @@ -61,4 +61,4 @@ https://zulip.readthedocs.io/en/latest/production/email-gateway.html {% trans %}Manage email preferences: {% endtrans %} -{{ realm_uri }}/#settings/notifications +{{ realm_url }}/#settings/notifications diff --git a/templates/zerver/emails/notify_new_login.html b/templates/zerver/emails/notify_new_login.html index 06814a3e54..a8ad9df33f 100644 --- a/templates/zerver/emails/notify_new_login.html +++ b/templates/zerver/emails/notify_new_login.html @@ -1,7 +1,7 @@ {% extends "zerver/emails/email_base_default.html" %} {% block preheader %} - {% trans organization_url=realm_uri %}Organization: {{ organization_url }} Time: {{ login_time }} Email: {{ user_email }}{% endtrans %} + {% trans organization_url=realm_url %}Organization: {{ organization_url }} Time: {{ login_time }} Email: {{ user_email }}{% endtrans %} {% endblock %} {% block illustration %} @@ -13,7 +13,7 @@