Sha256: 119b4dbe40d1b6eca448779cc5b67b32cb67e6b211bcdf77ae2a06594d138e74

Contents?: true

Size: 1.03 KB

Versions: 24

Compression:

Stored size: 1.03 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} language file(s) from WebTranslateIt" } if config.logger
    WebTranslateIt::Connection.new(config.api_key) do |http|
      config.files.find_all{ |file| file.locale.in?([locale, I18n.locale]) }.each do |file|
        response = file.fetch(http)
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
web_translate_it-2.5.4 lib/web_translate_it.rb
web_translate_it-2.5.3 lib/web_translate_it.rb
web_translate_it-2.5.2 lib/web_translate_it.rb
web_translate_it-2.5.1 lib/web_translate_it.rb
web_translate_it-2.5.0 lib/web_translate_it.rb
web_translate_it-2.4.12 lib/web_translate_it.rb
web_translate_it-2.4.11 lib/web_translate_it.rb
web_translate_it-2.4.10 lib/web_translate_it.rb
web_translate_it-2.4.9 lib/web_translate_it.rb
web_translate_it-2.4.8 lib/web_translate_it.rb
web_translate_it-2.4.7 lib/web_translate_it.rb
web_translate_it-2.4.6 lib/web_translate_it.rb
web_translate_it-2.4.5 lib/web_translate_it.rb
web_translate_it-2.4.4 lib/web_translate_it.rb
web_translate_it-2.4.3 lib/web_translate_it.rb
web_translate_it-2.4.2 lib/web_translate_it.rb
web_translate_it-2.4.1 lib/web_translate_it.rb
web_translate_it-2.4.0 lib/web_translate_it.rb
web_translate_it-2.3.4 lib/web_translate_it.rb
web_translate_it-2.3.3 lib/web_translate_it.rb