lib/i18n/tasks/data.rb
# Normalize all the locale data in the store (by writing to the store).
#
# @param [Array<String>] locales locales to normalize. Default: all.
# @param [Boolean] force_pattern_router Whether to use pattern router regardless of the config.
Normalize all the locale data in the store (by writing to the store).
Normalize all the locale data in the store ( by writing to the store ) .
def normalize_store!(locales: nil, force_pattern_router: false)
      locales ||= self.locales
      router = force_pattern_router ? ::I18n::Tasks::Data::Router::PatternRouter.new(data, data.config) : data.router
      data.with_router(router) do
        Array(locales).each do |target_locale|
          data[target_locale] = data[target_locale]
        end
      end
    end
def normalize_store! ( locales : nil , force_pattern_router : false ) locales ||= self . locales router = force_pattern_router ? :: I18n :: Tasks :: Data :: Router :: PatternRouter . new ( data , data . config ) : data . router data . with_router ( router ) do Array ( locales ) . each do | target_locale | data [ target_locale ] = data [ target_locale ] end end end
Normalize all the locale data in the store (by writing to the store).
Normalize all the locale data in the store ( by writing to the store ) .
# The store handles actual normalization:
locales
<not_specific>
force_pattern_router
<not_specific>
<not_specific>
force_pattern_router Whether to use pattern router regardless of the config.
force_pattern_router Whether to use pattern router regardless of the config .