2018-02-26 21:42:02 +00:00
|
|
|
- previous_key ||= ''
|
2018-02-09 21:36:28 +00:00
|
|
|
- data.each_with_index do |value, i|
|
|
|
|
- keys = [superkeys, i].flatten
|
2018-02-26 21:42:02 +00:00
|
|
|
- unless keys.first == previous_key
|
|
|
|
%h2{id: keys.first}
|
|
|
|
= t("help.i18n.#{keys.first}")
|
2018-02-09 21:28:27 +00:00
|
|
|
- if value.is_a? String
|
2018-02-09 21:36:28 +00:00
|
|
|
= render 'i18n/text_field', keys: keys, value: value
|
2018-02-09 21:28:27 +00:00
|
|
|
- elsif value.is_a? Hash
|
2018-02-26 21:42:02 +00:00
|
|
|
= render 'i18n/recursive', data: value, superkeys: keys,
|
|
|
|
previous_key: keys.first
|
2018-02-09 21:28:27 +00:00
|
|
|
- elsif value.is_a? Array
|
2018-02-26 21:42:02 +00:00
|
|
|
= render 'i18n/recursive_array', data: value, superkeys: keys,
|
|
|
|
previous_key: keys.first
|