Skip to content

Commit

Permalink
Merge pull request #616 from codealchemy/normalize-keys/splat
Browse files Browse the repository at this point in the history
Minor `I18n.normalize_keys` improvement
  • Loading branch information
radar committed Feb 3, 2022
2 parents a1dc424 + f3c1936 commit 00fc810
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/i18n.rb
Expand Up @@ -338,11 +338,11 @@ def with_locale(tmp_locale = nil)
def normalize_keys(locale, key, scope, separator = nil)
separator ||= I18n.default_separator

keys = []
keys.concat normalize_key(locale, separator)
keys.concat normalize_key(scope, separator)
keys.concat normalize_key(key, separator)
keys
[
*normalize_key(locale, separator),
*normalize_key(scope, separator),
*normalize_key(key, separator)
]
end

# Returns true when the passed locale, which can be either a String or a
Expand Down

0 comments on commit 00fc810

Please sign in to comment.