Use I18n for media attachment validation errors
These are currently user facing errors, but are not localized. This adds the ability for these messages to be localized.
This commit is contained in:
parent
13c0077003
commit
ad5ddd5e95
3 changed files with 8 additions and 4 deletions
|
@ -141,7 +141,7 @@ RSpec.describe PostStatusService do
|
|||
)
|
||||
end.to raise_error(
|
||||
Mastodon::ValidationError,
|
||||
'Cannot attach more than 4 files',
|
||||
I18n.t('media_attachments.validations.too_many'),
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -160,7 +160,7 @@ RSpec.describe PostStatusService do
|
|||
)
|
||||
end.to raise_error(
|
||||
Mastodon::ValidationError,
|
||||
'Cannot attach a video to a toot that already contains images',
|
||||
I18n.t('media_attachments.validations.images_and_video'),
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue