Skip to content

Commit

Permalink
Rephrasing copy re: password resets
Browse files Browse the repository at this point in the history
Tweaking expressions to be more in line with how other systems phrase things
  • Loading branch information
arubdesu committed Oct 28, 2024
1 parent b36561c commit c650084
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion server/templates/registration/invitation_email.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this email because you have been invited to use Zentral.{% endblocktrans %}

{% trans "Please go to the following page and choose a new password:" %}
{% trans "Please go to the following page and set a new password:" %}
{% block reset_link %}
{{ reset_url }}
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion server/templates/registration/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h1 class="reg-title">
</div>
{% endfor %}
<div class="text-start my-3">
<p><a href="{% url 'password_reset' %}">Password forgotten?</a></p>
<p><a href="{% url 'password_reset' %}">Forgot password?</a></p>
</div>
<button class="reg-btn-primary" type="submit">
Sign in{% if login_realms %} with local credentials{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions server/templates/registration/password_reset_email.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this email because you requested a password reset for your Zentral account.{% endblocktrans %}
{% blocktrans %}You're receiving this email because a password reset has been initiated for your Zentral account.{% endblocktrans %}

{% trans "Please go to the following page and choose a new password:" %}
{% trans "Please go to the following page and set a new password:" %}
{% block reset_link %}
{{ reset_url }}
{% endblock %}
{% trans "Your username, in case you've forgotten:" %} {{ username }}
{% trans "Your username, just in case:" %} {{ username }}

{% trans "Thanks!" %}

Expand Down
2 changes: 1 addition & 1 deletion server/templates/registration/password_reset_subject.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Password reset on Zentral
Password reset for Zentral
4 changes: 2 additions & 2 deletions tests/server_accounts/test_password_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def test_email_send_password_reset(self):
handler.send_password_reset(self.user)
self.assertEqual(len(mail.outbox), 1)
email = mail.outbox[0]
self.assertEqual(email.subject, "Password reset on Zentral")
self.assertIn(f"Your username, in case you've forgotten: {self.user.username}", email.body)
self.assertEqual(email.subject, "Password reset for Zentral")
self.assertIn(f"Your username, just in case: {self.user.username}", email.body)

def test_email_send_invitation(self):
handler = EmailPasswordResetHandler({})
Expand Down
4 changes: 2 additions & 2 deletions tests/server_accounts/test_users_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,8 +813,8 @@ def test_password_reset_post(self):
self.assertTemplateUsed(response, "registration/password_reset_done.html")
self.assertEqual(len(mail.outbox), 1)
email = mail.outbox[0]
self.assertEqual(email.subject, "Password reset on Zentral")
self.assertIn(f"Your username, in case you've forgotten: {self.ui_user.username}", email.body)
self.assertEqual(email.subject, "Password reset for Zentral")
self.assertIn(f"Your username, just in case: {self.ui_user.username}", email.body)

# password change

Expand Down

0 comments on commit c650084

Please sign in to comment.