lib/i18n-spec/models/locale_file.rb in i18n-spec-0.0.7 vs lib/i18n-spec/models/locale_file.rb in i18n-spec-0.0.8
- old
+ new
@@ -38,16 +38,9 @@
def is_named_like_top_level_namespace?
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)
- 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 flatten_tree(data, prefix = '', result = {})
data.each do |key, value|
current_prefix = prefix.empty? ? key.to_s : "#{prefix}.#{key}"
\ No newline at end of file