From bbe047d7284364c928d1374c55394d843153132c Mon Sep 17 00:00:00 2001 From: Metallicity Date: Fri, 17 Jan 2025 19:53:05 -0800 Subject: [PATCH] Prefer Rails built-in `t` helper over `ts` --- app/views/tags/_search_form.html.erb | 28 ++++++++++++++-------------- config/locales/views/en.yml | 16 ++++++++++++++++ 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/app/views/tags/_search_form.html.erb b/app/views/tags/_search_form.html.erb index 0ad37d92cf..5dcbea1594 100644 --- a/app/views/tags/_search_form.html.erb +++ b/app/views/tags/_search_form.html.erb @@ -2,22 +2,22 @@
- <%= f.label :name, ts("Tag name") %> + <%= f.label :name, t(".tag_name") %> <%= link_to_help "tag-search-text-help" %>
<%= f.text_field :name %>
- <%= f.label :fandoms, ts("Fandoms") %> + <%= f.label :fandoms, t(".fandoms") %>
<%= f.text_field :fandoms, autocomplete_options("fandom", "aria-describedby" => "fandom-field-description") %>

- <%= ts("Find tags wrangled to specific canonical fandoms.") %> + <%= t(".fandoms_footnote") %>

-
<%= ts("Type") %>
+
<%= t(".type") %>
    @@ -35,51 +35,51 @@
-
<%= ts("Wrangling status") %>
+
<%= t(".wrangling_status") %>
  • <%= f.radio_button :wrangling_status, "canonical" %> - <%= f.label :wrangling_status, ts("Canonical"), value: "canonical" %> + <%= f.label :wrangling_status, t(".status_option.canonical"), value: "canonical" %>
  • <%= f.radio_button :wrangling_status, "noncanonical" %> - <%= f.label :wrangling_status, ts("Non-canonical"), value: "noncanonical" %> + <%= f.label :wrangling_status, t(".status_option.noncanonical"), value: "noncanonical" %>
  • <%= f.radio_button :wrangling_status, "synonymous" %> - <%= f.label :wrangling_status, ts("Synonymous"), value: "synonymous" %> + <%= f.label :wrangling_status, t(".status_option.synonymous"), value: "synonymous" %>
  • <%= f.radio_button :wrangling_status, "canonical_synonymous" %> - <%= f.label :wrangling_status, ts("Canonical or synonymous"), value: "canonical_synonymous" %> + <%= f.label :wrangling_status, t(".status_option.canonical_or_synonymous"), value: "canonical_synonymous" %>
  • <%= f.radio_button :wrangling_status, "noncanonical_nonsynonymous" %> - <%= f.label :wrangling_status, ts("Non-canonical and non-synonymous"), value: "noncanonical_nonsynonymous" %> + <%= f.label :wrangling_status, t(".status_option.noncanonical_and_nonsynonymous"), value: "noncanonical_nonsynonymous" %>
  • <%= f.radio_button :wrangling_status, "" %> - <%= f.label :wrangling_status, ts("Any status"), value: "" %> + <%= f.label :wrangling_status, t(".status_option.any_status"), value: "" %>
- <%= f.label :sort_column, ts("Sort by") %> + <%= f.label :sort_column, t(".sort_by") %>
<%= f.select :sort_column, options_for_select(@search.sort_options, @search.sort_column) %>
- <%= f.label :sort_direction, ts("Sort direction") %> + <%= f.label :sort_direction, t(".sort_direction") %>
<%= f.select :sort_direction, options_for_select([["Ascending", "asc"], ["Descending", "desc"]], @search.sort_direction) %>
-

<%= f.submit ts("Search Tags") %>

+

<%= f.submit t(".search_tags") %>

<% end %> diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 00d0723296..a8fe621100 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -1668,6 +1668,22 @@ en: filter_bookmarks: filter bookmarks filter_works: filter works list_fandom_tags_html: You can also access a list of %{fandom_relationship_tags_link}. + search_form: + tag_name: Tag name + fandoms: Fandoms + fandoms_footnote: Find tags wrangled to specific canonical fandoms. + type: Type + wrangling_status: Wrangling status + status_option: + canonical: Canonical + noncanonical: Non-canonical + synonymous: Synonymous + canonical_or_synonymous: Canonical or synonymous + noncanonical_and_nonsynonymous: Non-canonical and non-synonymous + any_status: Any status + sort_by: Sort by + sort_direction: Sort direction + search_tags: Search Tags time: formats: date_short_html: %a %d %b %Y