mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
models, forms, actions: Switch from Humbug to Zulip in user-visible text.
(imported from commit 97966e5f118276a00d116bba0b52616bbd83cb72)
This commit is contained in:
@@ -16,7 +16,7 @@ def is_inactive(value):
|
|||||||
except UserProfile.DoesNotExist:
|
except UserProfile.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
SIGNUP_STRING = '<a href="https://humbughq.com/signup">Sign up</a> to find out when Humbug is ready for you.'
|
SIGNUP_STRING = '<a href="https://humbughq.com/signup">Sign up</a> to find out when Zulip is ready for you.'
|
||||||
|
|
||||||
def has_valid_realm(value):
|
def has_valid_realm(value):
|
||||||
try:
|
try:
|
||||||
@@ -26,7 +26,7 @@ def has_valid_realm(value):
|
|||||||
|
|
||||||
def isnt_mit(value):
|
def isnt_mit(value):
|
||||||
if "@mit.edu" in value:
|
if "@mit.edu" in value:
|
||||||
raise ValidationError(mark_safe(u'Humbug for MIT is by invitation only. ' + SIGNUP_STRING))
|
raise ValidationError(mark_safe(u'Zulip for MIT is by invitation only. ' + SIGNUP_STRING))
|
||||||
|
|
||||||
class RegistrationForm(forms.Form):
|
class RegistrationForm(forms.Form):
|
||||||
full_name = forms.CharField(max_length=100)
|
full_name = forms.CharField(max_length=100)
|
||||||
|
|||||||
@@ -1270,8 +1270,8 @@ def do_send_missedmessage_email(user_profile, missed_messages):
|
|||||||
template_payload['reply_warning'] = True
|
template_payload['reply_warning'] = True
|
||||||
headers['Reply-To'] = "Nobody <noreply@humbughq.com>"
|
headers['Reply-To'] = "Nobody <noreply@humbughq.com>"
|
||||||
|
|
||||||
subject = "Missed Humbug%s from %s" % ('s' if len(senders) > 1 else '', sender_str)
|
subject = "Missed Zulip%s from %s" % ('s' if len(senders) > 1 else '', sender_str)
|
||||||
from_email = "%s (via Humbug) <noreply@humbughq.com>" % (sender_str)
|
from_email = "%s (via Zulip) <noreply@humbughq.com>" % (sender_str)
|
||||||
|
|
||||||
text_content = loader.render_to_string('zephyr/missed_message_email.txt', template_payload)
|
text_content = loader.render_to_string('zephyr/missed_message_email.txt', template_payload)
|
||||||
html_content = loader.render_to_string('zephyr/missed_message_email_html.txt', template_payload)
|
html_content = loader.render_to_string('zephyr/missed_message_email_html.txt', template_payload)
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ class Message(models.Model):
|
|||||||
if self.rendered_content is not None:
|
if self.rendered_content is not None:
|
||||||
obj['content'] = self.rendered_content
|
obj['content'] = self.rendered_content
|
||||||
else:
|
else:
|
||||||
obj['content'] = '<p>[Humbug note: Sorry, we could not understand the formatting of your message]</p>'
|
obj['content'] = '<p>[Zulip note: Sorry, we could not understand the formatting of your message]</p>'
|
||||||
|
|
||||||
obj['content_type'] = 'text/html'
|
obj['content_type'] = 'text/html'
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user