mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 10:38:07 +01:00
Fix broken i18n in text welcome mailer tags area (#32571)
This commit is contained in:
parent
d0fb7939bb
commit
afc440435c
3 changed files with 7 additions and 3 deletions
|
@ -244,6 +244,11 @@ module ApplicationHelper
|
||||||
tag.input(type: :text, maxlength: 999, spellcheck: false, readonly: true, **options)
|
tag.input(type: :text, maxlength: 999, spellcheck: false, readonly: true, **options)
|
||||||
end
|
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
|
private
|
||||||
|
|
||||||
def storage_host_var
|
def storage_host_var
|
||||||
|
|
|
@ -17,5 +17,4 @@
|
||||||
%span.email-mini-hashtag-img-span
|
%span.email-mini-hashtag-img-span
|
||||||
= image_tag full_asset_url(account.avatar.url), alt: '', width: 16, height: 16
|
= image_tag full_asset_url(account.avatar.url), alt: '', width: 16, height: 16
|
||||||
%td
|
%td
|
||||||
- people = hashtag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts
|
%p= recent_tag_usage(hashtag)
|
||||||
%p= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(people), count: people)
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<%= t('user_mailer.welcome.hashtags_subtitle') %>
|
<%= t('user_mailer.welcome.hashtags_subtitle') %>
|
||||||
|
|
||||||
<%- @tags.each do |tag| %>
|
<%- @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) %>
|
<%= tag_url(tag) %>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue