i18n 1.8.8 → 1.8.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d85e42515b239906cad750dc259b33896b1af0f323bb0dfa76e00e25fffc4745
4
- data.tar.gz: 9f7b02056b8d9efe5e753fa21c4d7e40abc1ac7ff5bb219b350d7424a9d8abc8
3
+ metadata.gz: df354d130700e7c31886ac15782c2617d563dea021c586a9194b6494eadf3fde
4
+ data.tar.gz: 4b72e7eb10961f84491eb11c33a0434276d0d780a77141d5dedc484a4a9561b3
5
5
  SHA512:
6
- metadata.gz: 20ec433c6d838fcbb62815541827634e38740ceb02c9e8c2f020a72da6d41316016ff89399fc4baaea23150ae6be020a77c8dc7855d1d1da7a5d72f7a3834b30
7
- data.tar.gz: 27300973f400a0804fed69ab7e522bf2f3e60718a541245f8d6874c244b9a5aff67dbebfc5c503dc82336b962349e23e4d046ee688e2af03840bd9d7528e2a8b
6
+ metadata.gz: bf3447b5b7173685131998523341716b2b20cb03d256be5c8b287ba1fc44ce1e9cca0ed80b58708b860b5e01fa58c04b4a059978f2d8d2ed59bafa7a9dd35550
7
+ data.tar.gz: ce81270e8fbc5937a6dea497c485583d4adb4c3295fb824797028f771e2ac54118db3df26d157f222a3b70821a80174b4d50f959fe7010490cfffd391572272d
@@ -240,7 +240,11 @@ module I18n
240
240
  # toplevel keys.
241
241
  def load_yml(filename)
242
242
  begin
243
- YAML.load_file(filename)
243
+ if YAML.respond_to?(:unsafe_load_file) # Psych 4.0 way
244
+ YAML.unsafe_load_file(filename)
245
+ else
246
+ YAML.load_file(filename)
247
+ end
244
248
  rescue TypeError, ScriptError, StandardError => e
245
249
  raise InvalidLocaleData.new(filename, e.inspect)
246
250
  end
@@ -49,7 +49,7 @@ module I18n
49
49
  catch(:exception) do
50
50
  result = super(fallback, key, fallback_options)
51
51
  unless result.nil?
52
- on_fallback(locale, fallback, key, options) if locale != fallback
52
+ on_fallback(locale, fallback, key, options) if locale.to_s != fallback.to_s
53
53
  return result
54
54
  end
55
55
  end
@@ -35,8 +35,7 @@ module I18n
35
35
  def store_translations(locale, data, options = EMPTY_HASH)
36
36
  if I18n.enforce_available_locales &&
37
37
  I18n.available_locales_initialized? &&
38
- !I18n.available_locales.include?(locale.to_sym) &&
39
- !I18n.available_locales.include?(locale.to_s)
38
+ !I18n.locale_available?(locale)
40
39
  return data
41
40
  end
42
41
  locale = locale.to_sym
@@ -4,7 +4,7 @@ module I18n
4
4
  using I18n::HashRefinements
5
5
  def except(*keys)
6
6
  dup.except!(*keys)
7
- end
7
+ end unless method_defined?(:except)
8
8
 
9
9
  def except!(*keys)
10
10
  keys.each { |key| delete(key) }
@@ -46,7 +46,7 @@
46
46
  # fallbacks[:"ar-PS"] # => [:"ar-PS", :ar, :"he-IL", :he, :"en-US", :en]
47
47
  # fallbacks[:"ar-EG"] # => [:"ar-EG", :ar, :"en-US", :en]
48
48
  #
49
- # # people speaking Sami as spoken in Finnland also speak Swedish and Finnish as spoken in Finnland
49
+ # # people speaking Sami as spoken in Finland also speak Swedish and Finnish as spoken in Finland
50
50
  # fallbacks.map(:sms => [:"se-FI", :"fi-FI"])
51
51
  # fallbacks[:sms] # => [:sms, :"se-FI", :se, :"fi-FI", :fi, :"en-US", :en]
52
52
 
data/lib/i18n/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module I18n
4
- VERSION = "1.8.8"
4
+ VERSION = "1.8.11"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.8
4
+ version: 1.8.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs
@@ -13,15 +13,15 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2021-02-02 00:00:00.000000000 Z
16
+ date: 2021-11-02 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
- name: concurrent-ruby
20
19
  requirement: !ruby/object:Gem::Requirement
21
20
  requirements:
22
21
  - - "~>"
23
22
  - !ruby/object:Gem::Version
24
23
  version: '1.0'
24
+ name: concurrent-ruby
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: 1.3.5
107
107
  requirements: []
108
- rubygems_version: 3.2.3
108
+ rubygems_version: 3.0.6
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: New wave Internationalization support for Ruby