From 64a833329c2f5050008ec40809f34c11a675db21 Mon Sep 17 00:00:00 2001 From: 24c02 <163450896+24c02@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:10:35 -0500 Subject: [PATCH] are we plural --- app/components/admin/search/index.rb | 2 +- app/components/uploads/index.rb | 2 +- app/services/flavor_text_service.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/admin/search/index.rb b/app/components/admin/search/index.rb index 4aa72de..4949ba6 100644 --- a/app/components/admin/search/index.rb +++ b/app/components/admin/search/index.rb @@ -105,7 +105,7 @@ class Components::Admin::Search::Index < Components::Base end div(style: "display: flex; align-items: center; gap: 16px;") do div(style: "text-align: right; font-size: 12px; color: var(--fgColor-muted);") do - div { "#{user.total_files} files" } + div { pluralize(user.total_files, "file") } div { user.total_storage_formatted } end if user.is_admin? diff --git a/app/components/uploads/index.rb b/app/components/uploads/index.rb index 51f14cc..265417a 100644 --- a/app/components/uploads/index.rb +++ b/app/components/uploads/index.rb @@ -31,7 +31,7 @@ class Components::Uploads::Index < Components::Base h1(style: "font-size: 2rem; font-weight: 600; margin: 0;") { "Your Uploads" } p(style: "color: var(--fgColor-muted, #656d76); margin: 8px 0 0; font-size: 14px;") do count = uploads.respond_to?(:total_count) ? uploads.total_count : uploads.size - plain "#{count} file#{count == 1 ? '' : 's'}" + plain pluralize(count, "file") end end diff --git a/app/services/flavor_text_service.rb b/app/services/flavor_text_service.rb index 66bdc4d..4753a47 100644 --- a/app/services/flavor_text_service.rb +++ b/app/services/flavor_text_service.rb @@ -167,7 +167,7 @@ class FlavorTextService "low-sodium edition", 'we put the ":3" in "S3"!', "do not adjust your monitor.", - "only #{@random.rand(5..50)} missing #{[ "file", "files" ].sample(random: @random)}!", + "only #{@random.rand(5..50)} missing files!", "why are you reading these", "go outside", "posture check!",