AO3-7409 Adjust header and page subtitle for managing invitations#5780
AO3-7409 Adjust header and page subtitle for managing invitations#5780jmalark wants to merge 1 commit intootwcode:masterfrom
Conversation
7c2db7e to
646a997
Compare
| @@ -1,5 +1,5 @@ | |||
| <!--Descriptive page name, messages and instructions--> | |||
| <h2 class="heading"><%= logged_in_as_admin? ? (@user.login + "'s") : "Your" %> Invitations</h2> | |||
| <h2 class="heading"><%= t(logged_in_as_admin? ? ".admin_header" : ".header", username: @user.login) %></h2> | |||
There was a problem hiding this comment.
For admins, let's go with "Manage Invitations for %{usernames}". I'll update the issue.
To keep close to our usual naming convention, let's use the keys page_heading.admin and page_heading.user
01ff6ed to
a560bbb
Compare
|
|
||
| expect(response).to render_template("manage") | ||
| end | ||
| it "assigns subtitle with username in it" do |
There was a problem hiding this comment.
Tiny nitpick, but as long as we need another commit to finish getting the heading key straightened out, could you add a blank line above this?
| @@ -1,5 +1,5 @@ | |||
| <!--Descriptive page name, messages and instructions--> | |||
| <h2 class="heading"><%= logged_in_as_admin? ? (@user.login + "'s") : "Your" %> Invitations</h2> | |||
| <h2 class="heading"><%= t(logged_in_as_admin? ? ".page_heading_admin" : ".page_heading_user", username: @user.login) %></h2> | |||
There was a problem hiding this comment.
Can you make these page_heading.admin and page_heading.user, please? It should look like this in the locale file:
manage:
page_heading:
admin: text
user: text
And apologies for not catching this before, but the current code will define the username variable even when we don't need it. It's not terrible, but it would be better to do something like
<h2 class="heading">
<% if logged_in_as_admin? %>
<%= t(".page_heading.admin", username: @user.login) %>
<% else %>
[etc]
That would also mean i18n-tasks unused -l en should pass without needing to add anything to ignore_unused.
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-7409
Purpose
On the manage invitations page, adjusts the browser subtitle and the header
Credit
Jesse Malark he/him