WIP traduccion, editar arrays

This commit is contained in:
f 2018-02-09 18:36:28 -03:00
parent 635400024c
commit 74a6f320b9
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
2 changed files with 7 additions and 6 deletions

View file

@ -4,5 +4,5 @@
= render 'i18n/text_field', keys: keys, value: value = render 'i18n/text_field', keys: keys, value: value
- elsif value.is_a? Hash - elsif value.is_a? Hash
= render 'i18n/recursive', data: value, superkeys: keys = render 'i18n/recursive', data: value, superkeys: keys
-# elsif value.is_a? Array - elsif value.is_a? Array
= render 'i18n/recursive_array', data: value = render 'i18n/recursive_array', data: value, superkeys: keys

View file

@ -1,7 +1,8 @@
- data.each do |value| - data.each_with_index do |value, i|
- keys = [superkeys, i].flatten
- if value.is_a? String - if value.is_a? String
= render 'i18n/text_field', value: value, key: "#{key}[]" = render 'i18n/text_field', keys: keys, value: value
- elsif value.is_a? Hash - elsif value.is_a? Hash
= render 'i18n/recursive', data: value = render 'i18n/recursive', data: value, superkeys: keys
- elsif value.is_a? Array - elsif value.is_a? Array
= render 'i18n/recursive_array', data: value = render 'i18n/recursive_array', data: value, superkeys: keys