Merge pull request #9788 from opf/fix/39561/whitelist-translation

[39561] Improve translation of whitelist error
pull/9792/head
Oliver Günther 3 years ago committed by GitHub
commit 2e1a713454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      config/locales/en.yml
  2. 4
      spec/requests/api/v3/attachments/attachment_resource_shared_examples.rb

@ -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'

@ -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

Loading…
Cancel
Save