Skip to content

Commit c06ba20

Browse files
noellabohiyuki2578
authored andcommitted
Change dashboard to short number notation (mastodon#11847)
* Add short numeric notation to the dashboard * Fix i18n * Fix to embed units in code * Remove settings and always use short notation * Remove misplaced test lines * Fit to other pages
1 parent f8c4901 commit c06ba20

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

app/views/admin/dashboard/index.html.haml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@
44
.dashboard__counters
55
%div
66
= link_to admin_accounts_url(local: 1, recent: 1) do
7-
.dashboard__counters__num= number_with_delimiter @users_count
7+
.dashboard__counters__num= number_to_human @users_count, strip_insignificant_zeros: true
88
.dashboard__counters__label= t 'admin.dashboard.total_users'
99
%div
1010
%div
11-
.dashboard__counters__num= number_with_delimiter @registrations_week
11+
.dashboard__counters__num= number_to_human @registrations_week, strip_insignificant_zeros: true
1212
.dashboard__counters__label= t 'admin.dashboard.week_users_new'
1313
%div
1414
%div
15-
.dashboard__counters__num= number_with_delimiter @logins_week
15+
.dashboard__counters__num= number_to_human @logins_week, strip_insignificant_zeros: true
1616
.dashboard__counters__label= t 'admin.dashboard.week_users_active'
1717
%div
1818
= link_to admin_pending_accounts_path do
19-
.dashboard__counters__num= number_with_delimiter @pending_users_count
19+
.dashboard__counters__num= number_to_human @pending_users_count, strip_insignificant_zeros: true
2020
.dashboard__counters__label= t 'admin.dashboard.pending_users'
2121
%div
2222
= link_to admin_reports_url do
23-
.dashboard__counters__num= number_with_delimiter @reports_count
23+
.dashboard__counters__num= number_to_human @reports_count, strip_insignificant_zeros: true
2424
.dashboard__counters__label= t 'admin.dashboard.open_reports'
2525
%div
2626
= link_to admin_tags_path(review: 'pending_review') do
27-
.dashboard__counters__num= number_with_delimiter @pending_tags_count
27+
.dashboard__counters__num= number_to_human @pending_tags_count, strip_insignificant_zeros: true
2828
.dashboard__counters__label= t 'admin.dashboard.pending_tags'
2929
%div
3030
%div
31-
.dashboard__counters__num= number_with_delimiter @interactions_week
31+
.dashboard__counters__num= number_to_human @interactions_week, strip_insignificant_zeros: true
3232
.dashboard__counters__label= t 'admin.dashboard.week_interactions'
3333
%div
3434
= link_to sidekiq_url do
35-
.dashboard__counters__num= number_with_delimiter @queue_backlog
35+
.dashboard__counters__num= number_to_human @queue_backlog, strip_insignificant_zeros: true
3636
.dashboard__counters__label= t 'admin.dashboard.backlog'
3737

3838
.dashboard__widgets

0 commit comments

Comments
 (0)