diff --git a/app/models/scheduled_status.rb b/app/models/scheduled_status.rb index b241790d76..1f4f04268d 100644 --- a/app/models/scheduled_status.rb +++ b/app/models/scheduled_status.rb @@ -31,10 +31,10 @@ class ScheduledStatus < ApplicationRecord end def validate_total_limit - errors.add(:base, I18n.t('scheduled_statuses.over_total_limit', count: TOTAL_LIMIT)) if account.scheduled_statuses.count >= TOTAL_LIMIT + errors.add(:base, I18n.t('scheduled_statuses.over_total_limit', limit: TOTAL_LIMIT)) if account.scheduled_statuses.count >= TOTAL_LIMIT end def validate_daily_limit - errors.add(:base, I18n.t('scheduled_statuses.over_daily_limit', count: DAILY_LIMIT)) if account.scheduled_statuses.where('scheduled_at::date = ?::date', scheduled_at).count >= DAILY_LIMIT + errors.add(:base, I18n.t('scheduled_statuses.over_daily_limit', limit: DAILY_LIMIT)) if account.scheduled_statuses.where('scheduled_at::date = ?::date', scheduled_at).count >= DAILY_LIMIT end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 8133b30b9b..3e70edc941 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1763,11 +1763,11 @@ en: tag: 'Public posts tagged #%{hashtag}' scheduled_statuses: over_daily_limit: - one: You have exceeded the limit of %{count} scheduled post for today - other: You have exceeded the limit of %{count} scheduled posts for today + one: You have exceeded the limit of %{limit} scheduled post for today + other: You have exceeded the limit of %{limit} scheduled posts for today over_total_limit: - one: You have exceeded the limit of %{count} scheduled post - other: You have exceeded the limit of %{count} scheduled posts + one: You have exceeded the limit of %{limit} scheduled post + other: You have exceeded the limit of %{limit} scheduled posts too_soon: The scheduled date must be in the future self_destruct: lead_html: Unfortunately, %{domain} is permanently closing down. If you had an account there, you will not be able to continue using it, but you can still request a backup of your data.