Skip to content

Instantly share code, notes, and snippets.

@terlar
Created May 21, 2014 13:55
Show Gist options
  • Save terlar/43089820df3638cfba10 to your computer and use it in GitHub Desktop.
Save terlar/43089820df3638cfba10 to your computer and use it in GitHub Desktop.
class FakeTranslationBackend < I18n::Backend::Simple
# rubocop:disable ParameterLists
def lookup(locale, key, scope = [ ], options = { })
I18n.normalize_keys(locale, key, scope, options[:separator]).join('.')
end
end
def setup
I18n.backend = FakeTranslationBackend.new
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment