lib/i18n-spec/models/locale_file.rb in i18n-spec-0.0.5 vs lib/i18n-spec/models/locale_file.rb in i18n-spec-0.0.6
- old
+ new
@@ -30,10 +30,12 @@
translations.keys.first == File.basename(@filepath, File.extname(@filepath))
end
def is_a_complete_tranlsation_of?(default_locale_filepath)
default_locale = LocaleFile.new(default_locale_filepath)
- translations.keys.sort == default_locale.translations.keys.sort
+ default_keys = flatten_tree(translations.values.first).keys.sort
+ keys = flatten_tree(default_locale.translations.values.first).keys.sort
+ keys == default_keys
end
protected
def translations
\ No newline at end of file