Skip to content

Commit

Permalink
Revert normalized_keys before ruby-i18n#651
Browse files Browse the repository at this point in the history
  • Loading branch information
tubaxenor committed May 31, 2023
1 parent 16940c3 commit 4aec070
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/i18n.rb
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,11 @@ def with_locale(tmp_locale = nil)
def normalize_keys(locale, key, scope, separator = nil)
separator ||= I18n.default_separator

result = locale ? normalize_key(locale, separator) : [locale]
result.concat(normalize_key(scope, separator)) if scope
result.concat(normalize_key(key, separator))
[
*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 4aec070

Please sign in to comment.