Merge remote-tracking branch 'parent/main' into upstream-20240118

This commit is contained in:
KMY 2024-01-18 09:17:39 +09:00
commit 2b51fabe9c
397 changed files with 2899 additions and 3252 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.public_statuses_count, precision: 3, strip_insignificant_zeros: true),
account_formatted_stat(account.public_statuses_count),
I18n.t('accounts.posts', count: account.public_statuses_count),
].join(' '),
[
number_to_human(account.public_following_count, precision: 3, strip_insignificant_zeros: true),
account_formatted_stat(account.public_following_count),
I18n.t('accounts.following', count: account.public_following_count),
].join(' '),
[
number_to_human(account.public_followers_count, precision: 3, strip_insignificant_zeros: true),
account_formatted_stat(account.public_followers_count),
I18n.t('accounts.followers', count: account.public_followers_count),
].join(' '),
].join(', ')