Skip to content

AO3-7548 i18n tagset-about, tagset-tag-associations and tagset-batch-load help files - #5981

Open
sherin wants to merge 11 commits into
otwcode:masterfrom
sherin:i18n-tag-sets-help
Open

AO3-7548 i18n tagset-about, tagset-tag-associations and tagset-batch-load help files#5981
sherin wants to merge 11 commits into
otwcode:masterfrom
sherin:i18n-tag-sets-help

Conversation

@sherin

@sherin sherin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

…_tag_sets/index

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-7548

Purpose

Move 3 help files over to erb with i18n compliance. In addition, for owned_tag_sets/index.html, I've also fixed and moved its translation strings to the en locale file (converting ts calls to t).

Testing Instructions

Refer ticket

Credit

sherin

@sherin sherin changed the title move tag set about help to be i18n compatible. move ts -> t for owned… AO3-7548 move tag set about help to be i18n compatible. move ts -> t for owned… Aug 13, 2026
@sherin
sherin marked this pull request as ready for review August 15, 2026 05:21
@sarken sarken changed the title AO3-7548 move tag set about help to be i18n compatible. move ts -> t for owned… AO3-7548 i18n tagset-about, tagset-tag-associations and tagset-batch-load help files Aug 19, 2026

@ASalbenblatt ASalbenblatt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a few small things, but overall looking really good!

I also transitioned your Jira issue to In Review and assigned you to it so no one else picks it up.

Comment thread config/locales/views/en.yml Outdated
acronym: non-con
title: non-consensual sex
tag_sets_about:
delete_tag_set_warning_strong: can delete the tag set or change it without warning

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The _strong suffix might be confusing to a translator who doesn't know HTML. The way you're supposed to do this is to make the key here just delete_tag_set_warning and then have the variable be something descriptive so they see %{delete_tag_set_warning_bold} in the other string.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good point, thank you


<% end %>
</div> No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since you're already modifying this file pretty heavily could you please add the missing newline at the end here


<fieldset class="tagset">
<legend>Tags In Set <% unless @tag_set.new_record? || !@tag_set.tag_set || @tag_set.tag_set.tags.empty? %><%= ts('(check to remove)') %><% end %></legend>
<legend>Tags In Set <% unless @tag_set.new_record? || !@tag_set.tag_set || @tag_set.tag_set.tags.empty? %><%= t(".check_to_remove") %><% end %></legend>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Our i18n standards say that even if a text fragment is identical in two places it should be put in two different locales like .check_to_remove_tags and .check_to_remove_associations in case they end up being different in another language (like maybe tags and associations have different genders and that requires remove to be conjugated differently or something)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that makes sense, thank you!

Comment on lines +24 to +25
<dt class="landmark"><%= t(".submit") %></dt>
<dd class="submit actions"><%= form.submit t(".submit") %></dd>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These I think are fine to be duplicated because they are both referring to the same button

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

.submit.landmark and .submit.button would be better, since they're different elements and different contexts. At some point, we'll likely change the button to less generic text like "Batch Load," but we'd still want the landmark to indicate that it is the submit button.

Comment thread app/views/owned_tag_sets/index.html.erb Outdated
Comment on lines +28 to +29
<li><%= link_to t(".new_tag_set_link"), new_tag_set_path %></li>
<li><%= link_to t(".tags_link"), tags_path %></li>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These are probably better described as _button instead of _link

@ASalbenblatt ASalbenblatt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, thanks!

@sarken sarken left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for working on this! Just a few notes on some of our standards.

<% if logged_in? %>
<li><%= link_to ts('New Tag Set'), new_tag_set_path %></li>
<li><%= link_to ts('Tags'), tags_path %></li>
<li><%= link_to t(".new_tag_set_button"), new_tag_set_path %></li>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a heads up that these are links, so they shouldn't be called button -- there might come a time where we don't style them as buttons, which would make this name confusing.

However, we actually have an established naming pattern for the subnavigation links that avoids the question entirely: .navigation.link_text (or a shortened form of the link text). So here the best keys would probably be:

  • .navigation.search.submit (and .navigation.search.title for the title attribute)
  • .navigation.new_tag_set
  • .navigation.tags

<ul class="navigation actions" role="navigation">
<li class="search" role="search">
<%= form_tag tag_sets_path, :class => "simple search", :method => :get do |form| %>
<%= form_tag tag_sets_path, class: "simple search", method: :get do |form| %>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you remove the role attributes from the ul and li as long as you're here? They're actually invalid.

<h2 class="heading">
<% if @user %>
<%= ts('%{user_name}\'s Tag Sets', :user_name => @user.login) %> <%= link_to_help 'tagset-about' %>
<%= t(".page_heading_user", user_name: @user.login) %> <%= link_to_help_modal(help_tag_sets_about_path, t(".tag_sets_about_help_title")) %>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

When there's more than one possible page heading, we generally prefer to do .page_heading.user, page_heading.query, etc.

batch_load:
page_heading: Batch Loading
submit: Submit
tag_sets_batch_load_help_title: Tagset batch load

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you make "tagset" two words here, and in tag_sets_about_help_title and tag_sets_associations_help_title? We never actually want to say "tagset;" it was just an undesirable consequence of relying on the file name.

page_heading_query: Tag Set
page_heading_user: "%{user_name}'s Tag Sets"
search_submit: Search
search_title: search

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We're moving away from the hardcoded lowercase text that's leftover from the 2010s, so this can be capitalized.

<%= search_header @tag_sets, nil, t(".page_heading_query") %> <%= link_to_help_modal(help_tag_sets_about_path, t(".tag_sets_about_help_title")) %>
<% else %>
<%= ts('Tag Sets') %> <%= link_to_help 'tagset-about' %> <%= ts('in the %{archive_name}', :archive_name => ArchiveConfig.APP_NAME) %>
<%= t(".page_heading_default") %> <%= link_to_help_modal(help_tag_sets_about_path, t(".tag_sets_about_help_title")) %> <%= t(".in_archive_name", archive_name: ArchiveConfig.APP_NAME) %>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Splitting up a phrase or sentence can make translation difficult, so this should be one string with the modal link as a variable. (You can refer to the Variable interpolation section of our i18n standards page for some examples.)

Comment on lines +24 to +25
<dt class="landmark"><%= t(".submit") %></dt>
<dd class="submit actions"><%= form.submit t(".submit") %></dd>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

.submit.landmark and .submit.button would be better, since they're different elements and different contexts. At some point, we'll likely change the button to less generic text like "Batch Load," but we'd still want the landmark to indicate that it is the submit button.

<% end %>

<h3 class="landmark heading"><%= ts('Listing Tag Sets') %></h3>
<h3 class="landmark heading"><%= t(".listing_tag_sets_heading") %></h3>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We usually call these .landmark or .landmark.something (since there's often more than one landmark on a page).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants