From 29a779159eb1f49f72e6e0d6cbd16d2ce3c1de8d Mon Sep 17 00:00:00 2001 From: GunChleoc Date: Sun, 24 Sep 2023 09:09:12 +0100 Subject: [PATCH] Fix variable name for scheduled status limits --- app/models/scheduled_status.rb | 4 ++-- config/locales/en.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/models/scheduled_status.rb b/app/models/scheduled_status.rb index b241790d769..1f4f04268d4 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 8133b30b9b4..3e70edc9411 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.