From 635400024c7f195194ef7adb534521876ceb0eb8 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 9 Feb 2018 18:30:47 -0300 Subject: [PATCH] fixup! WIP de traduccion --- app/views/i18n/_text_field.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/i18n/_text_field.haml b/app/views/i18n/_text_field.haml index fb0c89cf..4494077f 100644 --- a/app/views/i18n/_text_field.haml +++ b/app/views/i18n/_text_field.haml @@ -2,14 +2,14 @@ - key = keys.pop - form_keys = keys.map { |k| "[#{k.to_s}]" }.join('') - form_help = (keys.size > 0) ? [keys,key].flatten.join('.') : key - - value = @site.data[@lang_to] + - value_to = @site.data[@lang_to] - [keys,key].flatten.each do |k| - - value = value[k] + - value_to = value_to[k] = label_tag "i18n[#{@lang_to}]#{form_keys}", value - if value.length > 140 - = text_area "i18n[#{@lang_to}]#{form_keys}", key, value: value, + = text_area "i18n[#{@lang_to}]#{form_keys}", key, value: value_to, class: 'form-control' - else - = text_field "i18n[#{@lang_to}]#{form_keys}", key, value: value, + = text_field "i18n[#{@lang_to}]#{form_keys}", key, value: value_to, class: 'form-control' %small.text-muted.form-text= form_help