You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: i18n_spec.rb
    path of file: ./repos/discourse/spec/integrity
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

def extract_locale(path)
  path[/\.([^.]{2,})\.yml$/, 1]
end

def is_yaml_compatible?(english, translated)
  english.each d
    
def is_yaml_compatible?(english, translated)
  english.each do |k, v|
    if translated.has_key?(k)
      if Hash === v
        if Hash === translated[k]
          return false unless is_yaml_compatible?(v, translated[k])
        end
      else
        return false unless v.class == translated[k].class
      end