lib/i18n/tasks/reports/base.rb in i18n-tasks-0.8.7 vs lib/i18n/tasks/reports/base.rb in i18n-tasks-0.9.0.rc1
- old
+ new
@@ -1,6 +1,5 @@
-# coding: utf-8
module I18n::Tasks::Reports
class Base
include I18n::Tasks::Logging
def initialize(task = I18n::Tasks::BaseTask.new)
@@ -29,10 +28,10 @@
end
def used_title(used_tree)
leaves = used_tree.leaves.to_a
filter = used_tree.first.root.data[:key_filter]
- used_n = leaves.map { |node| node.data[:source_occurrences].size }.reduce(:+).to_i
+ used_n = leaves.map { |node| node.data[:occurrences].size }.reduce(:+).to_i
"#{leaves.length} key#{'s' if leaves.size != 1}#{" matching '#{filter}'" if filter}#{" (#{used_n} usage#{'s' if used_n != 1})" if used_n > 0}"
end
# Sort keys by their attributes in order
# @param [Hash] order e.g. {locale: :asc, type: :desc, key: :asc}