active_storage_validations 1.1.4 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +84 -33
  3. data/config/locales/da.yml +33 -0
  4. data/config/locales/de.yml +6 -0
  5. data/config/locales/en.yml +6 -0
  6. data/config/locales/es.yml +6 -0
  7. data/config/locales/fr.yml +6 -0
  8. data/config/locales/it.yml +6 -0
  9. data/config/locales/ja.yml +6 -0
  10. data/config/locales/nl.yml +6 -0
  11. data/config/locales/pl.yml +6 -0
  12. data/config/locales/pt-BR.yml +6 -0
  13. data/config/locales/ru.yml +6 -0
  14. data/config/locales/sv.yml +11 -1
  15. data/config/locales/tr.yml +6 -0
  16. data/config/locales/uk.yml +6 -0
  17. data/config/locales/vi.yml +6 -0
  18. data/config/locales/zh-CN.yml +6 -0
  19. data/lib/active_storage_validations/aspect_ratio_validator.rb +10 -34
  20. data/lib/active_storage_validations/attached_validator.rb +6 -4
  21. data/lib/active_storage_validations/base_size_validator.rb +68 -0
  22. data/lib/active_storage_validations/concerns/active_storageable.rb +28 -0
  23. data/lib/active_storage_validations/concerns/errorable.rb +4 -5
  24. data/lib/active_storage_validations/concerns/loggable.rb +9 -0
  25. data/lib/active_storage_validations/concerns/metadatable.rb +31 -0
  26. data/lib/active_storage_validations/content_type_spoof_detector.rb +130 -0
  27. data/lib/active_storage_validations/content_type_validator.rb +56 -22
  28. data/lib/active_storage_validations/dimension_validator.rb +31 -52
  29. data/lib/active_storage_validations/limit_validator.rb +5 -3
  30. data/lib/active_storage_validations/marcel_extensor.rb +5 -0
  31. data/lib/active_storage_validations/matchers/aspect_ratio_validator_matcher.rb +6 -15
  32. data/lib/active_storage_validations/matchers/attached_validator_matcher.rb +5 -13
  33. data/lib/active_storage_validations/matchers/base_size_validator_matcher.rb +134 -0
  34. data/lib/active_storage_validations/matchers/concerns/attachable.rb +66 -0
  35. data/lib/active_storage_validations/matchers/concerns/contextable.rb +20 -8
  36. data/lib/active_storage_validations/matchers/concerns/messageable.rb +1 -1
  37. data/lib/active_storage_validations/matchers/concerns/validatable.rb +9 -3
  38. data/lib/active_storage_validations/matchers/content_type_validator_matcher.rb +12 -2
  39. data/lib/active_storage_validations/matchers/dimension_validator_matcher.rb +6 -15
  40. data/lib/active_storage_validations/matchers/limit_validator_matcher.rb +127 -0
  41. data/lib/active_storage_validations/matchers/processable_image_validator_matcher.rb +78 -0
  42. data/lib/active_storage_validations/matchers/size_validator_matcher.rb +4 -139
  43. data/lib/active_storage_validations/matchers/total_size_validator_matcher.rb +31 -0
  44. data/lib/active_storage_validations/matchers.rb +6 -15
  45. data/lib/active_storage_validations/metadata.rb +27 -12
  46. data/lib/active_storage_validations/processable_image_validator.rb +17 -32
  47. data/lib/active_storage_validations/size_validator.rb +6 -55
  48. data/lib/active_storage_validations/total_size_validator.rb +45 -0
  49. data/lib/active_storage_validations/version.rb +1 -1
  50. data/lib/active_storage_validations.rb +4 -1
  51. metadata +45 -46
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 305a698168303d4889b8ba6b3972201842af8679758f6f9c81140658a0abdc8a
4
- data.tar.gz: 414b60017f2da20463daa783e56028c927c2090a80e7728877f569323ec0b60a
3
+ metadata.gz: '09b483aef23513aaf10b56c6df6046078bf14e93fcfdebe2e82f2db862b85514'
4
+ data.tar.gz: d040c36c24fc1fb2b4d1a2e6bb92bde86521cedfda4b4e96436a10b364499f63
5
5
  SHA512:
6
- metadata.gz: 48123a7a880a4f8e1b7680d3ea21b2e54c6f13b884b351e11c3f912fcdeec01efe24a0d6fc26b1021ec9b92460f6c6df321c869d9a8ce4e1848d339b1e35b0ca
7
- data.tar.gz: faee600c94d2534a943feb4eebe14574341e3920e9bfd03fe663afad85c80e01c8cb7f95ced957ce333a323553798c6d73c0f8bffb33bdc185b922047f176b20
6
+ metadata.gz: eb6df31c0374b1bfa804281f0effbaa0443ff6a812abd4a46e1ac4293a881e691fd5c61cd4c2622b027085acb3d10c14255f04cac3bab01f13f133d2f26c60af
7
+ data.tar.gz: b5553a4a7a2f08542c8e6f9dd928b0cc78a09eb846f73346dcdec1b3826bb4a5f04ac200c21e6e2f0f58f6dcc173f226a04e7a2c85d7c15a24b5b827bfb04dcb
data/README.md CHANGED
@@ -17,6 +17,7 @@ This gems doing it for you. Just use `attached: true` or `content_type: 'image/p
17
17
  * validates if file(s) attached
18
18
  * validates content type
19
19
  * validates size of files
20
+ * validates total size of files
20
21
  * validates dimension of images/videos
21
22
  * validates number of uploaded files (min/max required)
22
23
  * validates aspect ratio (if square, portrait, landscape, is_16_9, ...)
@@ -62,13 +63,13 @@ class Project < ApplicationRecord
62
63
  validates :logo, attached: true, size: { less_than: 100.megabytes , message: 'is too large' }
63
64
  validates :preview, attached: true, size: { between: 1.kilobyte..100.megabytes , message: 'is not given between size' }
64
65
  validates :attachment, attached: true, content_type: { in: 'application/pdf', message: 'is not a PDF' }
65
- validates :documents, limit: { min: 1, max: 3 }
66
+ validates :documents, limit: { min: 1, max: 3 }, total_size: { less_than: 5.megabytes }
66
67
  end
67
68
  ```
68
69
 
69
70
  ### More examples
70
71
 
71
- - Content type validation using symbols or regex. The symbol types must be registered by [`Marcel::EXTENSIONS`](https://github.com/rails/marcel/blob/main/lib/marcel/tables.rb) that's used by this gem to infer the full content type.
72
+ - Content type validation using symbols or regex.
72
73
 
73
74
  ```ruby
74
75
  class User < ApplicationRecord
@@ -82,6 +83,33 @@ class User < ApplicationRecord
82
83
  validates :avatar, content_type: /\Aimage\/.*\z/
83
84
  end
84
85
  ```
86
+ Please note that the symbol types must be registered by [`Marcel::EXTENSIONS`](https://github.com/rails/marcel/blob/main/lib/marcel/tables.rb) that's used by this gem to infer the full content type.
87
+ Example code for adding a new content type to Marcel:
88
+ ```ruby
89
+ # config/initializers/mime_types.rb
90
+ Marcel::MimeType.extend "application/ino", extensions: %w(ino), parents: "text/plain" # Registering arduino INO files
91
+ ```
92
+
93
+ **Content type spoofing protection**
94
+ File content type spoofing happens when an ill-intentioned user uploads a file which hides its true content type by faking its extension and its declared content type value. For example, a user may try to upload a `.exe` file (application/x-msdownload content type) dissimulated as a `.jpg` file (image/jpeg content type).
95
+
96
+ By default, the gem does not prevent content type spoofing (prevent it by default is a breaking change that will be implemented in v2). The spoofing protection relies on both the linux `file` command and `Marcel` gem.
97
+
98
+ Take note that the `file` analyzer will not find the exactly same content type as the ActiveStorage blob (its content type detection relies on a different logic using content+filename+extension). To handle this issue, we consider a close parent content type to be a match. For example, for an ActiveStorage blob which content type is `video/x-ms-wmv`, the `file` analyzer will probably detect a `video/x-ms-asf` content type, this will be considered as a valid match because these 2 content types are closely related. The correlation mapping is based on `Marcel::TYPE_PARENTS`.
99
+
100
+ The difficulty to accurately predict a mime type may generate false positives, if so there are two solutions available:
101
+ - If the ActiveStorage blob content type is closely related to the detected content type using the `file` analyzer, you can enhance `Marcel::TYPE_PARENTS` mapping using `Marcel::MimeType.extend "application/x-rar-compressed", parents: %(application/x-rar)` in the `config/initializers/mime_types.rb` file. (Please drop an issue so we can add it to the gem for everyone!)
102
+ - If the ActiveStorage blob content type is not closely related, you still can disable the content type spoofing protection in the validator, if so, please drop us an issue so we can fix it for everyone!
103
+
104
+ ```ruby
105
+ class User < ApplicationRecord
106
+ has_one_attached :avatar
107
+
108
+ validates :avatar, attached: true, content_type: :png # spoofing_protection not enabled, at your own risks!
109
+ validates :avatar, attached: true, content_type: { with: :png, spoofing_protection: true } # spoofing_protection enabled
110
+ end
111
+ ```
112
+
85
113
 
86
114
  - Dimension validation with `width`, `height` and `in`.
87
115
 
@@ -153,18 +181,23 @@ en:
153
181
  file_size_not_greater_than: "file size must be greater than %{min_size} (current size is %{file_size})"
154
182
  file_size_not_greater_than_or_equal_to: "file size must be greater than or equal to %{min_size} (current size is %{file_size})"
155
183
  file_size_not_between: "file size must be between %{min_size} and %{max_size} (current size is %{file_size})"
184
+ total_file_size_not_less_than: "total file size must be less than %{max_size} (current size is %{total_file_size})"
185
+ total_file_size_not_less_than_or_equal_to: "total file size must be less than or equal to %{max_size} (current size is %{total_file_size})"
186
+ total_file_size_not_greater_than: "total file size must be greater than %{min_size} (current size is %{total_file_size})"
187
+ total_file_size_not_greater_than_or_equal_to: "total file size must be greater than or equal to %{min_size} (current size is %{total_file_size})"
188
+ total_file_size_not_between: "total file size must be between %{min_size} and %{max_size} (current size is %{total_file_size})"
156
189
  limit_out_of_range: "total number is out of range"
157
190
  image_metadata_missing: "is not a valid image"
158
- dimension_min_inclusion: "must be greater than or equal to %{width} x %{height} pixel."
159
- dimension_max_inclusion: "must be less than or equal to %{width} x %{height} pixel."
160
- dimension_width_inclusion: "width is not included between %{min} and %{max} pixel."
161
- dimension_height_inclusion: "height is not included between %{min} and %{max} pixel."
162
- dimension_width_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixel."
163
- dimension_height_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixel."
164
- dimension_width_less_than_or_equal_to: "width must be less than or equal to %{length} pixel."
165
- dimension_height_less_than_or_equal_to: "height must be less than or equal to %{length} pixel."
166
- dimension_width_equal_to: "width must be equal to %{length} pixel."
167
- dimension_height_equal_to: "height must be equal to %{length} pixel."
191
+ dimension_min_inclusion: "must be greater than or equal to %{width} x %{height} pixel"
192
+ dimension_max_inclusion: "must be less than or equal to %{width} x %{height} pixel"
193
+ dimension_width_inclusion: "width is not included between %{min} and %{max} pixel"
194
+ dimension_height_inclusion: "height is not included between %{min} and %{max} pixel"
195
+ dimension_width_greater_than_or_equal_to: "width must be greater than or equal to %{length} pixel"
196
+ dimension_height_greater_than_or_equal_to: "height must be greater than or equal to %{length} pixel"
197
+ dimension_width_less_than_or_equal_to: "width must be less than or equal to %{length} pixel"
198
+ dimension_height_less_than_or_equal_to: "height must be less than or equal to %{length} pixel"
199
+ dimension_width_equal_to: "width must be equal to %{length} pixel"
200
+ dimension_height_equal_to: "height must be equal to %{length} pixel"
168
201
  aspect_ratio_not_square: "must be a square image"
169
202
  aspect_ratio_not_portrait: "must be a portrait image"
170
203
  aspect_ratio_not_landscape: "must be a landscape image"
@@ -177,7 +210,7 @@ In several cases, Active Storage Validations provides variables to help you cust
177
210
 
178
211
  ### Aspect ratio
179
212
  The keys starting with `aspect_ratio_` support two variables that you can use:
180
- - `aspect_ratio` containing the expected aspect ratio, especially usefull for custom aspect ratio
213
+ - `aspect_ratio` containing the expected aspect ratio, especially useful for custom aspect ratio
181
214
  - `filename` containing the current file name
182
215
 
183
216
  For example :
@@ -204,7 +237,7 @@ The keys starting with `dimension_` support six variables that you can use:
204
237
  - `max` containing the maximum width or height allowed
205
238
  - `width` containing the minimum or maximum width allowed
206
239
  - `height` containing the minimum or maximum width allowed
207
- - `lenght` containing the exact width or height allowed
240
+ - `length` containing the exact width or height allowed
208
241
  - `filename` containing the current file name
209
242
 
210
243
  For example :
@@ -217,7 +250,7 @@ dimension_min_inclusion: "must be greater than or equal to %{width} x %{height}
217
250
  The keys starting with `file_size_not_` support four variables that you can use:
218
251
  - `file_size` containing the current file size
219
252
  - `min` containing the minimum file size
220
- - `max` containing the maxmimum file size
253
+ - `max` containing the maximum file size
221
254
  - `filename` containing the current file name
222
255
 
223
256
  For example :
@@ -226,6 +259,18 @@ For example :
226
259
  file_size_not_between: "file size must be between %{min_size} and %{max_size} (current size is %{file_size})"
227
260
  ```
228
261
 
262
+ ### Total file size
263
+ The keys starting with `total_file_size_not_` support three variables that you can use:
264
+ - `total_file_size` containing the current total file size
265
+ - `min` containing the minimum file size
266
+ - `max` containing the maximum file size
267
+
268
+ For example :
269
+
270
+ ```yml
271
+ total_file_size_not_between: "total file size must be between %{min_size} and %{max_size} (current size is %{total_file_size})"
272
+ ```
273
+
229
274
  ### Number of files
230
275
  The `limit_out_of_range` key supports two variables that you can use:
231
276
  - `min` containing the minimum number of files
@@ -252,7 +297,6 @@ image_not_processable: "is not a valid image (file: %{filename})"
252
297
  Add this line to your application's Gemfile:
253
298
 
254
299
  ```ruby
255
- # Rails 5.2 and Rails 6
256
300
  gem 'active_storage_validations'
257
301
 
258
302
  # Optional, to use :dimension validator or :aspect_ratio validator
@@ -274,7 +318,7 @@ Very simple example of validation with file attached, content type check and cus
274
318
  [![Sample](https://raw.githubusercontent.com/igorkasyanchuk/active_storage_validations/master/docs/preview.png)](https://raw.githubusercontent.com/igorkasyanchuk/active_storage_validations/master/docs/preview.png)
275
319
 
276
320
  ## Test matchers
277
- Provides RSpec-compatible and Minitest-compatible matchers for testing the validators. Only `aspect_ratio`, `attached`, `content_type`, `dimension` and `size` validators currently have their matcher developped.
321
+ Provides RSpec-compatible and Minitest-compatible matchers for testing the validators.
278
322
 
279
323
  ### RSpec
280
324
 
@@ -304,6 +348,14 @@ describe User do
304
348
  # attached
305
349
  it { is_expected.to validate_attached_of(:avatar) }
306
350
 
351
+ # processable_image
352
+ it { is_expected.to validate_processable_image_of(:avatar) }
353
+
354
+ # limit
355
+ # #min, #max
356
+ it { is_expected.to validate_limit_of(:avatar).min(1) }
357
+ it { is_expected.to validate_limit_of(:avatar).max(5) }
358
+
307
359
  # content_type:
308
360
  # #allowing, #rejecting
309
361
  it { is_expected.to validate_content_type_of(:avatar).allowing('image/png', 'image/gif') }
@@ -327,6 +379,14 @@ describe User do
327
379
  it { is_expected.to validate_size_of(:avatar).greater_than(1.kilobyte) }
328
380
  it { is_expected.to validate_size_of(:avatar).greater_than_or_equal_to(1.kilobyte) }
329
381
  it { is_expected.to validate_size_of(:avatar).between(100..500.kilobytes) }
382
+
383
+ # total_size:
384
+ # #less_than, #less_than_or_equal_to, #greater_than, #greater_than_or_equal_to, #between
385
+ it { is_expected.to validate_total_size_of(:avatar).less_than(50.kilobytes) }
386
+ it { is_expected.to validate_total_size_of(:avatar).less_than_or_equal_to(50.kilobytes) }
387
+ it { is_expected.to validate_total_size_of(:avatar).greater_than(1.kilobyte) }
388
+ it { is_expected.to validate_total_size_of(:avatar).greater_than_or_equal_to(1.kilobyte) }
389
+ it { is_expected.to validate_total_size_of(:avatar).between(100..500.kilobytes) }
330
390
  end
331
391
  ```
332
392
  (Note that matcher methods are chainable)
@@ -376,7 +436,7 @@ Then you can use the matchers with the syntax specified in the RSpec section, ju
376
436
 
377
437
  To run tests in root folder of gem:
378
438
 
379
- * `BUNDLE_GEMFILE=gemfiles/rails_6_1_3_1.gemfile bundle exec rake test` to run for Rails 6.1
439
+ * `BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle exec rake test` to run for Rails 6.1.4
380
440
  * `BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake test` to run for Rails 7.0
381
441
  * `BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test` to run for Rails 7.0
382
442
  * `BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle exec rake test` to run for Rails main branch
@@ -384,11 +444,11 @@ To run tests in root folder of gem:
384
444
  Snippet to run in console:
385
445
 
386
446
  ```bash
387
- BUNDLE_GEMFILE=gemfiles/rails_6_1_3_1.gemfile bundle
447
+ BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle
388
448
  BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle
389
449
  BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle
390
450
  BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle
391
- BUNDLE_GEMFILE=gemfiles/rails_6_1_3_1.gemfile bundle exec rake test
451
+ BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle exec rake test
392
452
  BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake test
393
453
  BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test
394
454
  BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle exec rake test
@@ -399,18 +459,6 @@ Tips:
399
459
  - To focus a specific file, use the TEST option provided by minitest, e.g. to only run size_validator_test.rb file you will execute the following command: `bundle exec rake test TEST=test/validators/size_validator_test.rb`
400
460
 
401
461
 
402
- ## Known issues
403
-
404
- - There is an issue in Rails which it possible to get if you have added a validation and generating for example an image preview of attachments. It can be fixed with this:
405
-
406
- ```erb
407
- <% if @user.avatar.attached? && @user.avatar.attachment.blob.present? && @user.avatar.attachment.blob.persisted? %>
408
- <%= image_tag @user.avatar %>
409
- <% end %>
410
- ```
411
-
412
- This is a Rails issue, and is fixed in Rails 6.
413
-
414
462
  ## Contributing
415
463
 
416
464
  You are welcome to contribute.
@@ -457,7 +505,6 @@ You are welcome to contribute.
457
505
  - https://github.com/vietqhoang
458
506
  - https://github.com/kemenaran
459
507
  - https://github.com/jrmhaig
460
- - https://github.com/tagliala
461
508
  - https://github.com/evedovelli
462
509
  - https://github.com/JuanVqz
463
510
  - https://github.com/luiseugenio
@@ -480,6 +527,10 @@ You are welcome to contribute.
480
527
  - https://github.com/tagliala
481
528
  - https://github.com/ocarreterom
482
529
  - https://github.com/aditya-cherukuri
530
+ - https://github.com/searls
531
+ - https://github.com/yenshirak
532
+ - https://github.com/wataori
533
+ - https://github.com/Scorpahr
483
534
 
484
535
 
485
536
  ## License
@@ -0,0 +1,33 @@
1
+ da:
2
+ errors:
3
+ messages:
4
+ content_type_invalid: "har en ugyldig indholdstype"
5
+ spoofed_content_type: "har en indholdstype, der ikke er, hvad den erklæres gennem sit indhold, filnavn og udvidelse"
6
+ file_size_not_less_than: "filstørrelsen skal være mindre end %{max_size} (den nuværende størrelse er %{file_size})"
7
+ file_size_not_less_than_or_equal_to: "filstørrelsen skal være mindre end eller lig med %{max_size} (den nuværende størrelse er %{file_size})"
8
+ file_size_not_greater_than: "filstørrelsen skal være større end %{min_size} (den nuværende størrelse er %{file_size})"
9
+ file_size_not_greater_than_or_equal_to: "filstørrelsen skal være større end eller lig med %{min_size} (den nuværende størrelse er %{file_size})"
10
+ file_size_not_between: "filstørrelsen skal være mellem %{min_size} og %{max_size} (den nuværende størrelse er %{file_size})"
11
+ total_file_size_not_less_than: "den samlede filstørrelse skal være mindre end %{max_size} (aktuel størrelse er %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "den samlede filstørrelse skal være mindre end eller lig med %{max_size} (aktuel størrelse er %{total_file_size})"
13
+ total_file_size_not_greater_than: "den samlede filstørrelse skal være større end %{min_size} (aktuel størrelse er %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "den samlede filstørrelse skal være større end eller lig med %{min_size} (aktuel størrelse er %{total_file_size})"
15
+ total_file_size_not_between: "den samlede filstørrelse skal være mellem %{min_size} og %{max_size} (aktuel størrelse er %{total_file_size})"
16
+ limit_out_of_range: "det samlede antal er uden for rækkevidde"
17
+ image_metadata_missing: "er ikke et gyldigt billede"
18
+ dimension_min_inclusion: "skal være større end eller lig med %{width} x %{height} pixel"
19
+ dimension_max_inclusion: "skal være mindre end eller lig med %{width} x %{height} pixel"
20
+ dimension_width_inclusion: "bredden er ikke inkluderet mellem %{min} og %{max} pixel"
21
+ dimension_height_inclusion: "højden er ikke inkluderet mellem %{min} og %{max} pixel"
22
+ dimension_width_greater_than_or_equal_to: "bredden skal være større end eller lig med %{length} pixel"
23
+ dimension_height_greater_than_or_equal_to: "højden skal være større end eller lig med %{length} pixel"
24
+ dimension_width_less_than_or_equal_to: "bredden skal være mindre end eller lig med %{length} pixel"
25
+ dimension_height_less_than_or_equal_to: "højden skal være mindre end eller lig med %{length} pixel"
26
+ dimension_width_equal_to: "bredden skal være lig med %{length} pixel"
27
+ dimension_height_equal_to: "højden skal være lig med %{length} pixel"
28
+ aspect_ratio_not_square: "skal være et kvadratisk billede"
29
+ aspect_ratio_not_portrait: "skal være et portrætbillede"
30
+ aspect_ratio_not_landscape: "skal være et landskabsbillede"
31
+ aspect_ratio_is_not: "skal have et størrelsesforhold på %{aspect_ratio}"
32
+ aspect_ratio_unknown: "har et ukendt størrelsesforhold"
33
+ image_not_processable: "er ikke et gyldigt billede"
@@ -2,11 +2,17 @@ de:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "hat einen ungültigen Dateityp"
5
+ spoofed_content_type: "hat einen Inhaltstyp, der nicht dem entspricht, was durch Inhalt, Dateinamen und Erweiterung deklariert wird"
5
6
  file_size_not_less_than: "Dateigröße muss kleiner als %{max_size} sein (aktuelle Dateigröße ist %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "Dateigröße muss kleiner oder gleich %{max_size} sein (aktuelle Dateigröße ist %{file_size})"
7
8
  file_size_not_greater_than: "Dateigröße muss größer als %{min_size} sein (aktuelle Dateigröße ist %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "Dateigröße muss größer oder gleich %{min_size} sein (aktuelle Dateigröße ist %{file_size})"
9
10
  file_size_not_between: "Dateigröße muss zwischen %{min_size} und %{max_size} liegen (aktuelle Dateigröße ist %{file_size})"
11
+ total_file_size_not_less_than: "Die gesamte Dateigröße muss kleiner als %{max_size} sein (aktuelle Dateigröße ist %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "Die gesamte Dateigröße muss kleiner oder gleich %{max_size} sein (aktuelle Dateigröße ist %{total_file_size})"
13
+ total_file_size_not_greater_than: "Die gesamte Dateigröße muss größer als %{min_size} sein (aktuelle Dateigröße ist %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "Die gesamte Dateigröße muss größer oder gleich %{min_size} sein (aktuelle Dateigröße ist %{total_file_size})"
15
+ total_file_size_not_between: "Die gesamte Dateigröße muss zwischen %{min_size} und %{max_size} liegen (aktuelle Dateigröße ist %{total_file_size})"
10
16
  limit_out_of_range: "Anzahl ist außerhalb des gültigen Bereichs"
11
17
  image_metadata_missing: "ist kein gültiges Bild"
12
18
  dimension_min_inclusion: "muss größer oder gleich %{width} x %{height} Pixel sein"
@@ -2,11 +2,17 @@ en:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "has an invalid content type"
5
+ spoofed_content_type: "has a content type that is not what it is declared through its content, filename and extension"
5
6
  file_size_not_less_than: "file size must be less than %{max_size} (current size is %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "file size must be less than or equal to %{max_size} (current size is %{file_size})"
7
8
  file_size_not_greater_than: "file size must be greater than %{min_size} (current size is %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "file size must be greater than or equal to %{min_size} (current size is %{file_size})"
9
10
  file_size_not_between: "file size must be between %{min_size} and %{max_size} (current size is %{file_size})"
11
+ total_file_size_not_less_than: "total file size must be less than %{max_size} (current size is %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "total file size must be less than or equal to %{max_size} (current size is %{total_file_size})"
13
+ total_file_size_not_greater_than: "total file size must be greater than %{min_size} (current size is %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "total file size must be greater than or equal to %{min_size} (current size is %{total_file_size})"
15
+ total_file_size_not_between: "total file size must be between %{min_size} and %{max_size} (current size is %{total_file_size})"
10
16
  limit_out_of_range: "total number is out of range"
11
17
  image_metadata_missing: "is not a valid image"
12
18
  dimension_min_inclusion: "must be greater than or equal to %{width} x %{height} pixel"
@@ -2,11 +2,17 @@ es:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "tiene un tipo de contenido inválido"
5
+ spoofed_content_type: "tiene un tipo de contenido que no es el que se declara a través de su contenido, nombre de archivo y extensión"
5
6
  file_size_not_less_than: "el tamaño del archivo debe ser inferior a %{max_size} (el tamaño actual es %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "el tamaño del archivo debe ser menor o igual a %{max_size} (el tamaño actual es %{file_size})"
7
8
  file_size_not_greater_than: "el tamaño del archivo debe ser mayor que %{min_size} (el tamaño actual es %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "el tamaño del archivo debe ser mayor o igual a %{min_size} (el tamaño actual es %{file_size})"
9
10
  file_size_not_between: "el tamaño del archivo debe estar entre %{min_size} y %{max_size} (el tamaño actual es %{file_size})"
11
+ total_file_size_not_less_than: "el tamaño total del archivo debe ser inferior a %{max_size} (el tamaño actual es %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "el tamaño total del archivo debe ser menor o igual a %{max_size} (el tamaño actual es %{total_file_size})"
13
+ total_file_size_not_greater_than: "el tamaño total del archivo debe ser mayor que %{min_size} (el tamaño actual es %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "el tamaño total del archivo debe ser mayor o igual a %{min_size} (el tamaño actual es %{total_file_size})"
15
+ total_file_size_not_between: "el tamaño total del archivo debe estar entre %{min_size} y %{max_size} (el tamaño actual es %{total_file_size})"
10
16
  limit_out_of_range: "el número total está fuera de rango"
11
17
  image_metadata_missing: "no es una imagen válida"
12
18
  dimension_min_inclusion: "debe ser mayor o igual a %{width} x %{height} pixel"
@@ -2,11 +2,17 @@ fr:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "a un type de contenu non valide"
5
+ spoofed_content_type: "a un type de contenu qui n'est pas celui déclaré via son contenu, son nom de fichier et son extension"
5
6
  file_size_not_less_than: "la taille du fichier doit être inférieure à %{max_size} (la taille actuelle est %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "la taille du fichier doit être inférieure ou égale à %{max_size} (la taille actuelle est %{file_size})"
7
8
  file_size_not_greater_than: "la taille du fichier doit être supérieure à %{min_size} (la taille actuelle est %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "la taille du fichier doit être supérieure ou égale à %{min_size} (la taille actuelle est %{file_size})"
9
10
  file_size_not_between: "la taille du fichier doit être comprise entre %{min_size} et %{max_size} (la taille actuelle est %{file_size})"
11
+ total_file_size_not_less_than: "la taille totale des fichiers doit être inférieure à %{max_size} (la taille actuelle est %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "la taille totale des fichiers doit être inférieure ou égale à %{max_size} (la taille actuelle est %{total_file_size})"
13
+ total_file_size_not_greater_than: "la taille totale des fichiers doit être supérieure à %{min_size} (la taille actuelle est %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "la taille totale des fichiers doit être supérieure ou égale à %{min_size} (la taille actuelle est %{total_file_size})"
15
+ total_file_size_not_between: "la taille totale des fichiers doit être comprise entre %{min_size} et %{max_size} (la taille actuelle est %{total_file_size})"
10
16
  limit_out_of_range: "le nombre total est hors limites"
11
17
  image_metadata_missing: "n'est pas une image valide"
12
18
  dimension_min_inclusion: "doit être supérieur ou égal à %{width} x %{height} pixels"
@@ -2,11 +2,17 @@ it:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "ha un tipo di contenuto non valido"
5
+ spoofed_content_type: "ha un tipo di contenuto che non è quello dichiarato tramite contenuto, nome file ed estensione"
5
6
  file_size_not_less_than: "la dimensione del file deve essere inferiore a %{max_size} (la dimensione attuale è %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "la dimensione del file deve essere minore o uguale a %{max_size} (la dimensione attuale è %{file_size})"
7
8
  file_size_not_greater_than: "la dimensione del file deve essere maggiore di %{min_size} (la dimensione attuale è %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "la dimensione del file deve essere maggiore o uguale a %{min_size} (la dimensione attuale è %{file_size})"
9
10
  file_size_not_between: "la dimensione del file deve essere compresa tra %{min_size} e %{max_size} (la dimensione attuale è %{file_size})"
11
+ total_file_size_not_less_than: "la dimensione totale dei file deve essere inferiore a %{max_size} (la dimensione attuale è %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "la dimensione totale dei file deve essere minore o uguale a %{max_size} (la dimensione attuale è %{total_file_size})"
13
+ total_file_size_not_greater_than: "la dimensione totale dei file deve essere maggiore di %{min_size} (la dimensione attuale è %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "la dimensione totale dei file deve essere maggiore o uguale a %{min_size} (la dimensione attuale è %{total_file_size})"
15
+ total_file_size_not_between: "la dimensione totale dei file deve essere compresa tra %{min_size} e %{max_size} (la dimensione attuale è %{total_file_size})"
10
16
  limit_out_of_range: "il valore è al di fuori dell’intervallo consentito"
11
17
  image_metadata_missing: "non è un'immagine valida"
12
18
  dimension_min_inclusion: "deve essere maggiore o uguale a %{width} x %{height} pixel"
@@ -2,11 +2,17 @@ ja:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "のContent Typeが不正です"
5
+ spoofed_content_type: "コンテンツ、ファイル名、拡張子で宣言されているコンテンツ タイプと異なるコンテンツ タイプが含まれています"
5
6
  file_size_not_less_than: "ファイル サイズは %{max_size} 未満にする必要があります (現在のサイズは %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "ファイル サイズは %{max_size} 以下である必要があります (現在のサイズは %{file_size})"
7
8
  file_size_not_greater_than: "ファイル サイズは %{min_size} より大きい必要があります (現在のサイズは %{file_size} です)"
8
9
  file_size_not_greater_than_or_equal_to: "ファイル サイズは %{min_size} 以上である必要があります (現在のサイズは %{file_size})"
9
10
  file_size_not_between: "ファイル サイズは %{min_size} から %{max_size} の間でなければなりません (現在のサイズは %{file_size} です)"
11
+ total_file_size_not_less_than: "ファイルの合計サイズは %{max_size} 未満である必要があります (現在のサイズは %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "ファイルの合計サイズは %{max_size} 以下である必要があります (現在のサイズは %{total_file_size})"
13
+ total_file_size_not_greater_than: "ファイルの合計サイズは %{min_size} より大きくなければなりません (現在のサイズは %{total_file_size} です)"
14
+ total_file_size_not_greater_than_or_equal_to: "ファイルの合計サイズは %{min_size} 以上である必要があります (現在のサイズは %{total_file_size})"
15
+ total_file_size_not_between: "ファイルの合計サイズは %{min_size} から %{max_size} までである必要があります (現在のサイズは %{total_file_size})"
10
16
  limit_out_of_range: "の数が許容範囲外です"
11
17
  image_metadata_missing: "は不正な画像です"
12
18
  dimension_min_inclusion: "は %{width} x %{height} ピクセル以上の大きさにしてください"
@@ -2,11 +2,17 @@ nl:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "heeft een ongeldig inhoudstype"
5
+ spoofed_content_type: "heeft een inhoudstype dat niet is wat het wordt aangegeven via de inhoud, bestandsnaam en extensie"
5
6
  file_size_not_less_than: "bestandsgrootte moet kleiner zijn dan %{max_size} (huidige grootte is %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "bestandsgrootte moet kleiner zijn dan of gelijk zijn aan %{max_size} (huidige grootte is %{file_size})"
7
8
  file_size_not_greater_than: "bestandsgrootte moet groter zijn dan %{min_size} (huidige grootte is %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "bestandsgrootte moet groter zijn dan of gelijk zijn aan %{min_size} (huidige grootte is %{file_size})"
9
10
  file_size_not_between: "bestandsgrootte moet tussen %{min_size} en %{max_size} liggen (huidige grootte is %{file_size})"
11
+ total_file_size_not_less_than: "totale bestandsgrootte moet kleiner zijn dan %{max_size} (huidige grootte is %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "totale bestandsgrootte moet kleiner zijn dan of gelijk zijn aan %{max_size} (huidige grootte is %{total_file_size})"
13
+ total_file_size_not_greater_than: "totale bestandsgrootte moet groter zijn dan %{min_size} (huidige grootte is %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "totale bestandsgrootte moet groter zijn dan of gelijk zijn aan %{min_size} (huidige grootte is %{total_file_size})"
15
+ total_file_size_not_between: "totale bestandsgrootte moet tussen %{min_size} en %{max_size} liggen (huidige grootte is %{total_file_size})"
10
16
  limit_out_of_range: "totaal aantal valt buiten het vereiste bereik"
11
17
  image_metadata_missing: "is geen geldige afbeelding"
12
18
  dimension_min_inclusion: "moet groter of gelijk zijn aan %{width} x %{height} pixels"
@@ -2,11 +2,17 @@ pl:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "jest nieprawidłowego typu"
5
+ spoofed_content_type: "ma typ zawartości inny niż zadeklarowany w treści, nazwie pliku i rozszerzeniu"
5
6
  file_size_not_less_than: "rozmiar pliku musi być mniejszy niż %{max_size} (obecny rozmiar to %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "rozmiar pliku musi być mniejszy lub równy %{max_size} (obecny rozmiar to %{file_size})"
7
8
  file_size_not_greater_than: "rozmiar pliku musi być większy niż %{min_size} (obecny rozmiar to %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "rozmiar pliku musi być większy lub równy %{min_size} (obecny rozmiar to %{file_size})"
9
10
  file_size_not_between: "rozmiar pliku musi mieścić się w przedziale od %{min_size} do %{max_size} (obecny rozmiar to %{file_size})"
11
+ total_file_size_not_less_than: "całkowity rozmiar pliku musi być mniejszy niż %{max_size} (obecny rozmiar to %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "całkowity rozmiar pliku musi być mniejszy lub równy %{max_size} (obecny rozmiar to %{total_file_size})"
13
+ total_file_size_not_greater_than: "całkowity rozmiar pliku musi być większy niż %{min_size} (obecny rozmiar to %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "całkowity rozmiar pliku musi być większy lub równy %{min_size} (obecny rozmiar to %{total_file_size})"
15
+ total_file_size_not_between: "całkowity rozmiar pliku musi mieścić się w przedziale od %{min_size} do %{max_size} (obecny rozmiar to %{total_file_size})"
10
16
  limit_out_of_range: "ilość przekracza dopuszczalny zakres"
11
17
  image_metadata_missing: "nie jest prawidłowym obrazem"
12
18
  dimension_min_inclusion: "musi być równe lub większe od %{width} x %{height} pixeli"
@@ -2,11 +2,17 @@ pt-BR:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "tem um tipo de arquivo inválido"
5
+ spoofed_content_type: "tem um tipo de conteúdo que não é o declarado através de seu conteúdo, nome de arquivo e extensão"
5
6
  file_size_not_less_than: "o tamanho do arquivo deve ser menor que %{max_size} (o tamanho atual é %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "o tamanho do arquivo deve ser menor ou igual a %{max_size} (o tamanho atual é %{file_size})"
7
8
  file_size_not_greater_than: "o tamanho do arquivo deve ser maior que %{min_size} (o tamanho atual é %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "o tamanho do arquivo deve ser maior ou igual a %{min_size} (o tamanho atual é %{file_size})"
9
10
  file_size_not_between: "o tamanho do arquivo deve estar entre %{min_size} e %{max_size} (o tamanho atual é %{file_size})"
11
+ total_file_size_not_less_than: "o tamanho total do arquivo deve ser menor que %{max_size} (o tamanho atual é %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "o tamanho total do arquivo deve ser menor ou igual a %{max_size} (o tamanho atual é %{total_file_size})"
13
+ total_file_size_not_greater_than: "o tamanho total do arquivo deve ser maior que %{min_size} (o tamanho atual é %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "o tamanho total do arquivo deve ser maior ou igual a %{min_size} (o tamanho atual é %{total_file_size})"
15
+ total_file_size_not_between: "o tamanho total do arquivo deve estar entre %{min_size} e %{max_size} (o tamanho atual é %{total_file_size})"
10
16
  limit_out_of_range: "o número total está fora do limite"
11
17
  image_metadata_missing: "não é uma imagem válida"
12
18
  dimension_min_inclusion: "deve ser maior ou igual a %{width} x %{height} pixels"
@@ -2,11 +2,17 @@ ru:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "имеет недопустимый тип содержимого"
5
+ spoofed_content_type: "имеет тип контента, который не соответствует тому, который объявлен в его содержимом, имени файла и расширении"
5
6
  file_size_not_less_than: "размер файла должен быть меньше %{max_size} (текущий размер %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "размер файла должен быть меньше или равен %{max_size} (текущий размер %{file_size})"
7
8
  file_size_not_greater_than: "размер файла должен быть больше %{min_size} (текущий размер %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "размер файла должен быть больше или равен %{min_size} (текущий размер %{file_size})"
9
10
  file_size_not_between: "размер файла должен быть между %{min_size} и %{max_size} (текущий размер %{file_size})"
11
+ total_file_size_not_less_than: "общий размер файла должен быть меньше %{max_size} (текущий размер %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "общий размер файла должен быть меньше или равен %{max_size} (текущий размер %{total_file_size})"
13
+ total_file_size_not_greater_than: "общий размер файла должен быть больше %{min_size} (текущий размер %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "общий размер файла должен быть больше или равен %{min_size} (текущий размер %{total_file_size})"
15
+ total_file_size_not_between: "общий размер файла должен быть между %{min_size} и %{max_size} (текущий размер %{total_file_size})"
10
16
  limit_out_of_range: "количество файлов больше требуемого"
11
17
  image_metadata_missing: "не является допустимым изображением"
12
18
  dimension_min_inclusion: "должен быть больше или равно %{width} x %{height} пикселям"
@@ -2,7 +2,17 @@ sv:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "Har en ogiltig filtyp"
5
- file_size_out_of_range: "storleken %{file_size} är utanför det krävda intervallet"
5
+ spoofed_content_type: "har en innehållstyp som inte är vad den deklareras genom sitt innehåll, filnamn och tillägg"
6
+ file_size_not_less_than: "filstorleken måste vara mindre än %{max_size} (nuvarande storlek är %{file_size})"
7
+ file_size_not_less_than_or_equal_to: "filstorleken måste vara mindre än eller lika med %{max_size} (nuvarande storlek är %{file_size})"
8
+ file_size_not_greater_than: "filstorleken måste vara större än %{min_size} (nuvarande storlek är %{file_size})"
9
+ file_size_not_greater_than_or_equal_to: "filstorleken måste vara större än eller lika med %{min_size} (nuvarande storlek är %{file_size})"
10
+ file_size_not_between: "filstorleken måste vara mellan %{min_size} och %{max_size} (nuvarande storlek är %{file_size})"
11
+ total_file_size_not_less_than: "total filstorlek måste vara mindre än %{max_size} (nuvarande storlek är %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "total filstorlek måste vara mindre än eller lika med %{max_size} (nuvarande storlek är %{total_file_size})"
13
+ total_file_size_not_greater_than: "total filstorlek måste vara större än %{min_size} (nuvarande storlek är %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "total filstorlek måste vara större än eller lika med %{min_size} (nuvarande storlek är %{total_file_size})"
15
+ total_file_size_not_between: "total filstorlek måste vara mellan %{min_size} och %{max_size} (nuvarande storlek är %{total_file_size})"
6
16
  limit_out_of_range: "antalet filer är utanför det godkända intervallet"
7
17
  image_metadata_missing: "bilden sankar metadata"
8
18
  dimension_min_inclusion: "måste minst vara %{width} x %{height} pixlar"
@@ -2,11 +2,17 @@ tr:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "geçersiz dosya tipine sahip"
5
+ spoofed_content_type: "içeriği, dosya adı ve uzantısı aracılığıyla bildirildiği gibi olmayan bir içerik türüne sahip"
5
6
  file_size_not_less_than: "dosya boyutu %{max_size} boyutundan küçük olmalıdır (geçerli boyut %{file_size}'dir)"
6
7
  file_size_not_less_than_or_equal_to: "dosya boyutu %{max_size} değerinden küçük veya ona eşit olmalıdır (geçerli boyut %{file_size}'dir)"
7
8
  file_size_not_greater_than: "dosya boyutu %{min_size} boyutundan büyük olmalıdır (geçerli boyut %{file_size}'dir)"
8
9
  file_size_not_greater_than_or_equal_to: "dosya boyutu %{min_size} değerinden büyük veya eşit olmalıdır (geçerli boyut %{file_size}'dir)"
9
10
  file_size_not_between: "dosya boyutu %{min_size} ile %{max_size} arasında olmalıdır (geçerli boyut %{file_size}'dir)"
11
+ total_file_size_not_less_than: "toplam dosya boyutu %{max_size} boyutundan küçük olmalıdır (geçerli boyut %{total_file_size}'dir)"
12
+ total_file_size_not_less_than_or_equal_to: "toplam dosya boyutu %{max_size} değerinden küçük veya ona eşit olmalıdır (geçerli boyut %{total_file_size}'dir)"
13
+ total_file_size_not_greater_than: "toplam dosya boyutu %{min_size} boyutundan büyük olmalıdır (geçerli boyut %{total_file_size}'dir)"
14
+ total_file_size_not_greater_than_or_equal_to: "toplam dosya boyutu %{min_size} değerinden büyük veya eşit olmalıdır (geçerli boyut %{total_file_size}'dir)"
15
+ total_file_size_not_between: "toplam dosya boyutu %{min_size} ile %{max_size} arasında olmalıdır (geçerli boyut %{total_file_size}'dir)"
10
16
  limit_out_of_range: "toplam miktar aralık dışında"
11
17
  image_metadata_missing: "geçerli bir imaj değil"
12
18
  dimension_min_inclusion: "%{width} x %{height} piksele eşit ya da büyük olmalı"
@@ -2,11 +2,17 @@ uk:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "має неприпустимий тип вмісту"
5
+ spoofed_content_type: "має тип вмісту, який не відповідає тому, що він оголошений через його вміст, назву файлу та розширення"
5
6
  file_size_not_less_than: "розмір файлу має бути менше %{max_size} (поточний розмір %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "розмір файлу має бути меншим або дорівнювати %{max_size} (поточний розмір %{file_size})"
7
8
  file_size_not_greater_than: "розмір файлу має бути більшим ніж %{min_size} (поточний розмір %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "розмір файлу має бути більшим або дорівнювати %{min_size} (поточний розмір %{file_size})"
9
10
  file_size_not_between: "розмір файлу має бути від %{min_size} до %{max_size} (поточний розмір %{file_size})"
11
+ total_file_size_not_less_than: "загальний розмір файлу має бути менше %{max_size} (поточний розмір %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "загальний розмір файлу має бути меншим або дорівнювати %{max_size} (поточний розмір %{total_file_size})"
13
+ total_file_size_not_greater_than: "загальний розмір файлу має бути більшим ніж %{min_size} (поточний розмір %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "загальний розмір файлу має бути більшим або дорівнювати %{min_size} (поточний розмір %{total_file_size})"
15
+ total_file_size_not_between: "загальний розмір файлу має бути від %{min_size} до %{max_size} (поточний розмір %{total_file_size})"
10
16
  limit_out_of_range: "кількість файлів більше необхідного"
11
17
  image_metadata_missing: "не є допустимим зображенням"
12
18
  dimension_min_inclusion: "мусить бути більше або дорівнювати %{width} x %{height} пікселям"
@@ -2,11 +2,17 @@ vi:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "tệp không hợp lệ"
5
+ spoofed_content_type: "có loại nội dung không phải là loại nội dung được khai báo thông qua nội dung, tên tệp và phần mở rộng của nó"
5
6
  file_size_not_less_than: "kích thước tệp phải nhỏ hơn %{max_size} (kích thước hiện tại là %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "kích thước tệp phải nhỏ hơn hoặc bằng %{max_size} (kích thước hiện tại là %{file_size})"
7
8
  file_size_not_greater_than: "kích thước tệp phải lớn hơn %{min_size} (kích thước hiện tại là %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "kích thước tệp phải lớn hơn hoặc bằng %{min_size} (kích thước hiện tại là %{file_size})"
9
10
  file_size_not_between: "kích thước tệp phải nằm trong khoảng từ %{min_size} đến %{max_size} (kích thước hiện tại là %{file_size})"
11
+ total_file_size_not_less_than: "tổng kích thước tệp phải nhỏ hơn %{max_size} (kích thước hiện tại là %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "tổng kích thước tệp phải nhỏ hơn hoặc bằng %{max_size} (kích thước hiện tại là %{total_file_size})"
13
+ total_file_size_not_greater_than: "tổng kích thước tệp phải lớn hơn %{min_size} (kích thước hiện tại là %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "tổng kích thước tệp phải lớn hơn hoặc bằng %{min_size} (kích thước hiện tại là %{total_file_size})"
15
+ total_file_size_not_between: "tổng kích thước tệp phải nằm trong khoảng từ %{min_size} đến %{max_size} (kích thước hiện tại là %{total_file_size})"
10
16
  limit_out_of_range: "tổng số tệp vượt giới hạn"
11
17
  image_metadata_missing: "không phải là ảnh"
12
18
  dimension_min_inclusion: "phải lớn hơn hoặc bằng %{width} x %{height} pixel"
@@ -2,11 +2,17 @@ zh-CN:
2
2
  errors:
3
3
  messages:
4
4
  content_type_invalid: "文件类型错误"
5
+ spoofed_content_type: "内容类型与通过内容、文件名和扩展名声明的内容类型不同"
5
6
  file_size_not_less_than: "文件大小必须小于 %{max_size}(当前大小为 %{file_size})"
6
7
  file_size_not_less_than_or_equal_to: "文件大小必须小于或等于 %{max_size}(当前大小为 %{file_size})"
7
8
  file_size_not_greater_than: "文件大小必须大于 %{min_size}(当前大小为 %{file_size})"
8
9
  file_size_not_greater_than_or_equal_to: "文件大小必须大于或等于 %{min_size}(当前大小为 %{file_size})"
9
10
  file_size_not_between: "文件大小必须介于 %{min_size} 和 %{max_size} 之间(当前大小为 %{file_size})"
11
+ total_file_size_not_less_than: "总文件大小必须小于 %{max_size}(当前大小为 %{total_file_size})"
12
+ total_file_size_not_less_than_or_equal_to: "文件总大小必须小于或等于 %{max_size}(当前大小为 %{total_file_size})"
13
+ total_file_size_not_greater_than: "总文件大小必须大于 %{min_size}(当前大小为 %{total_file_size})"
14
+ total_file_size_not_greater_than_or_equal_to: "文件总大小必须大于或等于 %{min_size}(当前大小为 %{total_file_size})"
15
+ total_file_size_not_between: "总文件大小必须介于 %{min_size} 和 %{max_size} 之间(当前大小为 %{total_file_size})"
10
16
  limit_out_of_range: "文件数超出限定范围"
11
17
  image_metadata_missing: "不是有效的图像"
12
18
  dimension_min_inclusion: "必须大于或等于 %{width} x %{height} 像素"