From 0b05a7ec41e6763bbdc2e97dbf883eaabeeb6f30 Mon Sep 17 00:00:00 2001 From: mystyrust <91500391+mystyrust@users.noreply.github.com> Date: Wed, 22 Jan 2025 14:54:06 -0600 Subject: [PATCH] AO3-6378 update pseud page subtitle for consistency (#4916) * 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 --- app/controllers/series_controller.rb | 4 ++-- config/locales/controllers/en.yml | 3 +++ features/other_b/series.feature | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/controllers/series_controller.rb b/app/controllers/series_controller.rb index 620996800cf..4b762078c19 100644 --- a/app/controllers/series_controller.rb +++ b/app/controllers/series_controller.rb @@ -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 @@ -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) diff --git a/config/locales/controllers/en.yml b/config/locales/controllers/en.yml index f1e1c7d4327..45033b7992c 100644 --- a/config/locales/controllers/en.yml +++ b/config/locales/controllers/en.yml @@ -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 diff --git a/features/other_b/series.feature b/features/other_b/series.feature index f1c822734ca..f3ad49d13d1 100644 --- a/features/other_b/series.feature +++ b/features/other_b/series.feature @@ -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