Sha256: 28612f818e8cd02411cd18d260a4363ec44b2b970611637100816d48db549164

Contents?: true

Size: 1.12 KB

Versions: 14

Compression:

Stored size: 1.12 KB

Contents

# encoding: utf-8

require 'web_translate_it/connection'
require 'web_translate_it/util'
require 'web_translate_it/util/array_util'
require 'web_translate_it/util/string_util'
require 'web_translate_it/util/hash_util'
require 'web_translate_it/configuration'
require 'web_translate_it/translation_file'
require 'web_translate_it/string'
require 'web_translate_it/translation'
require 'web_translate_it/term'
require 'web_translate_it/term_translation'
require 'web_translate_it/auto_fetch'
require 'web_translate_it/command_line'
require 'web_translate_it/project'

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::Connection.new(config.api_key) 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

14 entries across 14 versions & 1 rubygems

Version Path
web_translate_it-2.1.3 lib/web_translate_it.rb
web_translate_it-2.1.2 lib/web_translate_it.rb
web_translate_it-2.1.1 lib/web_translate_it.rb
web_translate_it-2.0.8 lib/web_translate_it.rb
web_translate_it-2.0.7 lib/web_translate_it.rb
web_translate_it-2.0.6 lib/web_translate_it.rb
web_translate_it-2.0.5 lib/web_translate_it.rb
web_translate_it-2.0.4 lib/web_translate_it.rb
web_translate_it-2.0.3 lib/web_translate_it.rb
web_translate_it-2.0.2 lib/web_translate_it.rb
web_translate_it-2.0.1 lib/web_translate_it.rb
web_translate_it-2.0.0 lib/web_translate_it.rb
web_translate_it-2.0.0.rc4 lib/web_translate_it.rb
web_translate_it-2.0.0.rc3 lib/web_translate_it.rb