Skip to content

Commit

Permalink
AO3-6768 update browser page title in drafts page (#4915)
Browse files Browse the repository at this point in the history
* AO3-6768

update page subtitle in the drafts page

* AO3-6768

i18n format, reference in cucumber test, single quotes

* AO3-6768 pr feedback: double quotes, relative pathing for i18n text

* AO3-6768 normalize i18n en file

* AO3-6768 move cucumber step
  • Loading branch information
mystyrust authored Nov 20, 2024
1 parent 8a0c24c commit f68e2e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/works_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def drafts
redirect_to logged_in? ? user_path(current_user) : new_user_session_path
return
end

@page_subtitle = t(".page_title", username: @user.login)

if params[:pseud_id]
@pseud = @user.pseuds.find_by(name: params[:pseud_id])
Expand Down
3 changes: 3 additions & 0 deletions config/locales/controllers/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,6 @@ en:
ban_notice_html: Your account has been banned. You are not permitted to add or edit archive content. Please %{contact_abuse_link} for more information.
contact_abuse: contact Abuse
suspension_notice_html: Your account has been suspended until %{suspended_until}. You may not add or edit content until your suspension has been resolved. Please %{contact_abuse_link} for more information.
works:
drafts:
page_title: "%{username} - Drafts"
1 change: 1 addition & 0 deletions features/works/work_drafts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Feature: Work Drafts
Then I should see "Drafts (1)"
When I follow "Drafts (1)"
Then I should see "draft to post"
And the page title should include "drafter - Drafts"
And I should see "Post Draft" within "#main .own.work.blurb .actions"
And I should see "Delete Draft" within "#main .own.work.blurb .actions"
When I follow "Post Draft"
Expand Down

0 comments on commit f68e2e2

Please sign in to comment.