From 4aec070f00a73ed26555e76741fb94656ebda758 Mon Sep 17 00:00:00 2001 From: Xenor Chang Date: Wed, 31 May 2023 11:05:42 +0800 Subject: [PATCH] Revert normalized_keys before #651 --- lib/i18n.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/i18n.rb b/lib/i18n.rb index ce2108ba..d3369704 100644 --- a/lib/i18n.rb +++ b/lib/i18n.rb @@ -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