Skip to content

Instantly share code, notes, and snippets.

@jerefrer
Created December 14, 2012 19:00
Show Gist options
  • Save jerefrer/4287731 to your computer and use it in GitHub Desktop.
Save jerefrer/4287731 to your computer and use it in GitHub Desktop.
Logs i18n lookups for labels in the server output
require 'i18n'
if Rails.env.development?
module I18n
class << self
def translate_with_debug(*args)
puts "Translate: #{args.inspect}"
translate_without_debug(*args)
end
alias_method_chain :translate, :debug
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment