diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-10-28 21:52:33 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-10-28 21:52:33 +0100 |
commit | 0fb2d1a0ba3360e928a7ac9d20378d7f5fbf915f (patch) | |
tree | 2efdfd355b0269f428198b56eaa00c7d6952ed55 /actionview/lib/action_view/helpers | |
parent | 367e4832294c35091ab0928df52e700d9710af7e (diff) | |
download | rails-0fb2d1a0ba3360e928a7ac9d20378d7f5fbf915f.tar.gz rails-0fb2d1a0ba3360e928a7ac9d20378d7f5fbf915f.tar.bz2 rails-0fb2d1a0ba3360e928a7ac9d20378d7f5fbf915f.zip |
Ignore scope in missing translation input.
It's already represented in the key name. Demonstrate with a test.
Also test that the default isn't output.
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r-- | actionview/lib/action_view/helpers/translation_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index dde1ef22ac..4c4d2c4457 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -90,7 +90,7 @@ module ActionView keys = I18n.normalize_keys(e.locale, e.key, e.options[:scope]) title = "translation missing: #{keys.join('.')}" - interpolations = options.except(:default) + interpolations = options.except(:default, :scope) if interpolations.any? title << ", " << interpolations.map { |k, v| "#{k}: #{ERB::Util.html_escape(v)}" }.join(', ') end |