5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 21:16:22 +00:00

fix: traducir campo de imagen

This commit is contained in:
f 2024-06-19 18:16:58 -03:00
parent 5106cdd414
commit 6f30727a7b
No known key found for this signature in database
3 changed files with 10 additions and 6 deletions

View file

@ -11,6 +11,14 @@ $colors: (
"magenta": $magenta
);
// TODO: Encontrar la forma de generar esto desde los locales de Rails
$custom-file-text: (
en: "Browse",
es: "Buscar archivo",
pt: "Buscar arquivo",
pt-BR: "Buscar arquivo"
);
// Redefinir variables de Bootstrap
$primary: $magenta;
$secondary: $black;
@ -111,12 +119,6 @@ $sizes: (
}
}
// TODO: Encontrar la forma de generar esto desde los locales de Rails
$custom-file-text: (
en: 'Browse',
es: 'Buscar archivo'
);
@font-face {
font-family: 'Saira';
font-style: normal;

View file

@ -26,6 +26,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)}",
lang: locale,
data: { target: 'file-preview.input', action: 'file-preview#update' })
= label_tag "#{base}_#{attribute}_path",
post_label_t(attribute, :path, post: post), class: 'custom-file-label'

View file

@ -23,6 +23,7 @@
**field_options(attribute, metadata, required: (metadata.required && !metadata.path?)),
class: "custom-file-input #{invalid(post, attribute)}",
accept: ActiveStorage.web_image_content_types.join(','),
lang: locale,
data: { target: 'file-preview.input', action: 'file-preview#update' })
= label_tag "#{base}_#{attribute}_path",
post_label_t(attribute, :path, post: post), class: 'custom-file-label'