lib/i18n/tasks/reports/base.rb in i18n-tasks-0.9.24 vs lib/i18n/tasks/reports/base.rb in i18n-tasks-0.9.25

- old
+ new

@@ -30,10 +30,10 @@ end def used_title(keys_nodes, filter) used_n = keys_nodes.map { |_k, node| node.data[:occurrences].size }.reduce(:+).to_i "#{keys_nodes.size} key#{'s' if keys_nodes.size != 1}#{" matching '#{filter}'" if filter}"\ - "#{" (#{used_n} usage#{'s' if used_n != 1})" if used_n > 0}" + "#{" (#{used_n} usage#{'s' if used_n != 1})" if used_n.positive?}" end # Sort keys by their attributes in order # @param [Hash] order e.g. {locale: :asc, type: :desc, key: :asc} def sort_by_attr!(objects, order = { locale: :asc, key: :asc })