From 6a3a91d9b7830d722b58aeab93532d8eda01632b Mon Sep 17 00:00:00 2001 From: yheuhtozr <84892012+yheuhtozr@users.noreply.github.com> Date: Mon, 25 Oct 2021 22:32:51 +0900 Subject: [PATCH] views/podcasts, views/podcast_episodes i18n (#15020) * views/podcasts, views/podcast_episodes i18n * reformat for PR * helper labels * PR sync with main * remove ja.yml * Update en.yml * Update fr.yml * Update _meta.html.erb * Update podcast_episodes_index_spec.rb * Update podcast_create_spec.rb * Update user_visits_podcast_episode_spec.rb * Update en.yml * Update feed.rb * Update index.html.erb --- app/services/podcasts/feed.rb | 2 +- .../podcast_episodes/_episodes_feed.html.erb | 2 +- app/views/podcast_episodes/_meta.html.erb | 12 +++---- .../podcast_episodes/_podcast_bar.html.erb | 8 ++--- app/views/podcast_episodes/index.html.erb | 12 +++---- app/views/podcast_episodes/show.html.erb | 6 ++-- app/views/podcasts/_form.html.erb | 10 +++--- config/locales/en.yml | 12 ------- config/locales/fr.yml | 12 ------- config/locales/helpers/en.yml | 18 ++++++++++ config/locales/helpers/fr.yml | 18 ++++++++++ config/locales/views/podcasts/en.yml | 36 +++++++++++++++++++ config/locales/views/podcasts/fr.yml | 36 +++++++++++++++++++ spec/requests/podcasts/podcast_create_spec.rb | 10 +++--- .../podcasts/podcast_episodes_index_spec.rb | 6 ++-- .../user_visits_podcast_episode_spec.rb | 4 +-- 16 files changed, 144 insertions(+), 60 deletions(-) create mode 100644 config/locales/helpers/en.yml create mode 100644 config/locales/helpers/fr.yml create mode 100644 config/locales/views/podcasts/en.yml create mode 100644 config/locales/views/podcasts/fr.yml diff --git a/app/services/podcasts/feed.rb b/app/services/podcasts/feed.rb index 3bee6166b..626ceaa40 100644 --- a/app/services/podcasts/feed.rb +++ b/app/services/podcasts/feed.rb @@ -35,7 +35,7 @@ module Podcasts def set_unreachable(status: :unreachable, force_update: false) # don't recheck if the podcast was already unreachable or force update is required need_refetching = podcast.reachable || force_update - podcast.update_columns(reachable: false, status_notice: I18n.t(status, scope: "podcasts.statuses")) + podcast.update_columns(reachable: false, status_notice: I18n.t(status, scope: "views.podcasts.statuses")) refetch_items if need_refetching true end diff --git a/app/views/podcast_episodes/_episodes_feed.html.erb b/app/views/podcast_episodes/_episodes_feed.html.erb index 6ad23adc6..011589004 100644 --- a/app/views/podcast_episodes/_episodes_feed.html.erb +++ b/app/views/podcast_episodes/_episodes_feed.html.erb @@ -7,7 +7,7 @@ image_options: { alt: episode.title, loading: "lazy"}) %>
-

podcast<%= episode.title %>

+

<%= t("views.podcasts.tag") %><%= episode.title %>

diff --git a/app/views/podcast_episodes/_meta.html.erb b/app/views/podcast_episodes/_meta.html.erb index 569967e1c..e69390908 100644 --- a/app/views/podcast_episodes/_meta.html.erb +++ b/app/views/podcast_episodes/_meta.html.erb @@ -22,25 +22,25 @@ <% end %> <% else %> - <% title "Podcasts" %> + <% title t("views.podcasts.meta.title") %> <%= content_for :page_meta do %> - + "> <%= meta_keywords_default %> - + " /> - + " /> "> "> - - + "> + " /> <% end %> <% end %> diff --git a/app/views/podcast_episodes/_podcast_bar.html.erb b/app/views/podcast_episodes/_podcast_bar.html.erb index 06e5952a1..6a5f24a83 100644 --- a/app/views/podcast_episodes/_podcast_bar.html.erb +++ b/app/views/podcast_episodes/_podcast_bar.html.erb @@ -1,7 +1,7 @@ diff --git a/app/views/podcast_episodes/index.html.erb b/app/views/podcast_episodes/index.html.erb index 64f1c8563..bc2926209 100644 --- a/app/views/podcast_episodes/index.html.erb +++ b/app/views/podcast_episodes/index.html.erb @@ -5,7 +5,7 @@