5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 16:56: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 "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 // Redefinir variables de Bootstrap
$primary: $magenta; $primary: $magenta;
$secondary: $black; $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-face {
font-family: 'Saira'; font-family: 'Saira';
font-style: normal; font-style: normal;

View file

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