From 82c2af0356ff888e9665b5b08fda58c7722be637 Mon Sep 17 00:00:00 2001 From: Claire Date: Sat, 16 Mar 2024 17:38:20 +0100 Subject: [PATCH] Fix `user_mailer.welcome.hashtags_recent_count` not having plural form (#29607) --- app/views/application/mailer/_hashtag.html.haml | 2 +- app/views/user_mailer/welcome.text.erb | 2 +- config/locales/en.yml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/application/mailer/_hashtag.html.haml b/app/views/application/mailer/_hashtag.html.haml index 524fd7e274..fcedfa80a5 100644 --- a/app/views/application/mailer/_hashtag.html.haml +++ b/app/views/application/mailer/_hashtag.html.haml @@ -17,4 +17,4 @@ %span.email-mini-hashtag-img-span = image_tag full_asset_url(account.avatar.url), alt: '', width: 16, height: 16 %td - %p= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(hashtag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts), days: 2) + %p= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(hashtag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts)) diff --git a/app/views/user_mailer/welcome.text.erb b/app/views/user_mailer/welcome.text.erb index 150944605f..d9da2997da 100644 --- a/app/views/user_mailer/welcome.text.erb +++ b/app/views/user_mailer/welcome.text.erb @@ -53,7 +53,7 @@ <%= t('user_mailer.welcome.hashtags_subtitle') %> <%- @tags.each do |tag| %> -* #<%= tag.display_name %> · <%= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(tag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts), days: 2) %> +* #<%= tag.display_name %> · <%= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(tag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts)) %> <%= tag_url(tag) %> <%- end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8199fa52c7..c874a712da 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1868,7 +1868,9 @@ en: follows_subtitle: Follow well-known accounts follows_title: Who to follow follows_view_more: View more people to follow - hashtags_recent_count: "%{people} people in the past %{days} days" + hashtags_recent_count: + one: "%{people} person in the past 2 days" + other: "%{people} people in the past 2 days" hashtags_subtitle: Explore what’s trending since past 2 days hashtags_title: Trending hashtags hashtags_view_more: View more trending hashtags