Sha256: 7249168595c0f734b4172cb756f8ce3d7909392da5ae47d2a5718e8cf307d858

Contents?: true

Size: 960 Bytes

Versions: 2

Compression:

Stored size: 960 Bytes

Contents

require File.join(File.dirname(__FILE__), 'web_translate_it', 'util')
require File.join(File.dirname(__FILE__), 'web_translate_it', 'configuration')
require File.join(File.dirname(__FILE__), 'web_translate_it', 'translation_file')
require File.join(File.dirname(__FILE__), 'web_translate_it', 'auto_fetch')
require File.join(File.dirname(__FILE__), 'web_translate_it', 'command_line')
require File.join(File.dirname(__FILE__), '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
    config.files.find_all{ |file| file.locale == locale }.each do |file|
      response = file.fetch
      config.logger.debug { "➔  Web Translate It response: #{response}" } if config.logger
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
web_translate_it-1.6.1 lib/web_translate_it.rb
web_translate_it-1.6.0 lib/web_translate_it.rb