lib/i18n_checker/locale.rb
# Collect translation text from specified file list
#
# @return [I18nChecker::Locale::Texts]
Collect translation text from specified file list
Collect translation text from specified file list
def texts_of(resources)
        caches = I18nChecker::Cache::Files.new
        files = resources.delete_if { |resource| ::File.directory?(resource) }.to_a
        grouped_files = files.group_by { |file| ::File.extname(file) }
        grouped_locale_texts = grouped_files.map do |k, v|
          text_collector_of(k, caches: caches).collect_all(v)
        end
        result = I18nChecker::Locale::Texts.new
        grouped_locale_texts.reduce(result) { |locale_texts, n| locale_texts.concat(n) }.uniq!
      end
def texts_of ( resources ) caches = I18nChecker :: Cache :: Files . new files = resources . delete_if { | resource | :: File . directory? ( resource ) } . to_a grouped_files = files . group_by { | file | :: File . extname ( file ) } grouped_locale_texts = grouped_files . map do | k , v | text_collector_of ( k , caches : caches ) . collect_all ( v ) end result = I18nChecker :: Locale :: Texts . new grouped_locale_texts . reduce ( result ) { | locale_texts , n | locale_texts . concat ( n ) } . uniq! end
Collect translation text from specified file list
Collect translation text from specified file list
None
I18nChecker::Locale::Texts
resources
<not_specific>