Compare commits

...

2 Commits

Author SHA1 Message Date
Claire
8220e0f0a6
Merge b88f0f152c into bd6c96f737 2024-10-18 09:43:20 +02:00
Matt Jankowski
bd6c96f737
Fix broken i18n in text welcome mailer tags area (#32571) 2024-10-18 07:19:37 +00:00
3 changed files with 7 additions and 3 deletions

View File

@ -244,6 +244,11 @@ module ApplicationHelper
tag.input(type: :text, maxlength: 999, spellcheck: false, readonly: true, **options)
end
def recent_tag_usage(tag)
people = tag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts
I18n.t 'user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(people), count: people
end
private
def storage_host_var

View File

@ -17,5 +17,4 @@
%span.email-mini-hashtag-img-span
= image_tag full_asset_url(account.avatar.url), alt: '', width: 16, height: 16
%td
- people = hashtag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts
%p= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(people), count: people)
%p= recent_tag_usage(hashtag)

View File

@ -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)) %>
* #<%= tag.display_name %> · <%= recent_tag_usage(tag) %>
<%= tag_url(tag) %>
<%- end %>