Sha256: 477d16d81e57e2979ed19ed3ebcd211eb224eed72fbac6f9623f66b2d482298f

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

if %w(production staging).include? Rails.env
  TranslationEngine.config do |config|
    # key for user
    config.api_key  = 'API_KEY'

    # url to Translation Server
    config.api_host = 'http://127.0.0.1:3000'

    # enable screenshot functionality (default is false)
    config.use_screenshots  = true

    # enable to send translation after every request and receive translations
    # when something changed (default is false)
    config.use_catcher      = true

    # Timeout for connecting to translation server
    # config.timeout = 5

    # If true TranslationEngine will throw exceptions on connection problems
    # If false TranslationEngine will just log exception to Rails.logger
    config.raise_exceptions = Rails.env.development?

    # Disables sending new translations to Translation Server
    config.disable_sending_translations = Rails.env.production?

    # Caches downloaded translations for given amount of seconds before checking
    # for new ones
    config.cache_timeout = Rails.env.production? ? 60 : 0
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blueberry_rails-0.4.1 templates/config/initializers/translation_engine.rb