packwerk 3.2.2 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/packwerk/application_validator.rb +2 -1
  3. data/lib/packwerk/graph.rb +15 -56
  4. data/lib/packwerk/reference_checking/checkers/dependency_checker.rb +1 -2
  5. data/lib/packwerk/run_context.rb +5 -0
  6. data/lib/packwerk/validators/dependency_validator.rb +5 -4
  7. data/lib/packwerk/version.rb +1 -1
  8. data/sorbet/rbi/gems/{actionpack@7.0.3.1.rbi → actionpack@7.0.8.7.rbi} +1338 -1227
  9. data/sorbet/rbi/gems/{actionview@7.0.3.1.rbi → actionview@7.0.8.7.rbi} +548 -503
  10. data/sorbet/rbi/gems/{activesupport@7.0.3.1.rbi → activesupport@7.0.8.7.rbi} +714 -635
  11. data/sorbet/rbi/gems/{better_html@2.0.1.rbi → better_html@2.1.1.rbi} +21 -21
  12. data/sorbet/rbi/gems/{concurrent-ruby@1.1.10.rbi → concurrent-ruby@1.3.5.rbi} +1390 -1366
  13. data/sorbet/rbi/gems/{constant_resolver@0.2.0.rbi → constant_resolver@0.3.0.rbi} +22 -13
  14. data/sorbet/rbi/gems/{erubi@1.11.0.rbi → erubi@1.13.1.rbi} +28 -17
  15. data/sorbet/rbi/gems/{i18n@1.12.0.rbi → i18n@1.14.7.rbi} +234 -172
  16. data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.7.2.rbi} +94 -74
  17. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
  18. data/sorbet/rbi/gems/{loofah@2.18.0.rbi → loofah@2.24.0.rbi} +470 -243
  19. data/sorbet/rbi/gems/{minitest@5.16.2.rbi → minitest@5.25.4.rbi} +577 -472
  20. data/sorbet/rbi/gems/{mocha@1.14.0.rbi → mocha@2.5.0.rbi} +468 -684
  21. data/sorbet/rbi/gems/{nokogiri@1.15.3.rbi → nokogiri@1.18.4.rbi} +1756 -869
  22. data/sorbet/rbi/gems/{parallel@1.24.0.rbi → parallel@1.25.1.rbi} +26 -20
  23. data/sorbet/rbi/gems/{racc@1.7.1.rbi → racc@1.8.1.rbi} +36 -36
  24. data/sorbet/rbi/gems/{rack-test@2.0.2.rbi → rack-test@2.2.0.rbi} +87 -114
  25. data/sorbet/rbi/gems/{rack@2.2.4.rbi → rack@2.2.13.rbi} +243 -195
  26. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +754 -0
  27. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +764 -0
  28. data/sorbet/rbi/gems/{railties@7.0.3.1.rbi → railties@7.0.8.7.rbi} +146 -140
  29. data/sorbet/rbi/gems/{regexp_parser@2.5.0.rbi → regexp_parser@2.9.2.rbi} +947 -542
  30. data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.3.9.rbi} +452 -312
  31. data/sorbet/rbi/gems/{rubocop-ast@1.21.0.rbi → rubocop-ast@1.31.3.rbi} +717 -588
  32. data/sorbet/rbi/gems/{rubocop@1.34.1.rbi → rubocop@1.64.1.rbi} +10916 -4406
  33. data/sorbet/rbi/gems/{ruby-progressbar@1.11.0.rbi → ruby-progressbar@1.13.0.rbi} +359 -281
  34. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
  35. data/sorbet/rbi/gems/{tzinfo@2.0.5.rbi → tzinfo@2.0.6.rbi} +144 -141
  36. data/sorbet/rbi/gems/{unicode-display_width@2.2.0.rbi → unicode-display_width@2.5.0.rbi} +24 -7
  37. metadata +36 -41
  38. data/sorbet/rbi/gems/language_server-protocol@3.16.0.3.rbi +0 -8
  39. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -8
  40. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +0 -455
  41. data/sorbet/rbi/gems/rails-html-sanitizer@1.4.3.rbi +0 -542
  42. data/sorbet/rbi/gems/ruby-lsp@0.2.3.rbi +0 -11
  43. data/sorbet/rbi/gems/syntax_tree@3.3.0.rbi +0 -8
  44. /data/sorbet/rbi/gems/{builder@3.2.4.rbi → builder@3.3.0.rbi} +0 -0
  45. /data/sorbet/rbi/gems/{parser@3.3.1.0.rbi → parser@3.3.3.0.rbi} +0 -0
@@ -81,13 +81,13 @@ module I18n
81
81
  #
82
82
  # @raise [ReservedInterpolationKey]
83
83
  #
84
- # source://i18n//lib/i18n/interpolate/ruby.rb#16
84
+ # source://i18n//lib/i18n/interpolate/ruby.rb#23
85
85
  def interpolate(string, values); end
86
86
 
87
- # source://i18n//lib/i18n/interpolate/ruby.rb#22
87
+ # source://i18n//lib/i18n/interpolate/ruby.rb#29
88
88
  def interpolate_hash(string, values); end
89
89
 
90
- # source://i18n//lib/i18n.rb#37
90
+ # source://i18n//lib/i18n.rb#38
91
91
  def new_double_nested_cache; end
92
92
 
93
93
  # @return [Boolean]
@@ -100,10 +100,10 @@ module I18n
100
100
  # extra keys as I18n options, you should call I18n.reserve_key
101
101
  # before any I18n.translate (etc) calls are made.
102
102
  #
103
- # source://i18n//lib/i18n.rb#45
103
+ # source://i18n//lib/i18n.rb#46
104
104
  def reserve_key(key); end
105
105
 
106
- # source://i18n//lib/i18n.rb#50
106
+ # source://i18n//lib/i18n.rb#51
107
107
  def reserved_keys_pattern; end
108
108
  end
109
109
  end
@@ -123,15 +123,15 @@ module I18n::Backend::Base
123
123
  #
124
124
  # @raise [NotImplementedError]
125
125
  #
126
- # source://i18n//lib/i18n/backend/base.rb#94
126
+ # source://i18n//lib/i18n/backend/base.rb#97
127
127
  def available_locales; end
128
128
 
129
- # source://i18n//lib/i18n/backend/base.rb#102
129
+ # source://i18n//lib/i18n/backend/base.rb#105
130
130
  def eager_load!; end
131
131
 
132
132
  # @return [Boolean]
133
133
  #
134
- # source://i18n//lib/i18n/backend/base.rb#68
134
+ # source://i18n//lib/i18n/backend/base.rb#71
135
135
  def exists?(locale, key, options = T.unsafe(nil)); end
136
136
 
137
137
  # Accepts a list of paths to translation files. Loads translations from
@@ -147,10 +147,10 @@ module I18n::Backend::Base
147
147
  #
148
148
  # @raise [ArgumentError]
149
149
  #
150
- # source://i18n//lib/i18n/backend/base.rb#75
150
+ # source://i18n//lib/i18n/backend/base.rb#78
151
151
  def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
152
152
 
153
- # source://i18n//lib/i18n/backend/base.rb#98
153
+ # source://i18n//lib/i18n/backend/base.rb#101
154
154
  def reload!; end
155
155
 
156
156
  # This method receives a locale, a data hash and options for storing translations.
@@ -174,7 +174,7 @@ module I18n::Backend::Base
174
174
  # ann: 'good', john: 'big'
175
175
  # #=> { people: { ann: "Ann is good", john: "John is big" } }
176
176
  #
177
- # source://i18n//lib/i18n/backend/base.rb#202
177
+ # source://i18n//lib/i18n/backend/base.rb#217
178
178
  def deep_interpolate(locale, data, values = T.unsafe(nil)); end
179
179
 
180
180
  # Evaluates defaults.
@@ -182,12 +182,12 @@ module I18n::Backend::Base
182
182
  # first translation that can be resolved. Otherwise it tries to resolve
183
183
  # the translation directly.
184
184
  #
185
- # source://i18n//lib/i18n/backend/base.rb#125
185
+ # source://i18n//lib/i18n/backend/base.rb#128
186
186
  def default(locale, object, subject, options = T.unsafe(nil)); end
187
187
 
188
188
  # @return [Boolean]
189
189
  #
190
- # source://i18n//lib/i18n/backend/base.rb#108
190
+ # source://i18n//lib/i18n/backend/base.rb#111
191
191
  def eager_loaded?; end
192
192
 
193
193
  # Interpolates values into a given subject.
@@ -198,10 +198,10 @@ module I18n::Backend::Base
198
198
  #
199
199
  # if the given subject is an array then:
200
200
  # each element of the array is recursively interpolated (until it finds a string)
201
- # method interpolates ["yes, %{user}", ["maybe no, %{user}, "no, %{user}"]], :user => "bartuz"
202
- # # => "["yes, bartuz",["maybe no, bartuz", "no, bartuz"]]"
201
+ # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz"
202
+ # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]]
203
203
  #
204
- # source://i18n//lib/i18n/backend/base.rb#186
204
+ # source://i18n//lib/i18n/backend/base.rb#201
205
205
  def interpolate(locale, subject, values = T.unsafe(nil)); end
206
206
 
207
207
  # Loads a single translations file by delegating to #load_rb or
@@ -211,41 +211,41 @@ module I18n::Backend::Base
211
211
  #
212
212
  # @raise [UnknownFileType]
213
213
  #
214
- # source://i18n//lib/i18n/backend/base.rb#225
214
+ # source://i18n//lib/i18n/backend/base.rb#240
215
215
  def load_file(filename); end
216
216
 
217
217
  # Loads a JSON translations file. The data must have locales as
218
218
  # toplevel keys.
219
219
  #
220
- # source://i18n//lib/i18n/backend/base.rb#261
220
+ # source://i18n//lib/i18n/backend/base.rb#276
221
221
  def load_json(filename); end
222
222
 
223
223
  # Loads a plain Ruby translations file. eval'ing the file must yield
224
224
  # a Hash containing translation data with locales as toplevel keys.
225
225
  #
226
- # source://i18n//lib/i18n/backend/base.rb#239
226
+ # source://i18n//lib/i18n/backend/base.rb#254
227
227
  def load_rb(filename); end
228
228
 
229
229
  # Loads a YAML translations file. The data must have locales as
230
230
  # toplevel keys.
231
231
  #
232
- # source://i18n//lib/i18n/backend/base.rb#246
232
+ # source://i18n//lib/i18n/backend/base.rb#261
233
233
  def load_yaml(filename); end
234
234
 
235
235
  # Loads a YAML translations file. The data must have locales as
236
236
  # toplevel keys.
237
237
  #
238
- # source://i18n//lib/i18n/backend/base.rb#246
238
+ # source://i18n//lib/i18n/backend/base.rb#261
239
239
  def load_yml(filename); end
240
240
 
241
241
  # The method which actually looks up for the translation in the store.
242
242
  #
243
243
  # @raise [NotImplementedError]
244
244
  #
245
- # source://i18n//lib/i18n/backend/base.rb#113
245
+ # source://i18n//lib/i18n/backend/base.rb#116
246
246
  def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
247
247
 
248
- # source://i18n//lib/i18n/backend/base.rb#293
248
+ # source://i18n//lib/i18n/backend/base.rb#308
249
249
  def pluralization_key(entry, count); end
250
250
 
251
251
  # Picks a translation from a pluralized mnemonic subkey according to English
@@ -259,7 +259,7 @@ module I18n::Backend::Base
259
259
  #
260
260
  # @raise [InvalidPluralizationData]
261
261
  #
262
- # source://i18n//lib/i18n/backend/base.rb#167
262
+ # source://i18n//lib/i18n/backend/base.rb#182
263
263
  def pluralize(locale, entry, count); end
264
264
 
265
265
  # Resolves a translation.
@@ -267,7 +267,7 @@ module I18n::Backend::Base
267
267
  # given options. If it is a Proc then it will be evaluated. All other
268
268
  # subjects will be returned directly.
269
269
  #
270
- # source://i18n//lib/i18n/backend/base.rb#142
270
+ # source://i18n//lib/i18n/backend/base.rb#150
271
271
  def resolve(locale, object, subject, options = T.unsafe(nil)); end
272
272
 
273
273
  # Resolves a translation.
@@ -275,15 +275,15 @@ module I18n::Backend::Base
275
275
  # given options. If it is a Proc then it will be evaluated. All other
276
276
  # subjects will be returned directly.
277
277
  #
278
- # source://i18n//lib/i18n/backend/base.rb#142
278
+ # source://i18n//lib/i18n/backend/base.rb#150
279
279
  def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end
280
280
 
281
281
  # @return [Boolean]
282
282
  #
283
- # source://i18n//lib/i18n/backend/base.rb#117
283
+ # source://i18n//lib/i18n/backend/base.rb#120
284
284
  def subtrees?; end
285
285
 
286
- # source://i18n//lib/i18n/backend/base.rb#274
286
+ # source://i18n//lib/i18n/backend/base.rb#289
287
287
  def translate_localization_format(locale, object, format, options); end
288
288
  end
289
289
 
@@ -362,72 +362,74 @@ end
362
362
  # The implementation assumes that all backends added to the Chain implement
363
363
  # a lookup method with the same API as Simple backend does.
364
364
  #
365
- # source://i18n//lib/i18n/backend/chain.rb#19
365
+ # Fallback translations using the :default option are only used by the last backend of a chain.
366
+ #
367
+ # source://i18n//lib/i18n/backend/chain.rb#21
366
368
  class I18n::Backend::Chain
367
369
  include ::I18n::Backend::Transliterator
368
370
  include ::I18n::Backend::Base
369
371
  include ::I18n::Backend::Chain::Implementation
370
372
  end
371
373
 
372
- # source://i18n//lib/i18n/backend/chain.rb#20
374
+ # source://i18n//lib/i18n/backend/chain.rb#22
373
375
  module I18n::Backend::Chain::Implementation
374
376
  include ::I18n::Backend::Transliterator
375
377
  include ::I18n::Backend::Base
376
378
 
377
- # source://i18n//lib/i18n/backend/chain.rb#25
379
+ # source://i18n//lib/i18n/backend/chain.rb#27
378
380
  def initialize(*backends); end
379
381
 
380
- # source://i18n//lib/i18n/backend/chain.rb#50
382
+ # source://i18n//lib/i18n/backend/chain.rb#52
381
383
  def available_locales; end
382
384
 
383
385
  # Returns the value of attribute backends.
384
386
  #
385
- # source://i18n//lib/i18n/backend/chain.rb#23
387
+ # source://i18n//lib/i18n/backend/chain.rb#25
386
388
  def backends; end
387
389
 
388
390
  # Sets the attribute backends
389
391
  #
390
392
  # @param value the value to set the attribute backends to.
391
393
  #
392
- # source://i18n//lib/i18n/backend/chain.rb#23
394
+ # source://i18n//lib/i18n/backend/chain.rb#25
393
395
  def backends=(_arg0); end
394
396
 
395
- # source://i18n//lib/i18n/backend/chain.rb#42
397
+ # source://i18n//lib/i18n/backend/chain.rb#44
396
398
  def eager_load!; end
397
399
 
398
400
  # @return [Boolean]
399
401
  #
400
- # source://i18n//lib/i18n/backend/chain.rb#74
402
+ # source://i18n//lib/i18n/backend/chain.rb#76
401
403
  def exists?(locale, key, options = T.unsafe(nil)); end
402
404
 
403
405
  # @return [Boolean]
404
406
  #
405
- # source://i18n//lib/i18n/backend/chain.rb#29
407
+ # source://i18n//lib/i18n/backend/chain.rb#31
406
408
  def initialized?; end
407
409
 
408
- # source://i18n//lib/i18n/backend/chain.rb#80
410
+ # source://i18n//lib/i18n/backend/chain.rb#82
409
411
  def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
410
412
 
411
- # source://i18n//lib/i18n/backend/chain.rb#38
413
+ # source://i18n//lib/i18n/backend/chain.rb#40
412
414
  def reload!; end
413
415
 
414
- # source://i18n//lib/i18n/backend/chain.rb#46
416
+ # source://i18n//lib/i18n/backend/chain.rb#48
415
417
  def store_translations(locale, data, options = T.unsafe(nil)); end
416
418
 
417
- # source://i18n//lib/i18n/backend/chain.rb#54
419
+ # source://i18n//lib/i18n/backend/chain.rb#56
418
420
  def translate(locale, key, default_options = T.unsafe(nil)); end
419
421
 
420
422
  protected
421
423
 
422
- # source://i18n//lib/i18n/backend/chain.rb#90
424
+ # source://i18n//lib/i18n/backend/chain.rb#92
423
425
  def init_translations; end
424
426
 
425
427
  # @return [Boolean]
426
428
  #
427
- # source://i18n//lib/i18n/backend/chain.rb#106
429
+ # source://i18n//lib/i18n/backend/chain.rb#108
428
430
  def namespace_lookup?(result, options); end
429
431
 
430
- # source://i18n//lib/i18n/backend/chain.rb#96
432
+ # source://i18n//lib/i18n/backend/chain.rb#98
431
433
  def translations; end
432
434
 
433
435
  private
@@ -437,7 +439,7 @@ module I18n::Backend::Chain::Implementation
437
439
  # it is wise to have our own copy. We underscore it
438
440
  # to not pollute the namespace of the including class.
439
441
  #
440
- # source://i18n//lib/i18n/backend/chain.rb#115
442
+ # source://i18n//lib/i18n/backend/chain.rb#117
441
443
  def _deep_merge(hash, other_hash); end
442
444
  end
443
445
 
@@ -445,10 +447,10 @@ end
445
447
  module I18n::Backend::Fallbacks
446
448
  # @return [Boolean]
447
449
  #
448
- # source://i18n//lib/i18n/backend/fallbacks.rb#94
450
+ # source://i18n//lib/i18n/backend/fallbacks.rb#98
449
451
  def exists?(locale, key, options = T.unsafe(nil)); end
450
452
 
451
- # source://i18n//lib/i18n/backend/fallbacks.rb#85
453
+ # source://i18n//lib/i18n/backend/fallbacks.rb#89
452
454
  def extract_non_symbol_default!(options); end
453
455
 
454
456
  # source://i18n//lib/i18n/backend/fallbacks.rb#67
@@ -472,7 +474,7 @@ module I18n::Backend::Fallbacks
472
474
 
473
475
  # Overwrite on_fallback to add specified logic when the fallback succeeds.
474
476
  #
475
- # source://i18n//lib/i18n/backend/fallbacks.rb#110
477
+ # source://i18n//lib/i18n/backend/fallbacks.rb#114
476
478
  def on_fallback(_original_locale, _fallback_locale, _key, _options); end
477
479
  end
478
480
 
@@ -601,15 +603,15 @@ end
601
603
 
602
604
  # source://i18n//lib/i18n/backend/interpolation_compiler.rb#20
603
605
  module I18n::Backend::InterpolationCompiler
604
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#99
606
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#97
605
607
  def interpolate(locale, string, values); end
606
608
 
607
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#109
609
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#107
608
610
  def store_translations(locale, data, options = T.unsafe(nil)); end
609
611
 
610
612
  protected
611
613
 
612
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#115
614
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#113
613
615
  def compile_all_strings_in(data); end
614
616
  end
615
617
 
@@ -617,58 +619,55 @@ end
617
619
  module I18n::Backend::InterpolationCompiler::Compiler
618
620
  extend ::I18n::Backend::InterpolationCompiler::Compiler
619
621
 
620
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#27
622
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#26
621
623
  def compile_if_an_interpolation(string); end
622
624
 
623
625
  # @return [Boolean]
624
626
  #
625
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#39
627
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#38
626
628
  def interpolated_str?(str); end
627
629
 
628
630
  protected
629
631
 
630
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#60
632
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#58
631
633
  def compile_interpolation_token(key); end
632
634
 
633
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#49
635
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#48
634
636
  def compiled_interpolation_body(str); end
635
637
 
636
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#73
638
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#71
637
639
  def direct_key(key); end
638
640
 
639
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#93
641
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#91
640
642
  def escape_key_sym(key); end
641
643
 
642
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#89
644
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#87
643
645
  def escape_plain_str(str); end
644
646
 
645
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#55
646
- def handle_interpolation_token(interpolation, matchdata); end
647
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#54
648
+ def handle_interpolation_token(token); end
647
649
 
648
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#69
650
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#67
649
651
  def interpolate_key(key); end
650
652
 
651
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#64
653
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#62
652
654
  def interpolate_or_raise_missing(key); end
653
655
 
654
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#81
656
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#79
655
657
  def missing_key(key); end
656
658
 
657
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#77
659
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#75
658
660
  def nil_key(key); end
659
661
 
660
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#85
662
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#83
661
663
  def reserved_key(key); end
662
664
 
663
665
  # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"]
664
666
  #
665
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#45
667
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#44
666
668
  def tokenize(str); end
667
669
  end
668
670
 
669
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#25
670
- I18n::Backend::InterpolationCompiler::Compiler::INTERPOLATION_SYNTAX_PATTERN = T.let(T.unsafe(nil), Regexp)
671
-
672
671
  # source://i18n//lib/i18n/backend/interpolation_compiler.rb#24
673
672
  I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp)
674
673
 
@@ -1014,29 +1013,45 @@ end
1014
1013
  module I18n::Backend::Pluralization
1015
1014
  # Overwrites the Base backend translate method so that it will check the
1016
1015
  # translation meta data space (:i18n) for a locale specific pluralization
1017
- # rule and use it to pluralize the given entry. I.e. the library expects
1016
+ # rule and use it to pluralize the given entry. I.e., the library expects
1018
1017
  # pluralization rules to be stored at I18n.t(:'i18n.plural.rule')
1019
1018
  #
1020
1019
  # Pluralization rules are expected to respond to #call(count) and
1021
- # return a pluralization key. Valid keys depend on the translation data
1022
- # hash (entry) but it is generally recommended to follow CLDR's style,
1023
- # i.e., return one of the keys :zero, :one, :few, :many, :other.
1024
- #
1025
- # The :zero key is always picked directly when count equals 0 AND the
1026
- # translation data has the key :zero. This way translators are free to
1027
- # either pick a special :zero translation even for languages where the
1028
- # pluralizer does not return a :zero key.
1029
- #
1030
- # source://i18n//lib/i18n/backend/pluralization.rb#31
1020
+ # return a pluralization key. Valid keys depend on the pluralization
1021
+ # rules for the locale, as defined in the CLDR.
1022
+ # As of v41, 6 locale-specific plural categories are defined:
1023
+ # :few, :many, :one, :other, :two, :zero
1024
+ #
1025
+ # n.b., The :one plural category does not imply the number 1.
1026
+ # Instead, :one is a category for any number that behaves like 1 in
1027
+ # that locale. For example, in some locales, :one is used for numbers
1028
+ # that end in "1" (like 1, 21, 151) but that don't end in
1029
+ # 11 (like 11, 111, 10311).
1030
+ # Similar notes apply to the :two, and :zero plural categories.
1031
+ #
1032
+ # If you want to have different strings for the categories of count == 0
1033
+ # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car")
1034
+ # use the explicit `"0"` and `"1"` keys.
1035
+ # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules
1036
+ #
1037
+ # source://i18n//lib/i18n/backend/pluralization.rb#39
1031
1038
  def pluralize(locale, entry, count); end
1032
1039
 
1033
1040
  protected
1034
1041
 
1035
- # source://i18n//lib/i18n/backend/pluralization.rb#50
1042
+ # source://i18n//lib/i18n/backend/pluralization.rb#81
1036
1043
  def pluralizer(locale); end
1037
1044
 
1038
- # source://i18n//lib/i18n/backend/pluralization.rb#46
1045
+ # source://i18n//lib/i18n/backend/pluralization.rb#77
1039
1046
  def pluralizers; end
1047
+
1048
+ private
1049
+
1050
+ # Normalizes categories of 0.0 and 1.0
1051
+ # and returns the symbolic version
1052
+ #
1053
+ # source://i18n//lib/i18n/backend/pluralization.rb#89
1054
+ def symbolic_count(count); end
1040
1055
  end
1041
1056
 
1042
1057
  # A simple backend that reads translations from YAML files and stores them in
@@ -1045,14 +1060,14 @@ end
1045
1060
  # The implementation is provided by a Implementation module allowing to easily
1046
1061
  # extend Simple backend's behavior by including modules. E.g.:
1047
1062
  #
1048
- # module I18n::Backend::Pluralization
1049
- # def pluralize(*args)
1050
- # # extended pluralization logic
1051
- # super
1052
- # end
1053
- # end
1063
+ # module I18n::Backend::Pluralization
1064
+ # def pluralize(*args)
1065
+ # # extended pluralization logic
1066
+ # super
1067
+ # end
1068
+ # end
1054
1069
  #
1055
- # I18n::Backend::Simple.include(I18n::Backend::Pluralization)
1070
+ # I18n::Backend::Simple.include(I18n::Backend::Pluralization)
1056
1071
  #
1057
1072
  # source://i18n//lib/i18n/backend/simple.rb#21
1058
1073
  class I18n::Backend::Simple
@@ -1068,20 +1083,20 @@ module I18n::Backend::Simple::Implementation
1068
1083
 
1069
1084
  # Get available locales from the translations hash
1070
1085
  #
1071
- # source://i18n//lib/i18n/backend/simple.rb#46
1086
+ # source://i18n//lib/i18n/backend/simple.rb#49
1072
1087
  def available_locales; end
1073
1088
 
1074
- # source://i18n//lib/i18n/backend/simple.rb#61
1089
+ # source://i18n//lib/i18n/backend/simple.rb#64
1075
1090
  def eager_load!; end
1076
1091
 
1077
1092
  # @return [Boolean]
1078
1093
  #
1079
- # source://i18n//lib/i18n/backend/simple.rb#25
1094
+ # source://i18n//lib/i18n/backend/simple.rb#28
1080
1095
  def initialized?; end
1081
1096
 
1082
1097
  # Clean up translations hash and set initialized to false on reload!
1083
1098
  #
1084
- # source://i18n//lib/i18n/backend/simple.rb#55
1099
+ # source://i18n//lib/i18n/backend/simple.rb#58
1085
1100
  def reload!; end
1086
1101
 
1087
1102
  # Stores translations for the given locale in memory.
@@ -1089,15 +1104,15 @@ module I18n::Backend::Simple::Implementation
1089
1104
  # translations will be overwritten by new ones only at the deepest
1090
1105
  # level of the hash.
1091
1106
  #
1092
- # source://i18n//lib/i18n/backend/simple.rb#33
1107
+ # source://i18n//lib/i18n/backend/simple.rb#36
1093
1108
  def store_translations(locale, data, options = T.unsafe(nil)); end
1094
1109
 
1095
- # source://i18n//lib/i18n/backend/simple.rb#66
1110
+ # source://i18n//lib/i18n/backend/simple.rb#69
1096
1111
  def translations(do_init: T.unsafe(nil)); end
1097
1112
 
1098
1113
  protected
1099
1114
 
1100
- # source://i18n//lib/i18n/backend/simple.rb#76
1115
+ # source://i18n//lib/i18n/backend/simple.rb#83
1101
1116
  def init_translations; end
1102
1117
 
1103
1118
  # Looks up a translation from the translations hash. Returns nil if
@@ -1106,10 +1121,15 @@ module I18n::Backend::Simple::Implementation
1106
1121
  # into multiple keys, i.e. <tt>currency.format</tt> is regarded the same as
1107
1122
  # <tt>%w(currency format)</tt>.
1108
1123
  #
1109
- # source://i18n//lib/i18n/backend/simple.rb#86
1124
+ # source://i18n//lib/i18n/backend/simple.rb#93
1110
1125
  def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
1111
1126
  end
1112
1127
 
1128
+ # Mutex to ensure that concurrent translations loading will be thread-safe
1129
+ #
1130
+ # source://i18n//lib/i18n/backend/simple.rb#26
1131
+ I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
1132
+
1113
1133
  # source://i18n//lib/i18n/backend/transliterator.rb#6
1114
1134
  module I18n::Backend::Transliterator
1115
1135
  # Given a locale and a UTF-8 string, return the locale's ASCII
@@ -1172,69 +1192,69 @@ class I18n::Backend::Transliterator::ProcTransliterator
1172
1192
  def transliterate(string, replacement = T.unsafe(nil)); end
1173
1193
  end
1174
1194
 
1175
- # source://i18n//lib/i18n.rb#54
1195
+ # source://i18n//lib/i18n.rb#55
1176
1196
  module I18n::Base
1177
- # source://i18n//lib/i18n.rb#69
1197
+ # source://i18n//lib/i18n.rb#70
1178
1198
  def available_locales; end
1179
1199
 
1180
- # source://i18n//lib/i18n.rb#73
1200
+ # source://i18n//lib/i18n.rb#74
1181
1201
  def available_locales=(value); end
1182
1202
 
1183
1203
  # @return [Boolean]
1184
1204
  #
1185
- # source://i18n//lib/i18n.rb#355
1205
+ # source://i18n//lib/i18n.rb#386
1186
1206
  def available_locales_initialized?; end
1187
1207
 
1188
- # source://i18n//lib/i18n.rb#69
1208
+ # source://i18n//lib/i18n.rb#70
1189
1209
  def backend; end
1190
1210
 
1191
- # source://i18n//lib/i18n.rb#73
1211
+ # source://i18n//lib/i18n.rb#74
1192
1212
  def backend=(value); end
1193
1213
 
1194
1214
  # Gets I18n configuration object.
1195
1215
  #
1196
- # source://i18n//lib/i18n.rb#56
1216
+ # source://i18n//lib/i18n.rb#57
1197
1217
  def config; end
1198
1218
 
1199
1219
  # Sets I18n configuration object.
1200
1220
  #
1201
- # source://i18n//lib/i18n.rb#61
1221
+ # source://i18n//lib/i18n.rb#62
1202
1222
  def config=(value); end
1203
1223
 
1204
- # source://i18n//lib/i18n.rb#69
1224
+ # source://i18n//lib/i18n.rb#70
1205
1225
  def default_locale; end
1206
1226
 
1207
- # source://i18n//lib/i18n.rb#73
1227
+ # source://i18n//lib/i18n.rb#74
1208
1228
  def default_locale=(value); end
1209
1229
 
1210
- # source://i18n//lib/i18n.rb#69
1230
+ # source://i18n//lib/i18n.rb#70
1211
1231
  def default_separator; end
1212
1232
 
1213
- # source://i18n//lib/i18n.rb#73
1233
+ # source://i18n//lib/i18n.rb#74
1214
1234
  def default_separator=(value); end
1215
1235
 
1216
1236
  # Tells the backend to load translations now. Used in situations like the
1217
1237
  # Rails production environment. Backends can implement whatever strategy
1218
1238
  # is useful.
1219
1239
  #
1220
- # source://i18n//lib/i18n.rb#90
1240
+ # source://i18n//lib/i18n.rb#91
1221
1241
  def eager_load!; end
1222
1242
 
1223
- # source://i18n//lib/i18n.rb#69
1243
+ # source://i18n//lib/i18n.rb#70
1224
1244
  def enforce_available_locales; end
1225
1245
 
1226
1246
  # Raises an InvalidLocale exception when the passed locale is not available.
1227
1247
  #
1228
- # source://i18n//lib/i18n.rb#349
1248
+ # source://i18n//lib/i18n.rb#380
1229
1249
  def enforce_available_locales!(locale); end
1230
1250
 
1231
- # source://i18n//lib/i18n.rb#73
1251
+ # source://i18n//lib/i18n.rb#74
1232
1252
  def enforce_available_locales=(value); end
1233
1253
 
1234
- # source://i18n//lib/i18n.rb#69
1254
+ # source://i18n//lib/i18n.rb#70
1235
1255
  def exception_handler; end
1236
1256
 
1237
- # source://i18n//lib/i18n.rb#73
1257
+ # source://i18n//lib/i18n.rb#74
1238
1258
  def exception_handler=(value); end
1239
1259
 
1240
1260
  # Returns true if a translation exists for a given key, otherwise returns false.
@@ -1242,26 +1262,51 @@ module I18n::Base
1242
1262
  # @raise [Disabled]
1243
1263
  # @return [Boolean]
1244
1264
  #
1245
- # source://i18n//lib/i18n.rb#235
1265
+ # source://i18n//lib/i18n.rb#265
1246
1266
  def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end
1247
1267
 
1268
+ # Returns an array of interpolation keys for the given translation key
1269
+ #
1270
+ # *Examples*
1271
+ #
1272
+ # Suppose we have the following:
1273
+ # I18n.t 'example.zero' == 'Zero interpolations'
1274
+ # I18n.t 'example.one' == 'One interpolation %{foo}'
1275
+ # I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}'
1276
+ # I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}']
1277
+ # I18n.t 'example.one', locale: :other == 'One interpolation %{baz}'
1278
+ #
1279
+ # Then we can expect the following results:
1280
+ # I18n.interpolation_keys('example.zero') #=> []
1281
+ # I18n.interpolation_keys('example.one') #=> ['foo']
1282
+ # I18n.interpolation_keys('example.two') #=> ['foo', 'bar']
1283
+ # I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz']
1284
+ # I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz']
1285
+ # I18n.interpolation_keys('does-not-exist') #=> []
1286
+ # I18n.interpolation_keys('example') #=> []
1287
+ #
1288
+ # @raise [I18n::ArgumentError]
1289
+ #
1290
+ # source://i18n//lib/i18n.rb#254
1291
+ def interpolation_keys(key, **options); end
1292
+
1248
1293
  # Localizes certain objects, such as dates and numbers to local formatting.
1249
1294
  #
1250
1295
  # @raise [Disabled]
1251
1296
  #
1252
- # source://i18n//lib/i18n.rb#304
1297
+ # source://i18n//lib/i18n.rb#335
1253
1298
  def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
1254
1299
 
1255
- # source://i18n//lib/i18n.rb#69
1300
+ # source://i18n//lib/i18n.rb#70
1256
1301
  def load_path; end
1257
1302
 
1258
- # source://i18n//lib/i18n.rb#73
1303
+ # source://i18n//lib/i18n.rb#74
1259
1304
  def load_path=(value); end
1260
1305
 
1261
- # source://i18n//lib/i18n.rb#69
1306
+ # source://i18n//lib/i18n.rb#70
1262
1307
  def locale; end
1263
1308
 
1264
- # source://i18n//lib/i18n.rb#73
1309
+ # source://i18n//lib/i18n.rb#74
1265
1310
  def locale=(value); end
1266
1311
 
1267
1312
  # Returns true when the passed locale, which can be either a String or a
@@ -1269,28 +1314,28 @@ module I18n::Base
1269
1314
  #
1270
1315
  # @return [Boolean]
1271
1316
  #
1272
- # source://i18n//lib/i18n.rb#344
1317
+ # source://i18n//lib/i18n.rb#375
1273
1318
  def locale_available?(locale); end
1274
1319
 
1275
1320
  # Localizes certain objects, such as dates and numbers to local formatting.
1276
1321
  #
1277
1322
  # @raise [Disabled]
1278
1323
  #
1279
- # source://i18n//lib/i18n.rb#304
1324
+ # source://i18n//lib/i18n.rb#335
1280
1325
  def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
1281
1326
 
1282
1327
  # Merges the given locale, key and scope into a single array of keys.
1283
1328
  # Splits keys that contain dots into multiple keys. Makes sure all
1284
1329
  # keys are Symbols.
1285
1330
  #
1286
- # source://i18n//lib/i18n.rb#332
1331
+ # source://i18n//lib/i18n.rb#363
1287
1332
  def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end
1288
1333
 
1289
1334
  # Tells the backend to reload translations. Used in situations like the
1290
1335
  # Rails development environment. Backends can implement whatever strategy
1291
1336
  # is useful.
1292
1337
  #
1293
- # source://i18n//lib/i18n.rb#82
1338
+ # source://i18n//lib/i18n.rb#83
1294
1339
  def reload!; end
1295
1340
 
1296
1341
  # Translates, pluralizes and interpolates a given key using a given locale,
@@ -1363,7 +1408,7 @@ module I18n::Base
1363
1408
  # or <tt>default</tt> if no translations for <tt>:foo</tt> and <tt>:bar</tt> were found.
1364
1409
  # I18n.t :foo, :default => [:bar, 'default']
1365
1410
  #
1366
- # *BULK LOOKUP*
1411
+ # <b>BULK LOOKUP</b>
1367
1412
  #
1368
1413
  # This returns an array with the translations for <tt>:foo</tt> and <tt>:bar</tt>.
1369
1414
  # I18n.t [:foo, :bar]
@@ -1382,7 +1427,7 @@ module I18n::Base
1382
1427
  # E.g. assuming the key <tt>:salutation</tt> resolves to:
1383
1428
  # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
1384
1429
  #
1385
- # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
1430
+ # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith')</tt> will result in "Mrs. Smith".
1386
1431
  #
1387
1432
  # Note that the string returned by lambda will go through string interpolation too,
1388
1433
  # so the following lambda would give the same result:
@@ -1394,7 +1439,7 @@ module I18n::Base
1394
1439
  # always return the same translations/values per unique combination of argument
1395
1440
  # values.
1396
1441
  #
1397
- # *Ruby 2.7+ keyword arguments warning*
1442
+ # <b>Ruby 2.7+ keyword arguments warning</b>
1398
1443
  #
1399
1444
  # This method uses keyword arguments.
1400
1445
  # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
@@ -1411,13 +1456,13 @@ module I18n::Base
1411
1456
  #
1412
1457
  # @raise [Disabled]
1413
1458
  #
1414
- # source://i18n//lib/i18n.rb#210
1459
+ # source://i18n//lib/i18n.rb#211
1415
1460
  def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
1416
1461
 
1417
1462
  # Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
1418
1463
  # this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
1419
1464
  #
1420
- # source://i18n//lib/i18n.rb#229
1465
+ # source://i18n//lib/i18n.rb#230
1421
1466
  def t!(key, **options); end
1422
1467
 
1423
1468
  # Translates, pluralizes and interpolates a given key using a given locale,
@@ -1490,7 +1535,7 @@ module I18n::Base
1490
1535
  # or <tt>default</tt> if no translations for <tt>:foo</tt> and <tt>:bar</tt> were found.
1491
1536
  # I18n.t :foo, :default => [:bar, 'default']
1492
1537
  #
1493
- # *BULK LOOKUP*
1538
+ # <b>BULK LOOKUP</b>
1494
1539
  #
1495
1540
  # This returns an array with the translations for <tt>:foo</tt> and <tt>:bar</tt>.
1496
1541
  # I18n.t [:foo, :bar]
@@ -1509,7 +1554,7 @@ module I18n::Base
1509
1554
  # E.g. assuming the key <tt>:salutation</tt> resolves to:
1510
1555
  # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
1511
1556
  #
1512
- # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
1557
+ # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith')</tt> will result in "Mrs. Smith".
1513
1558
  #
1514
1559
  # Note that the string returned by lambda will go through string interpolation too,
1515
1560
  # so the following lambda would give the same result:
@@ -1521,7 +1566,7 @@ module I18n::Base
1521
1566
  # always return the same translations/values per unique combination of argument
1522
1567
  # values.
1523
1568
  #
1524
- # *Ruby 2.7+ keyword arguments warning*
1569
+ # <b>Ruby 2.7+ keyword arguments warning</b>
1525
1570
  #
1526
1571
  # This method uses keyword arguments.
1527
1572
  # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
@@ -1538,13 +1583,13 @@ module I18n::Base
1538
1583
  #
1539
1584
  # @raise [Disabled]
1540
1585
  #
1541
- # source://i18n//lib/i18n.rb#210
1586
+ # source://i18n//lib/i18n.rb#211
1542
1587
  def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
1543
1588
 
1544
1589
  # Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
1545
1590
  # this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
1546
1591
  #
1547
- # source://i18n//lib/i18n.rb#229
1592
+ # source://i18n//lib/i18n.rb#230
1548
1593
  def translate!(key, **options); end
1549
1594
 
1550
1595
  # Transliterates UTF-8 characters to ASCII. By default this method will
@@ -1599,12 +1644,12 @@ module I18n::Base
1599
1644
  # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen"
1600
1645
  # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen"
1601
1646
  #
1602
- # source://i18n//lib/i18n.rb#293
1647
+ # source://i18n//lib/i18n.rb#324
1603
1648
  def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end
1604
1649
 
1605
1650
  # Executes block with given I18n.locale set.
1606
1651
  #
1607
- # source://i18n//lib/i18n.rb#315
1652
+ # source://i18n//lib/i18n.rb#346
1608
1653
  def with_locale(tmp_locale = T.unsafe(nil)); end
1609
1654
 
1610
1655
  private
@@ -1628,13 +1673,16 @@ module I18n::Base
1628
1673
  # I18n.exception_handler = I18nExceptionHandler.new # an object
1629
1674
  # I18n.exception_handler.call(exception, locale, key, options) # will be called like this
1630
1675
  #
1631
- # source://i18n//lib/i18n.rb#391
1676
+ # source://i18n//lib/i18n.rb#422
1632
1677
  def handle_exception(handling, exception, locale, key, options); end
1633
1678
 
1634
- # source://i18n//lib/i18n.rb#409
1679
+ # source://i18n//lib/i18n.rb#464
1680
+ def interpolation_keys_from_translation(translation); end
1681
+
1682
+ # source://i18n//lib/i18n.rb#440
1635
1683
  def normalize_key(key, separator); end
1636
1684
 
1637
- # source://i18n//lib/i18n.rb#361
1685
+ # source://i18n//lib/i18n.rb#392
1638
1686
  def translate_key(key, throw, raise, locale, backend, options); end
1639
1687
  end
1640
1688
 
@@ -1785,7 +1833,7 @@ class I18n::Config
1785
1833
  def missing_interpolation_argument_handler=(exception_handler); end
1786
1834
  end
1787
1835
 
1788
- # source://i18n//lib/i18n/interpolate/ruby.rb#5
1836
+ # source://i18n//lib/i18n/interpolate/ruby.rb#7
1789
1837
  I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array)
1790
1838
 
1791
1839
  # source://i18n//lib/i18n/exceptions.rb#18
@@ -1796,7 +1844,7 @@ class I18n::Disabled < ::I18n::ArgumentError
1796
1844
  def initialize(method); end
1797
1845
  end
1798
1846
 
1799
- # source://i18n//lib/i18n.rb#35
1847
+ # source://i18n//lib/i18n.rb#36
1800
1848
  I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
1801
1849
 
1802
1850
  # source://i18n//lib/i18n/exceptions.rb#6
@@ -1896,18 +1944,21 @@ end
1896
1944
  # source://i18n//lib/i18n/gettext.rb#5
1897
1945
  I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String)
1898
1946
 
1899
- # source://i18n//lib/i18n/interpolate/ruby.rb#10
1947
+ # source://i18n//lib/i18n/interpolate/ruby.rb#12
1900
1948
  I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp)
1901
1949
 
1902
- # source://i18n//lib/i18n/exceptions.rb#124
1950
+ # source://i18n//lib/i18n/interpolate/ruby.rb#15
1951
+ I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash)
1952
+
1953
+ # source://i18n//lib/i18n/exceptions.rb#134
1903
1954
  class I18n::InvalidFilenames < ::I18n::ArgumentError
1904
1955
  # @return [InvalidFilenames] a new instance of InvalidFilenames
1905
1956
  #
1906
- # source://i18n//lib/i18n/exceptions.rb#126
1957
+ # source://i18n//lib/i18n/exceptions.rb#136
1907
1958
  def initialize(file_errors); end
1908
1959
  end
1909
1960
 
1910
- # source://i18n//lib/i18n/exceptions.rb#125
1961
+ # source://i18n//lib/i18n/exceptions.rb#135
1911
1962
  I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer)
1912
1963
 
1913
1964
  # source://i18n//lib/i18n/exceptions.rb#32
@@ -1936,26 +1987,26 @@ class I18n::InvalidLocaleData < ::I18n::ArgumentError
1936
1987
  def filename; end
1937
1988
  end
1938
1989
 
1939
- # source://i18n//lib/i18n/exceptions.rb#82
1990
+ # source://i18n//lib/i18n/exceptions.rb#92
1940
1991
  class I18n::InvalidPluralizationData < ::I18n::ArgumentError
1941
1992
  # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData
1942
1993
  #
1943
- # source://i18n//lib/i18n/exceptions.rb#84
1994
+ # source://i18n//lib/i18n/exceptions.rb#94
1944
1995
  def initialize(entry, count, key); end
1945
1996
 
1946
1997
  # Returns the value of attribute count.
1947
1998
  #
1948
- # source://i18n//lib/i18n/exceptions.rb#83
1999
+ # source://i18n//lib/i18n/exceptions.rb#93
1949
2000
  def count; end
1950
2001
 
1951
2002
  # Returns the value of attribute entry.
1952
2003
  #
1953
- # source://i18n//lib/i18n/exceptions.rb#83
2004
+ # source://i18n//lib/i18n/exceptions.rb#93
1954
2005
  def entry; end
1955
2006
 
1956
2007
  # Returns the value of attribute key.
1957
2008
  #
1958
- # source://i18n//lib/i18n/exceptions.rb#83
2009
+ # source://i18n//lib/i18n/exceptions.rb#93
1959
2010
  def key; end
1960
2011
  end
1961
2012
 
@@ -1985,12 +2036,20 @@ class I18n::Locale::Fallbacks < ::Hash
1985
2036
  # source://i18n//lib/i18n/locale/fallbacks.rb#55
1986
2037
  def defaults=(defaults); end
1987
2038
 
2039
+ # @return [Boolean]
2040
+ #
2041
+ # source://i18n//lib/i18n/locale/fallbacks.rb#82
2042
+ def empty?; end
2043
+
2044
+ # source://i18n//lib/i18n/locale/fallbacks.rb#86
2045
+ def inspect; end
2046
+
1988
2047
  # source://i18n//lib/i18n/locale/fallbacks.rb#67
1989
2048
  def map(*args, &block); end
1990
2049
 
1991
2050
  protected
1992
2051
 
1993
- # source://i18n//lib/i18n/locale/fallbacks.rb#84
2052
+ # source://i18n//lib/i18n/locale/fallbacks.rb#92
1994
2053
  def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end
1995
2054
  end
1996
2055
 
@@ -2126,26 +2185,26 @@ class I18n::Middleware
2126
2185
  def call(env); end
2127
2186
  end
2128
2187
 
2129
- # source://i18n//lib/i18n/exceptions.rb#90
2188
+ # source://i18n//lib/i18n/exceptions.rb#100
2130
2189
  class I18n::MissingInterpolationArgument < ::I18n::ArgumentError
2131
2190
  # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument
2132
2191
  #
2133
- # source://i18n//lib/i18n/exceptions.rb#92
2192
+ # source://i18n//lib/i18n/exceptions.rb#102
2134
2193
  def initialize(key, values, string); end
2135
2194
 
2136
2195
  # Returns the value of attribute key.
2137
2196
  #
2138
- # source://i18n//lib/i18n/exceptions.rb#91
2197
+ # source://i18n//lib/i18n/exceptions.rb#101
2139
2198
  def key; end
2140
2199
 
2141
2200
  # Returns the value of attribute string.
2142
2201
  #
2143
- # source://i18n//lib/i18n/exceptions.rb#91
2202
+ # source://i18n//lib/i18n/exceptions.rb#101
2144
2203
  def string; end
2145
2204
 
2146
2205
  # Returns the value of attribute values.
2147
2206
  #
2148
- # source://i18n//lib/i18n/exceptions.rb#91
2207
+ # source://i18n//lib/i18n/exceptions.rb#101
2149
2208
  def values; end
2150
2209
  end
2151
2210
 
@@ -2175,12 +2234,15 @@ module I18n::MissingTranslation::Base
2175
2234
  # source://i18n//lib/i18n/exceptions.rb#65
2176
2235
  def message; end
2177
2236
 
2237
+ # source://i18n//lib/i18n/exceptions.rb#74
2238
+ def normalized_option(key); end
2239
+
2178
2240
  # Returns the value of attribute options.
2179
2241
  #
2180
2242
  # source://i18n//lib/i18n/exceptions.rb#52
2181
2243
  def options; end
2182
2244
 
2183
- # source://i18n//lib/i18n/exceptions.rb#70
2245
+ # source://i18n//lib/i18n/exceptions.rb#80
2184
2246
  def to_exception; end
2185
2247
 
2186
2248
  # source://i18n//lib/i18n/exceptions.rb#65
@@ -2190,7 +2252,7 @@ end
2190
2252
  # source://i18n//lib/i18n/exceptions.rb#50
2191
2253
  I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array)
2192
2254
 
2193
- # source://i18n//lib/i18n/exceptions.rb#78
2255
+ # source://i18n//lib/i18n/exceptions.rb#88
2194
2256
  class I18n::MissingTranslationData < ::I18n::ArgumentError
2195
2257
  include ::I18n::MissingTranslation::Base
2196
2258
  end
@@ -2198,21 +2260,21 @@ end
2198
2260
  # source://i18n//lib/i18n.rb#19
2199
2261
  I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array)
2200
2262
 
2201
- # source://i18n//lib/i18n/exceptions.rb#98
2263
+ # source://i18n//lib/i18n/exceptions.rb#108
2202
2264
  class I18n::ReservedInterpolationKey < ::I18n::ArgumentError
2203
2265
  # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey
2204
2266
  #
2205
- # source://i18n//lib/i18n/exceptions.rb#100
2267
+ # source://i18n//lib/i18n/exceptions.rb#110
2206
2268
  def initialize(key, string); end
2207
2269
 
2208
2270
  # Returns the value of attribute key.
2209
2271
  #
2210
- # source://i18n//lib/i18n/exceptions.rb#99
2272
+ # source://i18n//lib/i18n/exceptions.rb#109
2211
2273
  def key; end
2212
2274
 
2213
2275
  # Returns the value of attribute string.
2214
2276
  #
2215
- # source://i18n//lib/i18n/exceptions.rb#99
2277
+ # source://i18n//lib/i18n/exceptions.rb#109
2216
2278
  def string; end
2217
2279
  end
2218
2280
 
@@ -2229,44 +2291,44 @@ module I18n::Tests::Localization
2229
2291
  end
2230
2292
  end
2231
2293
 
2232
- # source://i18n//lib/i18n/exceptions.rb#106
2294
+ # source://i18n//lib/i18n/exceptions.rb#116
2233
2295
  class I18n::UnknownFileType < ::I18n::ArgumentError
2234
2296
  # @return [UnknownFileType] a new instance of UnknownFileType
2235
2297
  #
2236
- # source://i18n//lib/i18n/exceptions.rb#108
2298
+ # source://i18n//lib/i18n/exceptions.rb#118
2237
2299
  def initialize(type, filename); end
2238
2300
 
2239
2301
  # Returns the value of attribute filename.
2240
2302
  #
2241
- # source://i18n//lib/i18n/exceptions.rb#107
2303
+ # source://i18n//lib/i18n/exceptions.rb#117
2242
2304
  def filename; end
2243
2305
 
2244
2306
  # Returns the value of attribute type.
2245
2307
  #
2246
- # source://i18n//lib/i18n/exceptions.rb#107
2308
+ # source://i18n//lib/i18n/exceptions.rb#117
2247
2309
  def type; end
2248
2310
  end
2249
2311
 
2250
- # source://i18n//lib/i18n/exceptions.rb#114
2312
+ # source://i18n//lib/i18n/exceptions.rb#124
2251
2313
  class I18n::UnsupportedMethod < ::I18n::ArgumentError
2252
2314
  # @return [UnsupportedMethod] a new instance of UnsupportedMethod
2253
2315
  #
2254
- # source://i18n//lib/i18n/exceptions.rb#116
2316
+ # source://i18n//lib/i18n/exceptions.rb#126
2255
2317
  def initialize(method, backend_klass, msg); end
2256
2318
 
2257
2319
  # Returns the value of attribute backend_klass.
2258
2320
  #
2259
- # source://i18n//lib/i18n/exceptions.rb#115
2321
+ # source://i18n//lib/i18n/exceptions.rb#125
2260
2322
  def backend_klass; end
2261
2323
 
2262
2324
  # Returns the value of attribute method.
2263
2325
  #
2264
- # source://i18n//lib/i18n/exceptions.rb#115
2326
+ # source://i18n//lib/i18n/exceptions.rb#125
2265
2327
  def method; end
2266
2328
 
2267
2329
  # Returns the value of attribute msg.
2268
2330
  #
2269
- # source://i18n//lib/i18n/exceptions.rb#115
2331
+ # source://i18n//lib/i18n/exceptions.rb#125
2270
2332
  def msg; end
2271
2333
  end
2272
2334