lib/i18n/tasks/reports/base.rb in i18n-tasks-0.2.19 vs lib/i18n/tasks/reports/base.rb in i18n-tasks-0.2.20

- old
+ new

@@ -7,13 +7,13 @@ end attr_reader :task MISSING_TYPES = { - none: {glyph: '✗', summary: 'key missing'}, - blank: {glyph: '∅', summary: 'translation blank'}, - eq_base: {glyph: '=', summary: 'value same as base value'} + missing_from_base: {glyph: '✗', summary: 'missing from base locale'}, + missing_from_locale: {glyph: '∅', summary: 'missing from locale but present in base locale'}, + eq_base: {glyph: '=', summary: 'value equals base value'} } def missing_types MISSING_TYPES end @@ -23,7 +23,11 @@ end def unused_title(recs) "Unused keys (#{recs.length})" end + + def used_title(keys) + "#{keys.length} keys used #{keys.map { |k| k[:usages].size }.reduce(:+)} times" + end end -end \ No newline at end of file +end