lib/i18n/tasks/interpolations.rb in i18n-tasks-0.9.26 vs lib/i18n/tasks/interpolations.rb in i18n-tasks-0.9.27

- old
+ new

@@ -13,11 +13,10 @@ next if !value.is_a?(String) || ignore_key?(key, :inconsistent_interpolations) base_vars = Set.new(value.scan(VARIABLE_REGEX)) (locales - [base_locale]).each do |current_locale| node = data[current_locale].first.children[key] next unless node&.value&.is_a?(String) - vars = node.value.scan(VARIABLE_REGEX) - unless vars.size == base_vars.size && vars.all? { |v| base_vars.include?(v) } + if base_vars != Set.new(node.value.scan(VARIABLE_REGEX)) result.merge!(node.walk_to_root.reduce(nil) { |c, p| [p.derive(children: c)] }) end end end