Skip to content
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

AO3-6378 update pseud page subtitle for consistency #4916

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions app/controllers/series_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def index
redirect_to(root_path) and return
end
@user = User.find_by!(login: params[:user_id])
@page_subtitle = ts("%{username} - Series", username: @user.login)
@page_subtitle = t(".page_title", username: @user.login)

@series = if current_user.nil?
Series.visible_to_all
Expand All @@ -31,7 +31,7 @@ def index

if params[:pseud_id]
@pseud = @user.pseuds.find_by!(name: params[:pseud_id])
@page_subtitle = ts("by ") + @pseud.byline
@page_subtitle = t(".page_title", username: @pseud.name)
@series = @series.exclude_anonymous.for_pseud(@pseud)
else
@series = @series.exclude_anonymous.for_user(@user)
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 @@ -90,6 +90,9 @@ en:
muted: You have muted the user %{name}.
destroy:
unmuted: You have unmuted the user %{name}.
series:
index:
page_title: "%{username} - Series"
users:
passwords:
create:
Expand Down
2 changes: 1 addition & 1 deletion features/other_b/series.feature
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Feature: Create and Edit Series
And I post the work "Sweetie Belle" as part of a series "Ponies" using the pseud "Pointless Pseud"
When I follow "Pointless Pseud"
And I follow "Series (1)"
Then the page title should include "by Pointless Pseud"
Then the page title should include "Pointless Pseud - Series"

Scenario: Rename a series
Given I am logged in as a random user
Expand Down
Loading