This is not a very elegant solution, but it worked for me. I created an initializer:
require 'i18n' if (Rails.env.development? || Rails.env.test?) && ENV['DEBUG_TRANSLATION'] module I18n class << self def translate_with_debug(*args) Rails.logger.debug "Translate :
Then you can run the commands as shown below:
$ DEBUG_TRANSLATION=true rake cucumber
... and you will see all translation attempts reset to STDOUT. However, I do not consider this production code, so I saved it in Gist and did not check it in my main project source control at this stage.
Noddy, but he does the job.
Paul russell
source share