diff --git a/config/locales/en.yml b/config/locales/en.yml index 43b09a0729..b11a057e2e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -647,7 +647,9 @@ en: attachment: attributes: content_type: - not_whitelisted: "is set to '%{value}', which is not whitelisted for uploading." + blank: "The content type of the file cannot be blank." + not_whitelisted: "The file was rejected by an automatic filter. '%{value}' is not whitelisted for upload." + format: "%{message}" capability: context: global: 'Global' diff --git a/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb b/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb index 00946f9548..3233e69d49 100644 --- a/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb +++ b/spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb @@ -299,7 +299,7 @@ shared_examples 'an APIv3 attachment resource', type: :request, content_type: :j let(:request_parts) { { metadata: metadata.to_json, wrongFileSection: file } } it_behaves_like 'constraint violation' do - let(:message) { "Content type #{I18n.t('activerecord.errors.messages.blank')}" } + let(:message) { "The content type of the file cannot be blank" } end end @@ -586,7 +586,7 @@ shared_examples 'an APIv3 attachment resource', type: :request, content_type: :j let(:request_parts) { { metadata: metadata.to_json, wrongFileSection: file } } it_behaves_like 'constraint violation' do - let(:message) { "Content type #{I18n.t('activerecord.errors.messages.blank')}" } + let(:message) { "The content type of the file cannot be blank." } end end