0
0
Fork 0

Update follow and follow_request emails (#28755)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
HTeuMeuLeu 2024-01-17 15:37:04 +01:00 committed by GitHub
parent 6fab50ba9e
commit 1a3859d8e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 136 additions and 7 deletions

View file

@ -27,20 +27,24 @@ module AccountsHelper
end
end
def account_formatted_stat(value)
number_to_human(value, precision: 3, strip_insignificant_zeros: true)
end
def account_description(account)
prepend_str = [
[
number_to_human(account.statuses_count, precision: 3, strip_insignificant_zeros: true),
account_formatted_stat(account.statuses_count),
I18n.t('accounts.posts', count: account.statuses_count),
].join(' '),
[
number_to_human(account.following_count, precision: 3, strip_insignificant_zeros: true),
account_formatted_stat(account.following_count),
I18n.t('accounts.following', count: account.following_count),
].join(' '),
[
number_to_human(account.followers_count, precision: 3, strip_insignificant_zeros: true),
account_formatted_stat(account.followers_count),
I18n.t('accounts.followers', count: account.followers_count),
].join(' '),
].join(', ')