mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-25 23:06:22 +00:00
Merge branch 'issue-13009' into panel.sutty.nl
This commit is contained in:
commit
fd0c132577
4 changed files with 4 additions and 3 deletions
|
@ -22,7 +22,7 @@
|
|||
= file_field(*field_name_for(base, attribute, :path),
|
||||
**field_options(attribute, metadata, required: (metadata.required && !metadata.path?)),
|
||||
class: "custom-file-input #{invalid(post, attribute)}",
|
||||
accept: 'image/*', data: { preview: "#{attribute}-preview" })
|
||||
accept: ActiveStorage.web_image_content_types.join(','), data: { preview: "#{attribute}-preview" })
|
||||
= label_tag "#{base}_#{attribute}_path",
|
||||
post_label_t(attribute, :path, post: post), class: 'custom-file-label'
|
||||
= render 'posts/attribute_feedback',
|
||||
|
|
|
@ -37,6 +37,7 @@ module Sutty
|
|||
.rescue_responses['Pundit::NotAuthorizedError'] = :forbidden
|
||||
|
||||
config.active_storage.variant_processor = :vips
|
||||
config.active_storage.web_image_content_types << 'image/webp'
|
||||
|
||||
# Que
|
||||
config.action_mailer.deliver_later_queue_name = :default
|
||||
|
|
|
@ -52,7 +52,7 @@ en:
|
|||
cant_be_empty: 'This field cannot be empty'
|
||||
image:
|
||||
site_invalid: 'The image cannot be stored if the site configuration is not valid'
|
||||
not_an_image: 'Not an image'
|
||||
not_an_image: 'Not a web image. Accepted formats: PNG, JPEG, GIF, WEBP'
|
||||
path_required: 'Missing image for upload'
|
||||
no_file_for_description: "Description with no associated image"
|
||||
attachment_missing: "I couldn't save the image :("
|
||||
|
|
|
@ -52,7 +52,7 @@ es:
|
|||
cant_be_empty: 'El campo no puede estar vacío'
|
||||
image:
|
||||
site_invalid: 'La imagen no se puede almacenar si la configuración del sitio no es válida'
|
||||
not_an_image: 'No es una imagen'
|
||||
not_an_image: 'No es una imagen en formato web. Formatos aceptados: PNG, JPEG, GIF, WEBP'
|
||||
path_required: 'Se necesita una imagen'
|
||||
no_file_for_description: 'Se envió una descripción sin imagen asociada'
|
||||
attachment_missing: 'no pude guardar el archivo :('
|
||||
|
|
Loading…
Reference in a new issue