brew vendor-gems: commit updates.
This commit is contained in:
		
							parent
							
								
									baa2626201
								
							
						
					
					
						commit
						c11b664e78
					
				@ -24,7 +24,7 @@ kernel = (class << ::Kernel; self; end)
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/i18n-1.13.0/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/i18n-1.14.0/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/minitest-5.18.0/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/tzinfo-2.0.6/lib")
 | 
			
		||||
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/zeitwerk-2.6.8/lib")
 | 
			
		||||
 | 
			
		||||
@ -331,11 +331,12 @@ module I18n
 | 
			
		||||
    # keys are Symbols.
 | 
			
		||||
    def normalize_keys(locale, key, scope, separator = nil)
 | 
			
		||||
      separator ||= I18n.default_separator
 | 
			
		||||
      locale = locale.to_sym if locale
 | 
			
		||||
 | 
			
		||||
      result = [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
 | 
			
		||||
@ -98,7 +98,7 @@ module I18n
 | 
			
		||||
      # Parse the load path and extract all locales.
 | 
			
		||||
      def available_locales
 | 
			
		||||
        if lazy_load?
 | 
			
		||||
          I18n.load_path.map { |path| LocaleExtractor.locale_from_path(path) }
 | 
			
		||||
          I18n.load_path.map { |path| LocaleExtractor.locale_from_path(path) }.uniq
 | 
			
		||||
        else
 | 
			
		||||
          super
 | 
			
		||||
        end
 | 
			
		||||
@ -47,7 +47,7 @@ module I18n
 | 
			
		||||
 | 
			
		||||
  class MissingTranslation < ArgumentError
 | 
			
		||||
    module Base
 | 
			
		||||
      PERMITTED_KEYS = [:scope].freeze
 | 
			
		||||
      PERMITTED_KEYS = [:scope, :default].freeze
 | 
			
		||||
 | 
			
		||||
      attr_reader :locale, :key, :options
 | 
			
		||||
 | 
			
		||||
@ -63,8 +63,18 @@ module I18n
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      def message
 | 
			
		||||
        "translation missing: #{keys.join('.')}"
 | 
			
		||||
        if options[:default].is_a?(Array)
 | 
			
		||||
          other_options = ([key, *options[:default]]).map { |k| normalized_option(k).prepend('- ') }.join("\n")
 | 
			
		||||
          "Translation missing. Options considered were:\n#{other_options}"
 | 
			
		||||
        else
 | 
			
		||||
          "Translation missing: #{keys.join('.')}"
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      def normalized_option(key)
 | 
			
		||||
        I18n.normalize_keys(locale, key, options[:scope]).join('.')
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      alias :to_s :message
 | 
			
		||||
 | 
			
		||||
      def to_exception
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
# frozen_string_literal: true
 | 
			
		||||
 | 
			
		||||
module I18n
 | 
			
		||||
  VERSION = "1.13.0"
 | 
			
		||||
  VERSION = "1.14.0"
 | 
			
		||||
end
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user