AO3-7548 i18n tagset-about, tagset-tag-associations and tagset-batch-load help files - #5981
AO3-7548 i18n tagset-about, tagset-tag-associations and tagset-batch-load help files#5981sherin wants to merge 11 commits into
Conversation
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
good point, thank you
|
|
||
| <% end %> | ||
| </div> No newline at end of file |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
that makes sense, thank you!
| <dt class="landmark"><%= t(".submit") %></dt> | ||
| <dd class="submit actions"><%= form.submit t(".submit") %></dd> |
There was a problem hiding this comment.
These I think are fine to be duplicated because they are both referring to the same button
There was a problem hiding this comment.
.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.
| <li><%= link_to t(".new_tag_set_link"), new_tag_set_path %></li> | ||
| <li><%= link_to t(".tags_link"), tags_path %></li> |
There was a problem hiding this comment.
These are probably better described as _button instead of _link
ASalbenblatt
left a comment
There was a problem hiding this comment.
Looks great, thanks!
sarken
left a comment
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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.titlefor 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| %> |
There was a problem hiding this comment.
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")) %> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) %> |
There was a problem hiding this comment.
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.)
| <dt class="landmark"><%= t(".submit") %></dt> | ||
| <dd class="submit actions"><%= form.submit t(".submit") %></dd> |
There was a problem hiding this comment.
.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> |
There was a problem hiding this comment.
We usually call these .landmark or .landmark.something (since there's often more than one landmark on a page).
…_tag_sets/index
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-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
tscalls tot).Testing Instructions
Refer ticket
Credit
sherin