mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-05 09:21:11 +00:00
Use pluralize
for countdown in MigrationWarning
module
This commit is contained in:
parent
4fa203e69e
commit
2e266d8cb0
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
module Mastodon
|
module Mastodon
|
||||||
module MigrationWarning
|
module MigrationWarning
|
||||||
|
include ActionView::Helpers::TextHelper
|
||||||
|
|
||||||
WARNING_SECONDS = 10
|
WARNING_SECONDS = 10
|
||||||
|
|
||||||
DEFAULT_WARNING = <<~WARNING_MESSAGE.freeze
|
DEFAULT_WARNING = <<~WARNING_MESSAGE.freeze
|
||||||
|
@ -23,7 +25,7 @@ module Mastodon
|
||||||
|
|
||||||
def announce_countdown
|
def announce_countdown
|
||||||
WARNING_SECONDS.downto(1) do |i|
|
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
|
sleep 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user