diff --git a/lib/locales/utils/loader.rb b/lib/locales/utils/loader.rb index 0deb82230..c37c2245e 100644 --- a/lib/locales/utils/loader.rb +++ b/lib/locales/utils/loader.rb @@ -16,17 +16,10 @@ end end -normalized_locales = {'zh-cn'=>'zh-CN', 'zh-hk'=>'zh-HK'} - # loader proc lambda do |i18n, *args| i18n.clear args.each do |arg| - if normalized_locales.key?(arg[:locale]) - right_locale = normalized_locales[arg[:locale]] - 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") arg[:pluralize] ||= p11n[arg[:locale]] hash = YAML.load(File.read(arg[:filepath], encoding: 'UTF-8')) #rubocop:disable Security/YAMLLoad