]> cat aescling's git repositories - mastodon.git/commitdiff
Add `strip_insignificant_zeros: true` option to `number_to_human` (#4993)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Mon, 18 Sep 2017 02:55:23 +0000 (11:55 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 18 Sep 2017 02:55:23 +0000 (04:55 +0200)
app/views/accounts/_header.html.haml

index a6366b0f3e9e85cf1417c9eed6e8d925a9d46873..08c3891d275ed294870a763c8962515337f431b8 100644 (file)
     .details-counters
       .counter{ class: active_nav_class(short_account_url(account)) }
         = link_to short_account_url(account), class: 'u-url u-uid' do
-          %span.counter-number= number_to_human account.statuses_count
+          %span.counter-number= number_to_human account.statuses_count, strip_insignificant_zeros: true
           %span.counter-label= t('accounts.posts')
 
       .counter{ class: active_nav_class(account_following_index_url(account)) }
         = link_to account_following_index_url(account) do
-          %span.counter-number= number_to_human account.following_count
+          %span.counter-number= number_to_human account.following_count, strip_insignificant_zeros: true
           %span.counter-label= t('accounts.following')
 
       .counter{ class: active_nav_class(account_followers_url(account)) }
         = link_to account_followers_url(account) do
-          %span.counter-number= number_to_human account.followers_count
+          %span.counter-number= number_to_human account.followers_count, strip_insignificant_zeros: true
           %span.counter-label= t('accounts.followers')