Skip to content

Commit

Permalink
Fix new email template (pypi#14242)
Browse files Browse the repository at this point in the history
  • Loading branch information
di authored Jul 31, 2023
1 parent 97ff369 commit 70eac97
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
13 changes: 10 additions & 3 deletions warehouse/locale/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,6 @@ msgid "Your PyPI account <strong>%(username)s</strong> has been deleted."
msgstr ""

#: warehouse/templates/email/account-deleted/body.html:20
#: warehouse/templates/email/new-email-added/body.html:19
#: warehouse/templates/email/password-change/body.html:20
#: warehouse/templates/email/primary-email-change/body.html:20
#: warehouse/templates/email/recovery-code-used/body.html:25
Expand Down Expand Up @@ -1889,8 +1888,16 @@ msgstr ""
#: warehouse/templates/email/new-email-added/body.html:17
#, python-format
msgid ""
"Hello, %(username)s. A new email '%(email_address)s' has been added to "
"your account."
"Hello, %(username)s. A new email '%(new_email_address)s' has been added "
"to your account."
msgstr ""

#: warehouse/templates/email/new-email-added/body.html:19
#, python-format
msgid ""
"If you did not make this change, you can email <a "
"href=\"%(href)s\">%(new_email_address)s</a> to communicate with the PyPI "
"administrators."
msgstr ""

#: warehouse/templates/email/new-organization-approved/body.html:17
Expand Down
6 changes: 3 additions & 3 deletions warehouse/templates/email/new-email-added/body.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% extends "email/_base/body.html" %}

{% block content %}
<p>{% trans username=username, email_address=email_address %}Hello, {{ username }}. A new email '{{ email_address }}' has been added to your account.{% endtrans %}</p>
<p>{% trans username=username, new_email_address=new_email_address %}Hello, {{ username }}. A new email '{{ new_email_address }}' has been added to your account.{% endtrans %}</p>

<p>{% trans href='mailto:admin@pypi.org', email_address='admin@pypi.org' %}If you did not make this change, you can email <a href="{{ href }}">{{ email_address }}</a> to communicate with the PyPI administrators.{% endtrans %}</p>
{% endblock %}
<p>{% trans href='mailto:admin@pypi.org', new_email_address='admin@pypi.org' %}If you did not make this change, you can email <a href="{{ href }}">{{ new_email_address }}</a> to communicate with the PyPI administrators.{% endtrans %}</p>
{% endblock %}
4 changes: 2 additions & 2 deletions warehouse/templates/email/new-email-added/body.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% extends "email/_base/body.txt" %}

{% block content %}
{% trans username=username, email_address=email_address %}Hello, {{ username }}. A new email '{{ email_address }}' has been added to your account.{% endtrans %}
{% trans username=username, new_email_address=new_email_address %}Hello, {{ username }}. A new email '{{ new_email_address }}' has been added to your account.{% endtrans %}

<p>{% trans href='mailto:admin@pypi.org', email_address='admin@pypi.org' %}If you did not make this change, you can email <a href="{{ href }}">{{ email_address }}</a> to communicate with the PyPI administrators.{% endtrans %}</p>
<p>{% trans href='mailto:admin@pypi.org', new_email_address='admin@pypi.org' %}If you did not make this change, you can email <a href="{{ href }}">{{ new_email_address }}</a> to communicate with the PyPI administrators.{% endtrans %}</p>
{% endblock %}
2 changes: 1 addition & 1 deletion warehouse/templates/email/new-email-added/subject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

{% extends "email/_base/subject.txt" %}

{% block subject %}{% trans email_address=email_address, username=username %}A new email '{{ email_address }}' has been added to your account '{{ username }}' {% endtrans %}{% endblock %}
{% block subject %}{% trans new_email_address=new_email_address, username=username %}A new email '{{ new_email_address }}' has been added to your account '{{ username }}' {% endtrans %}{% endblock %}

0 comments on commit 70eac97

Please sign in to comment.