Skip to content

Commit

Permalink
AO3-6378 update pseud page subtitle for consistency (#4916)
Browse files Browse the repository at this point in the history
* AO3-6378 update page subtitle for consistency

* AO3-6378 follow i81n to pass rubocop , update series.feature

* AO3-6378 double quotes, relative pathing to i18n text

* AO3-6378 normalize i18n en file

* AO3-6378 pr feedback, reference pseud by object rather than param
  • Loading branch information
mystyrust authored Jan 22, 2025
1 parent f48fc04 commit 0b05a7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
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 @@ -120,6 +120,9 @@ en:
not_found: Sorry, we couldn't find the FAQ you were looking for.
update_positions:
success: Question order has been successfully updated.
series:
index:
page_title: "%{username} - Series"
tag_wranglings:
index:
page_subtitle: fandoms
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

0 comments on commit 0b05a7e

Please sign in to comment.