Skip to content

Commit

Permalink
fix for rubocop offense
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Mar 29, 2019
1 parent 6b7fe77 commit 0bca4af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/locales/utils/loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
lambda do |i18n, *args|
i18n.clear
args.each do |arg|
if normalized_locales.keys.include?(arg[:locale])
if normalized_locales.key?(arg[:locale])
right_locale = normalized_locales[arg[:locale]]
Warning.warn("\n*** WARNING *** [Pagy::I18n] The '#{arg[:locale]}' locale is incorrect and deprecated, please use '#{right_locale}'\n\n")
Warning.warn("\n*** WARNING *** [Pagy::I18n.load] The '#{arg[:locale]}' locale is incorrect and deprecated, please use '#{right_locale}'\n\n")
arg[:locale] = right_locale
end
arg[:filepath] ||= Pagy.root.join('locales', "#{arg[:locale]}.yml")
Expand Down

0 comments on commit 0bca4af

Please sign in to comment.