5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 04:41:43 +00:00

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
- elsif value.is_a? Hash
= render 'i18n/recursive', data: value, superkeys: keys
-# elsif value.is_a? Array
= render 'i18n/recursive_array', data: value
- elsif value.is_a? Array
= 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
= render 'i18n/text_field', value: value, key: "#{key}[]"
= render 'i18n/text_field', keys: keys, value: value
- elsif value.is_a? Hash
= render 'i18n/recursive', data: value
= render 'i18n/recursive', data: value, superkeys: keys
- elsif value.is_a? Array
= render 'i18n/recursive_array', data: value
= render 'i18n/recursive_array', data: value, superkeys: keys