diff --git a/lib/grape/locale/en.yml b/lib/grape/locale/en.yml index 546529a3e8..9377e4c4e0 100644 --- a/lib/grape/locale/en.yml +++ b/lib/grape/locale/en.yml @@ -11,8 +11,8 @@ en: except_values: 'has a value not allowed' same_as: 'is not the same as %{parameter}' missing_vendor_option: - problem: 'missing :vendor option.' - summary: 'when version using header, you must specify :vendor option. ' + problem: 'missing :vendor option' + summary: 'when version using header, you must specify :vendor option' resolution: "eg: version 'v1', using: :header, vendor: 'twitter'" missing_mime_type: problem: 'missing mime type for %{new_format}' @@ -21,12 +21,12 @@ en: or add your own with content_type :%{new_format}, 'application/%{new_format}' " invalid_with_option_for_represent: - problem: 'You must specify an entity class in the :with option.' + problem: 'you must specify an entity class in the :with option' resolution: 'eg: represent User, :with => Entity::User' - missing_option: 'You must specify :%{option} options.' + missing_option: 'you must specify :%{option} options' invalid_formatter: 'cannot convert %{klass} to %{to_format}' invalid_versioner_option: - problem: 'Unknown :using for versioner: %{strategy}' + problem: 'unknown :using for versioner: %{strategy}' resolution: 'available strategy for :using is :path, :header, :accept_version_header, :param' unknown_validator: 'unknown validator: %{validator_type}' unknown_options: 'unknown options: %{options}' @@ -44,12 +44,12 @@ en: "when specifying %{body_format} as content-type, you must pass valid %{body_format} in the request's 'body' " - empty_message_body: 'Empty message body supplied with %{body_format} content-type' - too_many_multipart_files: "The number of uploaded files exceeded the system's configured limit (%{limit})" + empty_message_body: 'empty message body supplied with %{body_format} content-type' + too_many_multipart_files: "the number of uploaded files exceeded the system's configured limit (%{limit})" invalid_accept_header: - problem: 'Invalid accept header' + problem: 'invalid accept header' resolution: '%{message}' invalid_version_header: - problem: 'Invalid version header' + problem: 'invalid version header' resolution: '%{message}' invalid_response: 'Invalid response' diff --git a/spec/grape/endpoint_spec.rb b/spec/grape/endpoint_spec.rb index a599abdf40..ec51d2edbb 100644 --- a/spec/grape/endpoint_spec.rb +++ b/spec/grape/endpoint_spec.rb @@ -432,7 +432,7 @@ def app end post '/upload', { file: '' }, 'CONTENT_TYPE' => 'multipart/form-data; boundary=foobar' expect(last_response.status).to eq(400) - expect(last_response.body).to eq('Empty message body supplied with multipart/form-data; boundary=foobar content-type') + expect(last_response.body).to eq('empty message body supplied with multipart/form-data; boundary=foobar content-type') end end @@ -453,7 +453,7 @@ def app end post '/upload', { file: Rack::Test::UploadedFile.new(__FILE__, 'text/plain'), extra: Rack::Test::UploadedFile.new(__FILE__, 'text/plain') } expect(last_response.status).to eq(413) - expect(last_response.body).to eq("The number of uploaded files exceeded the system's configured limit (1)") + expect(last_response.body).to eq("the number of uploaded files exceeded the system's configured limit (1)") end end diff --git a/spec/grape/exceptions/invalid_versioner_option_spec.rb b/spec/grape/exceptions/invalid_versioner_option_spec.rb index 19fff343d9..d6955bd8a9 100644 --- a/spec/grape/exceptions/invalid_versioner_option_spec.rb +++ b/spec/grape/exceptions/invalid_versioner_option_spec.rb @@ -8,7 +8,7 @@ it 'contains the problem in the message' do expect(error.message).to include( - 'Unknown :using for versioner: headers' + 'unknown :using for versioner: headers' ) end end diff --git a/spec/grape/exceptions/missing_option_spec.rb b/spec/grape/exceptions/missing_option_spec.rb index 633c28a3f2..3d8f03e588 100644 --- a/spec/grape/exceptions/missing_option_spec.rb +++ b/spec/grape/exceptions/missing_option_spec.rb @@ -8,7 +8,7 @@ it 'contains the problem in the message' do expect(error.message).to include( - 'You must specify :path options.' + 'you must specify :path options' ) end end