Use pluralize for countdown in MigrationWarning module

This commit is contained in:
Matt Jankowski 2025-06-04 18:18:46 -04:00
parent e9170e2de1
commit 3c2852daf3

View File

@ -2,6 +2,8 @@
module Mastodon
module MigrationWarning
include ActionView::Helpers::TextHelper
WARNING_SECONDS = 10
DEFAULT_WARNING = <<~WARNING_MESSAGE.freeze
@ -23,7 +25,7 @@ module Mastodon
def announce_countdown
WARNING_SECONDS.downto(1) do |i|
say "Continuing in #{i} second#{'s' unless i == 1}...", true
say "Continuing in #{pluralize i, 'second'}}...", true
sleep 1
end
end