Skip to content

Instantly share code, notes, and snippets.

@ArthurN
Created August 26, 2014 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArthurN/098ff49d10c2f386b93c to your computer and use it in GitHub Desktop.
Save ArthurN/098ff49d10c2f386b93c to your computer and use it in GitHub Desktop.
Peak into what I18n namespaces are attempted by third party gems
# This monkeypatch logs any calls to I18n#t. This is especially useful to "peaking" into what namespaces are expected
# for third party gems, e.g. simple_form or reform.
I18n.module_eval do
class << self
def translate_with_puts(*args)
Rails.logger.debug "#{args}"
old_translate(*args)
end
alias :old_translate :translate
alias :translate :translate_with_puts
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment