Skip to content

Commit

Permalink
history: render project archival enter/exit events (#17453)
Browse files Browse the repository at this point in the history
* history: render project archival enter/exit events

* make translations

Signed-off-by: William Woodruff <[email protected]>

---------

Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw authored Jan 21, 2025
1 parent 7d0a243 commit e8a0cda
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 22 deletions.
60 changes: 38 additions & 22 deletions warehouse/locale/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1809,10 +1809,10 @@ msgstr ""
#: warehouse/templates/accounts/register.html:64
#: warehouse/templates/manage/account.html:139
#: warehouse/templates/manage/account.html:480
#: warehouse/templates/manage/project/history.html:301
#: warehouse/templates/manage/project/history.html:312
#: warehouse/templates/manage/project/history.html:323
#: warehouse/templates/manage/project/history.html:334
#: warehouse/templates/manage/project/history.html:313
#: warehouse/templates/manage/project/history.html:324
#: warehouse/templates/manage/project/history.html:335
#: warehouse/templates/manage/project/history.html:346
#: warehouse/templates/manage/project/settings.html:224
#: warehouse/templates/manage/project/settings.html:285
#: warehouse/templates/manage/project/settings.html:291
Expand Down Expand Up @@ -3790,7 +3790,7 @@ msgstr ""

#: warehouse/templates/manage/account.html:780
#: warehouse/templates/manage/organization/history.html:201
#: warehouse/templates/manage/project/history.html:352
#: warehouse/templates/manage/project/history.html:364
#: warehouse/templates/manage/team/history.html:108
#: warehouse/templates/manage/unverified-account.html:466
msgid "Event"
Expand All @@ -3799,8 +3799,8 @@ msgstr ""
#: warehouse/templates/manage/account.html:781
#: warehouse/templates/manage/organization/history.html:202
#: warehouse/templates/manage/organization/history.html:211
#: warehouse/templates/manage/project/history.html:353
#: warehouse/templates/manage/project/history.html:362
#: warehouse/templates/manage/project/history.html:365
#: warehouse/templates/manage/project/history.html:374
#: warehouse/templates/manage/team/history.html:109
#: warehouse/templates/manage/team/history.html:118
#: warehouse/templates/manage/unverified-account.html:467
Expand All @@ -3827,7 +3827,7 @@ msgstr ""

#: warehouse/templates/manage/account.html:795
#: warehouse/templates/manage/organization/history.html:217
#: warehouse/templates/manage/project/history.html:368
#: warehouse/templates/manage/project/history.html:380
#: warehouse/templates/manage/team/history.html:124
#: warehouse/templates/manage/unverified-account.html:481
msgid "Device Info"
Expand Down Expand Up @@ -4160,8 +4160,8 @@ msgstr ""
#: warehouse/templates/manage/project/history.html:137
#: warehouse/templates/manage/project/history.html:182
#: warehouse/templates/manage/project/history.html:208
#: warehouse/templates/manage/project/history.html:299
#: warehouse/templates/manage/project/history.html:321
#: warehouse/templates/manage/project/history.html:311
#: warehouse/templates/manage/project/history.html:333
#: warehouse/templates/manage/team/history.html:88
msgid "Added by:"
msgstr ""
Expand Down Expand Up @@ -5365,8 +5365,8 @@ msgid "Created by:"
msgstr ""

#: warehouse/templates/manage/organization/history.html:144
#: warehouse/templates/manage/project/history.html:310
#: warehouse/templates/manage/project/history.html:332
#: warehouse/templates/manage/project/history.html:322
#: warehouse/templates/manage/project/history.html:344
#: warehouse/templates/manage/team/history.html:76
msgid "Deleted by:"
msgstr ""
Expand Down Expand Up @@ -5404,7 +5404,7 @@ msgid "Revoked by:"
msgstr ""

#: warehouse/templates/manage/organization/history.html:198
#: warehouse/templates/manage/project/history.html:349
#: warehouse/templates/manage/project/history.html:361
#: warehouse/templates/manage/team/history.html:105
#, python-format
msgid "Security history for %(source_name)s"
Expand Down Expand Up @@ -6059,30 +6059,46 @@ msgid "Disabled by:"
msgstr ""

#: warehouse/templates/manage/project/history.html:297
#: warehouse/templates/manage/project/history.html:319
msgid "Project alternate repository added"
msgid "Project archived"
msgstr ""

#: warehouse/templates/manage/project/history.html:299
msgid "Archived by:"
msgstr ""

#: warehouse/templates/manage/project/history.html:302
#: warehouse/templates/manage/project/history.html:313
#: warehouse/templates/manage/project/history.html:324
#: warehouse/templates/manage/project/history.html:335
msgid "Project unarchived"
msgstr ""

#: warehouse/templates/manage/project/history.html:304
msgid "Unarchived by:"
msgstr ""

#: warehouse/templates/manage/project/history.html:309
#: warehouse/templates/manage/project/history.html:331
msgid "Project alternate repository added"
msgstr ""

#: warehouse/templates/manage/project/history.html:314
#: warehouse/templates/manage/project/history.html:325
#: warehouse/templates/manage/project/history.html:336
#: warehouse/templates/manage/project/history.html:347
#: warehouse/templates/manage/project/settings.html:225
#: warehouse/templates/manage/project/settings.html:305
#: warehouse/templates/manage/project/settings.html:311
msgid "Url"
msgstr ""

#: warehouse/templates/manage/project/history.html:308
#: warehouse/templates/manage/project/history.html:330
#: warehouse/templates/manage/project/history.html:320
#: warehouse/templates/manage/project/history.html:342
msgid "Project alternate repository deleted"
msgstr ""

#: warehouse/templates/manage/project/history.html:354
#: warehouse/templates/manage/project/history.html:366
msgid "Additional info"
msgstr ""

#: warehouse/templates/manage/project/history.html:366
#: warehouse/templates/manage/project/history.html:378
#: warehouse/templates/manage/team/history.html:122
msgid "Location info"
msgstr ""
Expand Down
12 changes: 12 additions & 0 deletions warehouse/templates/manage/project/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,18 @@ <h2>{% trans %}Security history{% endtrans %}</h2>
{% trans %}Disabled by:{% endtrans %} <a href="{{ request.route_path('accounts.profile', username=event.additional.modified_by) }}">{{ event.additional.modified_by }}</a>
</small>

{# Display project archival enter/exit events #}
{% elif event.tag == EventTag.Project.ProjectArchiveEnter %}
<strong>{% trans %}Project archived{% endtrans %}</strong>
<small>
{% trans %}Archived by:{% endtrans %} <a href="{{ request.route_path('accounts.profile', username=event.additional.submitted_by) }}">{{ event.additional.submitted_by }}</a>
</small>
{% elif event.tag == EventTag.Project.ProjectArchiveExit %}
<strong>{% trans %}Project unarchived{% endtrans %}</strong>
<small>
{% trans %}Unarchived by:{% endtrans %} <a href="{{ request.route_path('accounts.profile', username=event.additional.submitted_by) }}">{{ event.additional.submitted_by }}</a>
</small>

{# Display Project Alternate Repository events #}
{% elif event.tag == EventTag.Account.AlternateRepositoryAdd %}
<strong>{% trans%}Project alternate repository added{% endtrans %}</strong>
Expand Down

0 comments on commit e8a0cda

Please sign in to comment.