Skip to content

Fixing recovery code filename for test site #9535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions warehouse/locale/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ msgstr ""
#: warehouse/templates/accounts/profile.html:32
#: warehouse/templates/accounts/register.html:89
#: warehouse/templates/manage/account.html:272
#: warehouse/templates/manage/account/recovery_codes-provision.html:81
#: warehouse/templates/manage/account/recovery_codes-provision.html:85
#: warehouse/templates/manage/roles.html:173
msgid "Username"
msgstr ""
Expand Down Expand Up @@ -3010,7 +3010,7 @@ msgstr ""
msgid "Save role"
msgstr ""

#: warehouse/templates/manage/account/recovery_codes-provision.html:65
#: warehouse/templates/manage/account/recovery_codes-provision.html:69
#: warehouse/templates/manage/roles.html:95
msgid "Save"
msgstr ""
Expand Down Expand Up @@ -3309,21 +3309,21 @@ msgstr ""
msgid "Save your recovery codes"
msgstr ""

#: warehouse/templates/manage/account/recovery_codes-provision.html:64
#: warehouse/templates/manage/account/recovery_codes-provision.html:68
msgid "Download as file"
msgstr ""

#: warehouse/templates/manage/account/recovery_codes-provision.html:67
#: warehouse/templates/manage/account/recovery_codes-provision.html:69
#: warehouse/templates/manage/account/recovery_codes-provision.html:71
#: warehouse/templates/manage/account/recovery_codes-provision.html:73
#: warehouse/templates/manage/account/recovery_codes-provision.html:77
msgid "Continue"
msgstr ""

#: warehouse/templates/manage/account/recovery_codes-provision.html:76
#: warehouse/templates/manage/account/recovery_codes-provision.html:80
msgid "These codes will not be visible again."
msgstr ""

#: warehouse/templates/manage/account/recovery_codes-provision.html:79
#: warehouse/templates/manage/account/recovery_codes-provision.html:83
msgid "Ensure that you have securely stored them before continuing."
msgstr ""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ <h2>{% trans %}Save your recovery codes{% endtrans %}</h2>
<button type="button" class="button button--small copy-tooltip copy-tooltip-w" data-tooltip-label="{% trans %}Copy to clipboard{% endtrans %}" data-clipboard-text="{{ 'PyPI recovery codes\n' + recovery_codes|join('\n') }}">
{% trans %}Copy{% endtrans %}
</button>
<a href="data:text/plain;,{{ recovery_codes|join('%0A') }}" download="PyPI-Recovery-Codes.txt" class="button button--small" data-tooltip-label="{% trans %}Download as file{% endtrans %}">
{% set _recovery_codes_filename = "PyPI-Recovery-Codes.txt" %}
{% if testPyPI %}
{% set _recovery_codes_filename = "TestPyPI-Recovery-Codes.txt" %}
{% endif %}
<a href="data:text/plain;,{{ recovery_codes|join('%0A') }}" download="{{ _recovery_codes_filename }}" class="button button--small" data-tooltip-label="{% trans %}Download as file{% endtrans %}">
{% trans %}Save{% endtrans %}&nbsp;<span class="fa fa-download"></span>
</a>
{% set title = gettext("Continue") %}
Expand Down