Sha256: defce0995d29cb4c09682e400fcebbc7c0ec45e8e40981ae052cd5d9dfc91cf2

Contents?: true

Size: 945 Bytes

Versions: 5

Compression:

Stored size: 945 Bytes

Contents

# encoding: utf-8

require 'web_translate_it/util'
require 'web_translate_it/util/array_util'
require 'web_translate_it/util/string_util'
require 'web_translate_it/configuration'
require 'web_translate_it/translation_file'
require 'web_translate_it/auto_fetch'
require 'web_translate_it/command_line'
require 'web_translate_it/project'
require 'web_translate_it/server'

module WebTranslateIt
  
  def self.fetch_translations
    config = Configuration.new
    locale = I18n.locale.to_s
    return if config.ignore_locales.include?(locale)
    config.logger.debug { "➔  Fetching #{locale.upcase} language file(s) from Web Translate It…" } if config.logger
    WebTranslateIt::Util.http_connection do |http|
      config.files.find_all{ |file| file.locale == locale }.each do |file|
        response = file.fetch(http)
        config.logger.debug { "➔  Web Translate It response: #{response}" } if config.logger
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
web_translate_it-1.8.4 lib/web_translate_it.rb
web_translate_it-1.8.3 lib/web_translate_it.rb
web_translate_it-1.8.2.3 lib/web_translate_it.rb
web_translate_it-1.8.2.2 lib/web_translate_it.rb
web_translate_it-1.8.2.1 lib/web_translate_it.rb