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.

emails: Improve "contact us" line in onboarding emails.

Ujjwal Aggarwaldcea17eb4496
diff --git a/templates/zerver/emails/confirm_registration.html b/templates/zerver/emails/confirm_registration.html
index bb20f7c5db7..3ff3cc0b842 100644
--- a/templates/zerver/emails/confirm_registration.html
+++ b/templates/zerver/emails/confirm_registration.html
@@ -20,5 +20,11 @@
{% endif %}
<a class="button" href="{{ activate_url }}">{{ _('Complete registration') }}</a>
</p>
-<p>{% trans support_email=macros.email_tag(support_email) %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %}</p>
+<p>
+ {% if corporate_enabled %}
+ {{macros.contact_us_zulip_cloud(support_email)}}
+ {% else %}
+ {{macros.contact_us_self_hosted(support_email)}}
+ {% endif %}
+</p>
{% endblock %}
diff --git a/templates/zerver/emails/followup_day1.html b/templates/zerver/emails/followup_day1.html
index 169e7fbeda0..bf92643a7d0 100644
--- a/templates/zerver/emails/followup_day1.html
+++ b/templates/zerver/emails/followup_day1.html
@@ -53,7 +53,10 @@
</p>
<p>
- {% trans support_email=macros.email_tag(support_email) %}Questions? Contact
-us any time at {{ support_email }}.{% endtrans %}
+ {% if corporate_enabled %}
+ {% trans %}Questions? <a href="{{ support_email }}">Contact us</a> — we'd love to help!{% endtrans %}
+ {% else %}
+ {{macros.contact_us_self_hosted(support_email)}}
+ {% endif %}
</p>
{% endblock %}
diff --git a/templates/zerver/emails/invitation.html b/templates/zerver/emails/invitation.html
index 09e40b7e8c7..15979a59643 100644
--- a/templates/zerver/emails/invitation.html
+++ b/templates/zerver/emails/invitation.html
@@ -16,6 +16,10 @@
<a class="button" href="{{ activate_url }}">{{ _("Complete registration") }}</a>
</p>
<p>
- {% trans support_email=macros.email_tag(support_email) %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %}
+ {% if corporate_enabled %}
+ {{macros.contact_us_zulip_cloud(support_email)}}
+ {% else %}
+ {{macros.contact_us_self_hosted(support_email)}}
+ {% endif %}
</p>
{% endblock %}
diff --git a/templates/zerver/emails/macros.html b/templates/zerver/emails/macros.html
index 8b83e71c32f..c1436ab3208 100644
--- a/templates/zerver/emails/macros.html
+++ b/templates/zerver/emails/macros.html
@@ -9,3 +9,11 @@
{% macro link_tag(url, text) -%}
<a href="{{ url }}">{{ text | default(url) }}</a>
{%- endmacro %}
+
+{% macro contact_us_self_hosted(email) -%}
+ {% trans %}If you have any questions, please contact this Zulip server's administrators at <a href="{{ email }}">{{ email }}</a>.{% endtrans %}
+{%- endmacro %}
+
+{% macro contact_us_zulip_cloud(email) -%}
+ {% trans %}Do you have questions or feedback to share? <a href="{{ email }}">Contact us</a> — we'd love to help!{% endtrans %}
+{%- endmacro %}
diff --git a/templates/zerver/emails/realm_reactivation.html b/templates/zerver/emails/realm_reactivation.html
index c02d7fee9bf..de44714a8b8 100644
--- a/templates/zerver/emails/realm_reactivation.html
+++ b/templates/zerver/emails/realm_reactivation.html
@@ -16,5 +16,11 @@
<p>{% trans %}If the request was in error, you can take no action and this link will expire in 24 hours.{% endtrans %}</p>
-<p>{% trans support_email=macros.email_tag(support_email) %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %}</p>
+<p>
+ {% if corporate_enabled %}
+ {{macros.contact_us_zulip_cloud(support_email)}}
+ {% else %}
+ {{macros.contact_us_self_hosted(support_email)}}
+ {% endif %}
+</p>
{% endblock %}