Skip to content
Open
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
4 changes: 3 additions & 1 deletion app/controllers/skins_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ def index
if is_work_skin
@skins = @user.work_skins.sort_by_recent.includes(:author).with_attached_icon
@title = ts('My Work Skins')
@page_subtitle = "#{@user.login} - Work Skins"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update this (and the one below) to extract the string for translation? More details on the GitHub wiki about that. Here, it could look like

Suggested change
@page_subtitle = "#{@user.login} - Work Skins"
@page_subtitle = t(".my_work_skins_page_subtitle", username: @user.login)

else
@skins = @user.skins.site_skins.sort_by_recent.includes(:author).with_attached_icon
@title = ts('My Site Skins')
@page_subtitle = "#{@user.login} - Site Skins"
end
else
if is_work_skin
Expand All @@ -40,8 +42,8 @@ def index
end
@title = ts('Public Site Skins')
end
@page_subtitle = @title.html_safe
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this come in from a merge related to the other changes here? I don't know if we need to set this here anymore, given #5720

end
@page_subtitle = @title.html_safe
end

# GET /skins/1
Expand Down
12 changes: 12 additions & 0 deletions features/other_a/page_title.feature
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ Scenario: New tag set page has the expected browser page title
When I go to the new tag set page
Then I should see the page title "New Owned Tag Set | Example Archive"

Scenario: User work skins page has the expected browser page title

When I am logged in as "skinner"
And I go to skinner's work skins page
Then I should see the page title "skinner - Work Skins | Example Archive"

Scenario: User site skins page has the expected browser page title

When I am logged in as "skinner"
And I go to skinner's site skins page
Then I should see the page title "skinner - Site Skins | Example Archive"

Scenario: Public site skins page has the expected browser page title

When I go to the public skins page
Expand Down
4 changes: 4 additions & 0 deletions features/support/paths.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def path_to(page_name)
user_subscriptions_path(user_id: $1)
when /^(.*?)(?:'s)? profile page$/i
user_profile_path(user_id: $1)
when /^(.*)'s work skins page/
user_skins_path(user_id: Regexp.last_match(1), skin_type: "WorkSkin")
when /^(.*)'s site skins page/
user_skins_path(user_id: Regexp.last_match(1), skin_type: "Site")
when /^(.*)'s skins page/
user_skins_path(user_id: $1)
when /^(.*)'s edit multiple works page/
Expand Down
Loading