Class: I18n::Tasks::Translators::GoogleTranslator

Inherits:
BaseTranslator show all
Defined in:
lib/i18n/tasks/translators/google_translator.rb

Constant Summary collapse

NEWLINE_PLACEHOLDER =
'<br id=i18n />'

Constants included from Logging

Logging::MUTEX, Logging::PROGRAM_NAME

Instance Method Summary collapse

Methods inherited from BaseTranslator

#translate_forest

Methods included from Logging

log_error, log_stderr, log_verbose, log_warn, program_name, warn_deprecated

Constructor Details

#initializeGoogleTranslator

Returns a new instance of GoogleTranslator.



8
9
10
11
12
13
14
15
# File 'lib/i18n/tasks/translators/google_translator.rb', line 8

def initialize(*)
  begin
    require 'easy_translate'
  rescue LoadError
    raise ::I18n::Tasks::CommandError, "Add gem 'easy_translate' to your Gemfile to use this command"
  end
  super
end