lib/dry/schema/messages/i18n.rb in dry-schema-0.6.0 vs lib/dry/schema/messages/i18n.rb in dry-schema-1.0.0

- old
+ new

@@ -7,10 +7,13 @@ module Schema # I18n message backend # # @api public class Messages::I18n < Messages::Abstract + # Translation function + # + # @return [Method] attr_reader :t # @api private def initialize super @@ -80,10 +83,10 @@ # @api private def store_translations(data) locales = data.keys.map(&:to_sym) - I18n.available_locales += locales + I18n.available_locales |= locales locales.each do |locale| I18n.backend.store_translations(locale, data[locale.to_s]) end end