From 8495e860d67964a4e9f9cf9528400378435a638f Mon Sep 17 00:00:00 2001 From: f Date: Fri, 22 Jun 2018 16:48:58 -0300 Subject: [PATCH] indicar en la ayuda el maximo de valores #51 --- app/views/posts/template_field/_number.haml | 2 ++ app/views/posts/template_field/_select.haml | 2 ++ config/locales/en.yml | 3 +++ config/locales/es.yml | 3 +++ 4 files changed, 10 insertions(+) diff --git a/app/views/posts/template_field/_number.haml b/app/views/posts/template_field/_number.haml index 457b575a..9b0d3cfd 100644 --- a/app/views/posts/template_field/_number.haml +++ b/app/views/posts/template_field/_number.haml @@ -4,3 +4,5 @@ required: template.required?, max: template.max > 0 ? template.max : nil, min: template.min +- if template.max > 0 + %small= t('posts.number.max', max: template.max) diff --git a/app/views/posts/template_field/_select.haml b/app/views/posts/template_field/_select.haml index b808123d..f9a6bbe4 100644 --- a/app/views/posts/template_field/_select.haml +++ b/app/views/posts/template_field/_select.haml @@ -9,3 +9,5 @@ 'maximum-selection-length': template.max }} - if template.open? %small.text-muted.form-text= t('posts.open') +- if template.max > 0 + %small= t('posts.select.max', max: template.max) diff --git a/config/locales/en.yml b/config/locales/en.yml index 23fb0341..e4f81664 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -207,9 +207,12 @@ en: private: '🔒 The values of this field will remain private' select: placeholder: 'Type to filter available options' + max: 'You can select up to %{max} options' table: 'This field is a group of fields, you can add more groups with the "Add group" button or remove them with the "Remove group" button.' row: add: 'Add group' del: 'Remove group' checkbox: 'Yes' anchor: 'Copy this link to come back here' + number: + max: 'The maximum value is %{max}' diff --git a/config/locales/es.yml b/config/locales/es.yml index 88f14ae0..2859ccdc 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -203,9 +203,12 @@ es: private: '🔒 Los valores de este campo serán privados' select: placeholder: 'Empieza a escribir para filtrar las opciones disponibles' + max: 'Puedes seleccionar hasta %{max} opciones' table: 'Este campo es un grupo de campos, puede agregar los que necesites con el botón "Agregar grupo" o eliminar los que no con "Eliminar grupo"' row: add: 'Agregar grupo' del: 'Eliminar grupo' checkbox: 'Sí' anchor: 'Copia este vínculo para volver aquí más tarde' + number: + max: 'El valor máximo es %{max}'