m2m_keygen 0.4.7 → 0.5.0

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 (174) hide show
  1. checksums.yaml +4 -4
  2. data/.overcommit.yml +4 -7
  3. data/.rubocop.yml +19 -16
  4. data/.ruby-version +1 -1
  5. data/.streerc +1 -0
  6. data/.tool-versions +1 -0
  7. data/CHANGELOG.md +73 -1
  8. data/Gemfile +2 -2
  9. data/Gemfile.lock +138 -160
  10. data/README.md +64 -78
  11. data/docs/MIGRATING.md +69 -0
  12. data/docs/SPEC.md +245 -0
  13. data/examples/nonce_store/postgres.rb +40 -0
  14. data/examples/nonce_store/redis.rb +23 -0
  15. data/gemfiles/rack_2.gemfile +5 -0
  16. data/gemfiles/rack_3.gemfile +5 -0
  17. data/lib/m2m_keygen/canonicalizer.rb +57 -0
  18. data/lib/m2m_keygen/nonce_store/disabled.rb +19 -0
  19. data/lib/m2m_keygen/nonce_store/memory.rb +64 -0
  20. data/lib/m2m_keygen/nonce_store.rb +18 -0
  21. data/lib/m2m_keygen/rack_validator.rb +72 -19
  22. data/lib/m2m_keygen/request_signer/signed_request.rb +10 -0
  23. data/lib/m2m_keygen/request_signer.rb +118 -0
  24. data/lib/m2m_keygen/signature.rb +41 -39
  25. data/lib/m2m_keygen/types/params_type.rb +6 -16
  26. data/lib/m2m_keygen/version.rb +1 -1
  27. data/lib/m2m_keygen.rb +6 -0
  28. data/m2m_keygen.gemspec +12 -14
  29. data/sorbet/config +1 -0
  30. data/sorbet/rbi/gems/.gitattributes +1 -0
  31. data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +45 -79
  32. data/sorbet/rbi/gems/{benchmark@0.2.0.rbi → benchmark@0.5.0.rbi} +91 -58
  33. data/sorbet/rbi/gems/bundler-audit@0.9.3.rbi +397 -0
  34. data/sorbet/rbi/gems/byebug@13.0.0.rbi +3651 -0
  35. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +336 -0
  36. data/sorbet/rbi/gems/concurrent-ruby@1.3.7.rbi +384 -0
  37. data/sorbet/rbi/gems/{diff-lcs@1.5.0.rbi → diff-lcs@1.6.2.rbi} +189 -199
  38. data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +147 -147
  39. data/sorbet/rbi/gems/dotenv@3.2.0.rbi +267 -0
  40. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  41. data/sorbet/rbi/gems/{faker@2.22.0.rbi → faker@3.8.0.rbi} +8468 -3829
  42. data/sorbet/rbi/gems/{ffi@1.15.5.rbi → ffi@1.17.4.rbi} +1 -0
  43. data/sorbet/rbi/gems/{formatador@1.1.0.rbi → formatador@1.2.3.rbi} +1 -0
  44. data/sorbet/rbi/gems/{guard@2.18.0.rbi → guard@2.20.1.rbi} +1 -0
  45. data/sorbet/rbi/gems/{i18n@1.12.0.rbi → i18n@1.15.2.rbi} +687 -827
  46. data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
  47. data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.20.0.rbi} +994 -252
  48. data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
  49. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +189 -0
  50. data/sorbet/rbi/gems/listen@3.10.0.rbi +9 -0
  51. data/sorbet/rbi/gems/logger@1.7.0.rbi +896 -0
  52. data/sorbet/rbi/gems/{lumberjack@1.2.8.rbi → lumberjack@1.4.2.rbi} +1 -0
  53. data/sorbet/rbi/gems/{method_source@1.0.0.rbi → method_source@1.1.0.rbi} +111 -90
  54. data/sorbet/rbi/gems/{overcommit@0.59.1.rbi → overcommit@0.71.0.rbi} +503 -647
  55. data/sorbet/rbi/gems/parallel@2.1.0.rbi +321 -0
  56. data/sorbet/rbi/gems/parser@3.3.11.1.rbi +5229 -0
  57. data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +878 -0
  58. data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
  59. data/sorbet/rbi/gems/pry-byebug@3.12.0.rbi +481 -0
  60. data/sorbet/rbi/gems/{pry@0.14.1.rbi → pry@0.16.0.rbi} +2567 -3550
  61. data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.8.1.rbi} +54 -40
  62. data/sorbet/rbi/gems/rack@3.2.6.rbi +4653 -0
  63. data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.4.2.rbi} +963 -732
  64. data/sorbet/rbi/gems/{rb-inotify@0.10.1.rbi → rb-inotify@0.11.1.rbi} +1 -0
  65. data/sorbet/rbi/gems/rbi@0.3.14.rbi +5519 -0
  66. data/sorbet/rbi/gems/rbs@4.0.3.rbi +6908 -0
  67. data/sorbet/rbi/gems/regexp_parser@2.12.0.rbi +3398 -0
  68. data/sorbet/rbi/gems/reline@0.6.3.rbi +2446 -0
  69. data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
  70. data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.4.4.rbi} +1085 -894
  71. data/sorbet/rbi/gems/rspec-core@3.13.6.rbi +9475 -0
  72. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +6108 -0
  73. data/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi +4787 -0
  74. data/sorbet/rbi/gems/rspec-support@3.13.7.rbi +1274 -0
  75. data/sorbet/rbi/gems/rspec@3.13.2.rbi +15 -0
  76. data/sorbet/rbi/gems/rspec_in_context@1.2.2.rbi +294 -0
  77. data/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi +7140 -0
  78. data/sorbet/rbi/gems/rubocop-faker@1.3.0.rbi +88 -0
  79. data/sorbet/rbi/gems/rubocop-performance@1.26.1.rbi +3403 -0
  80. data/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi +2448 -0
  81. data/sorbet/rbi/gems/rubocop@1.88.1.rbi +63103 -0
  82. data/sorbet/rbi/gems/ruby-lsp@0.26.9.rbi +28 -0
  83. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
  84. data/sorbet/rbi/gems/rubydex@0.2.7.rbi +836 -0
  85. data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +90 -0
  86. data/sorbet/rbi/gems/{simplecov@0.21.2.rbi → simplecov@0.22.0.rbi} +438 -578
  87. data/sorbet/rbi/gems/spoom@1.8.2.rbi +6691 -0
  88. data/sorbet/rbi/gems/syntax_tree@6.3.0.rbi +22090 -0
  89. data/sorbet/rbi/gems/tapioca@0.19.2.rbi +3597 -0
  90. data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.5.0.rbi} +1085 -1171
  91. data/sorbet/rbi/gems/tsort@0.2.0.rbi +389 -0
  92. data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +130 -0
  93. data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +332 -0
  94. data/sorbet/rbi/gems/{yard-sorbet@0.7.0.rbi → yard-sorbet@0.9.0.rbi} +142 -99
  95. data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.44.rbi} +5350 -6316
  96. data/sorbet/rbi/gems/zeitwerk@2.8.2.rbi +1178 -0
  97. metadata +106 -111
  98. data/.prettierrc.js +0 -4
  99. data/docs/M2mKeygen/Error.html +0 -135
  100. data/docs/M2mKeygen/ParamsEncoder.html +0 -321
  101. data/docs/M2mKeygen/RackValidator.html +0 -533
  102. data/docs/M2mKeygen/Signature.html +0 -680
  103. data/docs/M2mKeygen/Types.html +0 -147
  104. data/docs/M2mKeygen.html +0 -157
  105. data/docs/_index.html +0 -182
  106. data/docs/class_list.html +0 -51
  107. data/docs/css/common.css +0 -1
  108. data/docs/css/full_list.css +0 -58
  109. data/docs/css/style.css +0 -497
  110. data/docs/file.README.html +0 -230
  111. data/docs/file_list.html +0 -56
  112. data/docs/frames.html +0 -17
  113. data/docs/index.html +0 -230
  114. data/docs/js/app.js +0 -314
  115. data/docs/js/full_list.js +0 -216
  116. data/docs/js/jquery.js +0 -4
  117. data/docs/method_list.html +0 -139
  118. data/docs/top-level-namespace.html +0 -110
  119. data/lib/m2m_keygen/params_encoder.rb +0 -56
  120. data/package.json +0 -12
  121. data/sig/m2m_keygen.rbs +0 -4
  122. data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +0 -18608
  123. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -522
  124. data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +0 -308
  125. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3603
  126. data/sorbet/rbi/gems/childprocess@4.1.0.rbi +0 -401
  127. data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +0 -11581
  128. data/sorbet/rbi/gems/dotenv@2.8.1.rbi +0 -234
  129. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -8
  130. data/sorbet/rbi/gems/haml@5.2.2.rbi +0 -3190
  131. data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -19
  132. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -133
  133. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3261
  134. data/sorbet/rbi/gems/listen@3.7.1.rbi +0 -1181
  135. data/sorbet/rbi/gems/minitest@5.16.3.rbi +0 -1459
  136. data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +0 -6514
  137. data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
  138. data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -6826
  139. data/sorbet/rbi/gems/prettier@3.2.0.rbi +0 -22
  140. data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -8
  141. data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1222
  142. data/sorbet/rbi/gems/rack@2.2.4.rbi +0 -5630
  143. data/sorbet/rbi/gems/rbi@0.0.15.rbi +0 -3007
  144. data/sorbet/rbi/gems/rbs@2.6.0.rbi +0 -8
  145. data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -3366
  146. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -389
  147. data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +0 -10786
  148. data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +0 -8170
  149. data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -5385
  150. data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -1746
  151. data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -187
  152. data/sorbet/rbi/gems/rspec_in_context@1.1.0.3.rbi +0 -1113
  153. data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -7044
  154. data/sorbet/rbi/gems/rubocop-faker@1.1.0.rbi +0 -106
  155. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +0 -2982
  156. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +0 -990
  157. data/sorbet/rbi/gems/rubocop@1.35.1.rbi +0 -52002
  158. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1239
  159. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -219
  160. data/sorbet/rbi/gems/solargraph@0.46.0.rbi +0 -9075
  161. data/sorbet/rbi/gems/spoom@1.1.12.rbi +0 -2369
  162. data/sorbet/rbi/gems/syntax_tree-haml@1.3.1.rbi +0 -8
  163. data/sorbet/rbi/gems/syntax_tree-rbs@0.5.0.rbi +0 -8
  164. data/sorbet/rbi/gems/syntax_tree@3.5.0.rbi +0 -8
  165. data/sorbet/rbi/gems/tapioca@0.9.4.rbi +0 -2946
  166. data/sorbet/rbi/gems/temple@0.8.2.rbi +0 -1712
  167. data/sorbet/rbi/gems/tilt@2.0.11.rbi +0 -742
  168. data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
  169. data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +0 -48
  170. data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
  171. data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2553
  172. data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +0 -867
  173. data/sorbet/rbi/manual.rbi +0 -7
  174. data/yarn.lock +0 -20
@@ -4,95 +4,296 @@
4
4
  # This is an autogenerated file for types exported from the `i18n` gem.
5
5
  # Please instead update this file by running `bin/tapioca gem i18n`.
6
6
 
7
- # source://i18n-1.12.0/lib/i18n/gettext/po_parser.rb:15
7
+
8
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:15
8
9
  module GetText; end
9
10
 
10
- # source://i18n-1.12.0/lib/i18n/gettext/po_parser.rb:17
11
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:17
11
12
  class GetText::PoParser < ::Racc::Parser
12
- # source://i18n-1.12.0/lib/i18n/gettext/po_parser.rb:19
13
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:19
13
14
  def _(x); end
14
15
 
16
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:282
15
17
  def _reduce_10(val, _values, result); end
18
+
19
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:295
16
20
  def _reduce_12(val, _values, result); end
21
+
22
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:302
17
23
  def _reduce_13(val, _values, result); end
24
+
25
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:309
18
26
  def _reduce_14(val, _values, result); end
27
+
28
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:316
19
29
  def _reduce_15(val, _values, result); end
30
+
31
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:235
20
32
  def _reduce_5(val, _values, result); end
33
+
34
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:246
21
35
  def _reduce_8(val, _values, result); end
36
+
37
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:264
22
38
  def _reduce_9(val, _values, result); end
23
39
 
24
- # source://i18n-1.12.0/lib/i18n/gettext/po_parser.rb:323
40
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:323
25
41
  def _reduce_none(val, _values, result); end
26
42
 
43
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
27
44
  def next_token; end
45
+
46
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
28
47
  def on_comment(comment); end
48
+
49
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
29
50
  def on_message(msgid, msgstr); end
51
+
52
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
30
53
  def parse(str, data, ignore_fuzzy = T.unsafe(nil)); end
54
+
55
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
31
56
  def unescape(orig); end
32
57
  end
33
58
 
34
- # source://i18n-1.12.0/lib/i18n/gettext/po_parser.rb:184
59
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:184
35
60
  GetText::PoParser::Racc_arg = T.let(T.unsafe(nil), Array)
36
61
 
37
- # source://i18n-1.12.0/lib/i18n/gettext/po_parser.rb:221
62
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:221
38
63
  GetText::PoParser::Racc_debug_parser = T.let(T.unsafe(nil), TrueClass)
39
64
 
40
- # source://i18n-1.12.0/lib/i18n/gettext/po_parser.rb:200
65
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:200
41
66
  GetText::PoParser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
42
67
 
68
+ # This module allows you to easily cache all responses from the backend - thus
69
+ # speeding up the I18n aspects of your application quite a bit.
70
+ #
71
+ # To enable caching you can simply include the Cache module to the Simple
72
+ # backend - or whatever other backend you are using:
73
+ #
74
+ # I18n::Backend::Simple.send(:include, I18n::Backend::Cache)
75
+ #
76
+ # You will also need to set a cache store implementation that you want to use:
77
+ #
78
+ # I18n.cache_store = ActiveSupport::Cache.lookup_store(:memory_store)
79
+ #
80
+ # You can use any cache implementation you want that provides the same API as
81
+ # ActiveSupport::Cache (only the methods #fetch and #write are being used).
82
+ #
83
+ # The cache_key implementation by default assumes you pass values that return
84
+ # a valid key from #hash (see
85
+ # https://www.ruby-doc.org/core/classes/Object.html#M000337). However, you can
86
+ # configure your own digest method via which responds to #hexdigest (see
87
+ # https://ruby-doc.org/stdlib/libdoc/openssl/rdoc/OpenSSL/Digest.html):
88
+ #
89
+ # I18n.cache_key_digest = OpenSSL::Digest::SHA256.new
90
+ #
91
+ # If you use a lambda as a default value in your translation like this:
92
+ #
93
+ # I18n.t(:"date.order", :default => lambda {[:month, :day, :year]})
94
+ #
95
+ # Then you will always have a cache miss, because each time this method
96
+ # is called the lambda will have a different hash value. If you know
97
+ # the result of the lambda is a constant as in the example above, then
98
+ # to cache this you can make the lambda a constant, like this:
99
+ #
100
+ # DEFAULT_DATE_ORDER = lambda {[:month, :day, :year]}
101
+ # ...
102
+ # I18n.t(:"date.order", :default => DEFAULT_DATE_ORDER)
103
+ #
104
+ # If the lambda may result in different values for each call then consider
105
+ # also using the Memoize backend.
106
+ #
107
+ # The Cascade module adds the ability to do cascading lookups to backends that
108
+ # are compatible to the Simple backend.
109
+ #
110
+ # By cascading lookups we mean that for any key that can not be found the
111
+ # Cascade module strips one segment off the scope part of the key and then
112
+ # tries to look up the key in that scope.
113
+ #
114
+ # E.g. when a lookup for the key :"foo.bar.baz" does not yield a result then
115
+ # the segment :bar will be stripped off the scope part :"foo.bar" and the new
116
+ # scope :foo will be used to look up the key :baz. If that does not succeed
117
+ # then the remaining scope segment :foo will be omitted, too, and again the
118
+ # key :baz will be looked up (now with no scope).
119
+ #
120
+ # To enable a cascading lookup one passes the :cascade option:
121
+ #
122
+ # I18n.t(:'foo.bar.baz', :cascade => true)
123
+ #
124
+ # This will return the first translation found for :"foo.bar.baz", :"foo.baz"
125
+ # or :baz in this order.
126
+ #
127
+ # The cascading lookup takes precedence over resolving any given defaults.
128
+ # I.e. defaults will kick in after the cascading lookups haven't succeeded.
129
+ #
130
+ # This behavior is useful for libraries like ActiveRecord validations where
131
+ # the library wants to give users a bunch of more or less fine-grained options
132
+ # of scopes for a particular key.
133
+ #
134
+ # Thanks to Clemens Kofler for the initial idea and implementation! See
135
+ # http://github.com/clemens/i18n-cascading-backend
136
+ # I18n locale fallbacks are useful when you want your application to use
137
+ # translations from other locales when translations for the current locale are
138
+ # missing. E.g. you might want to use :en translations when translations in
139
+ # your applications main locale :de are missing.
140
+ #
141
+ # To enable locale fallbacks you can simply include the Fallbacks module to
142
+ # the Simple backend - or whatever other backend you are using:
143
+ #
144
+ # I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
145
+ # The InterpolationCompiler module contains optimizations that can tremendously
146
+ # speed up the interpolation process on the Simple backend.
147
+ #
148
+ # It works by defining a pre-compiled method on stored translation Strings that
149
+ # already bring all the knowledge about contained interpolation variables etc.
150
+ # so that the actual recurring interpolation will be very fast.
151
+ #
152
+ # To enable pre-compiled interpolations you can simply include the
153
+ # InterpolationCompiler module to the Simple backend:
154
+ #
155
+ # I18n::Backend::Simple.include(I18n::Backend::InterpolationCompiler)
156
+ #
157
+ # Note that InterpolationCompiler does not yield meaningful results and consequently
158
+ # should not be used with Ruby 1.9 (YARV) but improves performance everywhere else
159
+ # (jRuby, Rubinius).
160
+ # Memoize module simply memoizes the values returned by lookup using
161
+ # a flat hash and can tremendously speed up the lookup process in a backend.
162
+ #
163
+ # To enable it you can simply include the Memoize module to your backend:
164
+ #
165
+ # I18n::Backend::Simple.include(I18n::Backend::Memoize)
166
+ #
167
+ # Notice that it's the responsibility of the backend to define whenever the
168
+ # cache should be cleaned.
169
+ # I18n translation metadata is useful when you want to access information
170
+ # about how a translation was looked up, pluralized or interpolated in
171
+ # your application.
172
+ #
173
+ # msg = I18n.t(:message, :default => 'Hi!', :scope => :foo)
174
+ # msg.translation_metadata
175
+ # # => { :key => :message, :scope => :foo, :default => 'Hi!' }
176
+ #
177
+ # If a :count option was passed to #translate it will be set to the metadata.
178
+ # Likewise, if any interpolation variables were passed they will also be set.
179
+ #
180
+ # To enable translation metadata you can simply include the Metadata module
181
+ # into the Simple backend class - or whatever other backend you are using:
182
+ #
183
+ # I18n::Backend::Simple.include(I18n::Backend::Metadata)
184
+ #
185
+ # I18n Pluralization are useful when you want your application to
186
+ # customize pluralization rules.
187
+ #
188
+ # To enable locale specific pluralizations you can simply include the
189
+ # Pluralization module to the Simple backend - or whatever other backend you
190
+ # are using.
191
+ #
192
+ # I18n::Backend::Simple.include(I18n::Backend::Pluralization)
193
+ #
194
+ # You also need to make sure to provide pluralization algorithms to the
195
+ # backend, i.e. include them to your I18n.load_path accordingly.
196
+ # heavily based on Masao Mutoh's gettext String interpolation extension
197
+ # http://github.com/mutoh/gettext/blob/f6566738b981fe0952548c421042ad1e0cdfb31e/lib/gettext/core_ext/string.rb
198
+ # Locale Fallbacks
199
+ #
200
+ # Extends the I18n module to hold a fallbacks instance which is set to an
201
+ # instance of I18n::Locale::Fallbacks by default but can be swapped with a
202
+ # different implementation.
203
+ #
204
+ # Locale fallbacks will compute a number of fallback locales for a given locale.
205
+ # For example:
206
+ #
207
+ # <pre><code>
208
+ # I18n.fallbacks[:"es-MX"] # => [:"es-MX", :es, :en] </code></pre>
209
+ #
210
+ # Locale fallbacks always fall back to
211
+ #
212
+ # * all parent locales of a given locale (e.g. :es for :"es-MX") first,
213
+ # * the current default locales and all of their parents second
214
+ #
215
+ # The default locales are set to [] by default but can be set to something else.
216
+ #
217
+ # One can additionally add any number of additional fallback locales manually.
218
+ # These will be added before the default locales to the fallback chain. For
219
+ # example:
220
+ #
221
+ # # using a custom locale as default fallback locale
222
+ #
223
+ # I18n.fallbacks = I18n::Locale::Fallbacks.new(:"en-GB", :"de-AT" => :de, :"de-CH" => :de)
224
+ # I18n.fallbacks[:"de-AT"] # => [:"de-AT", :de, :"en-GB", :en]
225
+ # I18n.fallbacks[:"de-CH"] # => [:"de-CH", :de, :"en-GB", :en]
226
+ #
227
+ # # mapping fallbacks to an existing instance
228
+ #
229
+ # # people speaking Catalan also speak Spanish as spoken in Spain
230
+ # fallbacks = I18n.fallbacks
231
+ # fallbacks.map(:ca => :"es-ES")
232
+ # fallbacks[:ca] # => [:ca, :"es-ES", :es, :"en-US", :en]
233
+ #
234
+ # # people speaking Arabian as spoken in Palestine also speak Hebrew as spoken in Israel
235
+ # fallbacks.map(:"ar-PS" => :"he-IL")
236
+ # fallbacks[:"ar-PS"] # => [:"ar-PS", :ar, :"he-IL", :he, :"en-US", :en]
237
+ # fallbacks[:"ar-EG"] # => [:"ar-EG", :ar, :"en-US", :en]
238
+ #
239
+ # # people speaking Sami as spoken in Finland also speak Swedish and Finnish as spoken in Finland
240
+ # fallbacks.map(:sms => [:"se-FI", :"fi-FI"])
241
+ # fallbacks[:sms] # => [:sms, :"se-FI", :se, :"fi-FI", :fi, :"en-US", :en]
242
+ # RFC 4646/47 compliant Locale tag implementation that parses locale tags to
243
+ # subtags such as language, script, region, variant etc.
244
+ #
245
+ # For more information see by http://en.wikipedia.org/wiki/IETF_language_tag
246
+ #
247
+ # Rfc4646::Parser does not implement grandfathered tags.
43
248
  # Simple Locale tag implementation that computes subtags by simply splitting
44
249
  # the locale tag at '-' occurrences.
45
250
  #
46
- # source://i18n-1.12.0/lib/i18n/version.rb:3
251
+ # pkg:gem/i18n#lib/i18n/version.rb:3
47
252
  module I18n
48
253
  extend ::I18n::Base
49
254
 
50
255
  class << self
51
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:64
256
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:64
52
257
  def cache_key_digest; end
53
258
 
54
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:68
259
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:68
55
260
  def cache_key_digest=(key_digest); end
56
261
 
57
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:56
262
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:56
58
263
  def cache_namespace; end
59
264
 
60
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:60
265
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:60
61
266
  def cache_namespace=(namespace); end
62
267
 
63
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:48
268
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:48
64
269
  def cache_store; end
65
270
 
66
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:52
271
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:52
67
272
  def cache_store=(store); end
68
273
 
69
274
  # Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+.
70
275
  #
71
- # source://i18n-1.12.0/lib/i18n/backend/fallbacks.rb:17
276
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:17
72
277
  def fallbacks; end
73
278
 
74
279
  # Sets the current fallbacks implementation. Use this to set a different fallbacks implementation.
75
280
  #
76
- # source://i18n-1.12.0/lib/i18n/backend/fallbacks.rb:23
281
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:27
77
282
  def fallbacks=(fallbacks); end
78
283
 
79
284
  # Return String or raises MissingInterpolationArgument exception.
80
285
  # Missing argument's logic is handled by I18n.config.missing_interpolation_argument_handler.
81
286
  #
82
- # @raise [ReservedInterpolationKey]
83
- #
84
- # source://i18n-1.12.0/lib/i18n/interpolate/ruby.rb:16
287
+ # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:23
85
288
  def interpolate(string, values); end
86
289
 
87
- # source://i18n-1.12.0/lib/i18n/interpolate/ruby.rb:22
290
+ # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:29
88
291
  def interpolate_hash(string, values); end
89
292
 
90
- # source://i18n-1.12.0/lib/i18n.rb:37
293
+ # pkg:gem/i18n#lib/i18n.rb:38
91
294
  def new_double_nested_cache; end
92
295
 
93
- # @return [Boolean]
94
- #
95
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:72
296
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:72
96
297
  def perform_caching?; end
97
298
 
98
299
  # Marks a key as reserved. Reserved keys are used internally,
@@ -100,70 +301,60 @@ module I18n
100
301
  # extra keys as I18n options, you should call I18n.reserve_key
101
302
  # before any I18n.translate (etc) calls are made.
102
303
  #
103
- # source://i18n-1.12.0/lib/i18n.rb:45
304
+ # pkg:gem/i18n#lib/i18n.rb:46
104
305
  def reserve_key(key); end
105
306
 
106
- # source://i18n-1.12.0/lib/i18n.rb:50
307
+ # pkg:gem/i18n#lib/i18n.rb:51
107
308
  def reserved_keys_pattern; end
108
309
  end
109
310
  end
110
311
 
111
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:16
312
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:14
112
313
  class I18n::ArgumentError < ::ArgumentError; end
113
314
 
114
- # source://i18n-1.12.0/lib/i18n/backend.rb:4
315
+ # pkg:gem/i18n#lib/i18n/backend.rb:4
115
316
  module I18n::Backend; end
116
317
 
117
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:8
318
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:8
118
319
  module I18n::Backend::Base
119
320
  include ::I18n::Backend::Transliterator
120
321
 
121
322
  # Returns an array of locales for which translations are available
122
323
  # ignoring the reserved translation meta data key :i18n.
123
324
  #
124
- # @raise [NotImplementedError]
125
- #
126
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:94
325
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:97
127
326
  def available_locales; end
128
327
 
129
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:102
328
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:105
130
329
  def eager_load!; end
131
330
 
132
- # @return [Boolean]
133
- #
134
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:68
331
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:71
135
332
  def exists?(locale, key, options = T.unsafe(nil)); end
136
333
 
137
334
  # Accepts a list of paths to translation files. Loads translations from
138
335
  # plain Ruby (*.rb), YAML files (*.yml), or JSON files (*.json). See #load_rb, #load_yml, and #load_json
139
336
  # for details.
140
337
  #
141
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:14
338
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:14
142
339
  def load_translations(*filenames); end
143
340
 
144
341
  # Acts the same as +strftime+, but uses a localized version of the
145
342
  # format string. Takes a key from the date/time formats translations as
146
343
  # a format argument (<em>e.g.</em>, <tt>:short</tt> in <tt>:'date.formats'</tt>).
147
344
  #
148
- # @raise [ArgumentError]
149
- #
150
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:75
345
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:78
151
346
  def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
152
347
 
153
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:98
348
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:101
154
349
  def reload!; end
155
350
 
156
351
  # This method receives a locale, a data hash and options for storing translations.
157
352
  # Should be implemented
158
353
  #
159
- # @raise [NotImplementedError]
160
- #
161
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:24
354
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:24
162
355
  def store_translations(locale, data, options = T.unsafe(nil)); end
163
356
 
164
- # @raise [I18n::ArgumentError]
165
- #
166
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:28
357
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:28
167
358
  def translate(locale, key, options = T.unsafe(nil)); end
168
359
 
169
360
  protected
@@ -174,7 +365,7 @@ module I18n::Backend::Base
174
365
  # ann: 'good', john: 'big'
175
366
  # #=> { people: { ann: "Ann is good", john: "John is big" } }
176
367
  #
177
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:202
368
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:217
178
369
  def deep_interpolate(locale, data, values = T.unsafe(nil)); end
179
370
 
180
371
  # Evaluates defaults.
@@ -182,12 +373,10 @@ module I18n::Backend::Base
182
373
  # first translation that can be resolved. Otherwise it tries to resolve
183
374
  # the translation directly.
184
375
  #
185
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:125
376
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:128
186
377
  def default(locale, object, subject, options = T.unsafe(nil)); end
187
378
 
188
- # @return [Boolean]
189
- #
190
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:108
379
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:111
191
380
  def eager_loaded?; end
192
381
 
193
382
  # Interpolates values into a given subject.
@@ -198,10 +387,10 @@ module I18n::Backend::Base
198
387
  #
199
388
  # if the given subject is an array then:
200
389
  # 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"]]"
390
+ # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz"
391
+ # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]]
203
392
  #
204
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:186
393
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:201
205
394
  def interpolate(locale, subject, values = T.unsafe(nil)); end
206
395
 
207
396
  # Loads a single translations file by delegating to #load_rb or
@@ -209,43 +398,36 @@ module I18n::Backend::Base
209
398
  # data to the existing translations. Raises I18n::UnknownFileType
210
399
  # for all other file extensions.
211
400
  #
212
- # @raise [UnknownFileType]
213
- #
214
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:225
401
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:240
215
402
  def load_file(filename); end
216
403
 
217
404
  # Loads a JSON translations file. The data must have locales as
218
405
  # toplevel keys.
219
406
  #
220
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:261
407
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:276
221
408
  def load_json(filename); end
222
409
 
223
410
  # Loads a plain Ruby translations file. eval'ing the file must yield
224
411
  # a Hash containing translation data with locales as toplevel keys.
225
412
  #
226
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:239
413
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:254
227
414
  def load_rb(filename); end
228
415
 
229
- # Loads a YAML translations file. The data must have locales as
230
- # toplevel keys.
231
- #
232
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:246
416
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:272
233
417
  def load_yaml(filename); end
234
418
 
235
419
  # Loads a YAML translations file. The data must have locales as
236
420
  # toplevel keys.
237
421
  #
238
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:246
422
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:261
239
423
  def load_yml(filename); end
240
424
 
241
425
  # The method which actually looks up for the translation in the store.
242
426
  #
243
- # @raise [NotImplementedError]
244
- #
245
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:113
427
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:116
246
428
  def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
247
429
 
248
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:293
430
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:308
249
431
  def pluralization_key(entry, count); end
250
432
 
251
433
  # Picks a translation from a pluralized mnemonic subkey according to English
@@ -257,9 +439,7 @@ module I18n::Backend::Base
257
439
  # not standard with regards to the CLDR pluralization rules.
258
440
  # Other backends can implement more flexible or complex pluralization rules.
259
441
  #
260
- # @raise [InvalidPluralizationData]
261
- #
262
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:167
442
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:182
263
443
  def pluralize(locale, entry, count); end
264
444
 
265
445
  # Resolves a translation.
@@ -267,64 +447,57 @@ module I18n::Backend::Base
267
447
  # given options. If it is a Proc then it will be evaluated. All other
268
448
  # subjects will be returned directly.
269
449
  #
270
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:142
450
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:150
271
451
  def resolve(locale, object, subject, options = T.unsafe(nil)); end
272
452
 
273
- # Resolves a translation.
274
- # If the given subject is a Symbol, it will be translated with the
275
- # given options. If it is a Proc then it will be evaluated. All other
276
- # subjects will be returned directly.
277
- #
278
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:142
453
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:172
279
454
  def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end
280
455
 
281
- # @return [Boolean]
282
- #
283
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:117
456
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:120
284
457
  def subtrees?; end
285
458
 
286
- # source://i18n-1.12.0/lib/i18n/backend/base.rb:274
459
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:289
287
460
  def translate_localization_format(locale, object, format, options); end
288
461
  end
289
462
 
290
463
  # TODO Should the cache be cleared if new translations are stored?
291
464
  #
292
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:79
465
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:79
293
466
  module I18n::Backend::Cache
294
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:80
467
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:80
295
468
  def translate(locale, key, options = T.unsafe(nil)); end
296
469
 
297
470
  protected
298
471
 
299
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:93
472
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:93
300
473
  def _fetch(cache_key, &block); end
301
474
 
302
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:101
475
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:101
303
476
  def cache_key(locale, key, options); end
304
477
 
305
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:86
478
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:86
306
479
  def fetch(cache_key, &block); end
307
480
 
308
481
  private
309
482
 
310
- # source://i18n-1.12.0/lib/i18n/backend/cache.rb:108
483
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:108
311
484
  def digest_item(key); end
312
485
  end
313
486
 
314
487
  # Overwrites the Base load_file method to cache loaded file contents.
315
488
  #
316
- # source://i18n-1.12.0/lib/i18n/backend/cache_file.rb:8
489
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:8
317
490
  module I18n::Backend::CacheFile
318
491
  # Optionally provide path_roots array to normalize filename paths,
319
492
  # to make the cached i18n data portable across environments.
320
493
  #
321
- # source://i18n-1.12.0/lib/i18n/backend/cache_file.rb:11
494
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:11
322
495
  def path_roots; end
323
496
 
324
497
  # Optionally provide path_roots array to normalize filename paths,
325
498
  # to make the cached i18n data portable across environments.
326
499
  #
327
- # source://i18n-1.12.0/lib/i18n/backend/cache_file.rb:11
500
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:11
328
501
  def path_roots=(_arg0); end
329
502
 
330
503
  protected
@@ -332,18 +505,18 @@ module I18n::Backend::CacheFile
332
505
  # Track loaded translation files in the `i18n.load_file` scope,
333
506
  # and skip loading the file if its contents are still up-to-date.
334
507
  #
335
- # source://i18n-1.12.0/lib/i18n/backend/cache_file.rb:17
508
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:17
336
509
  def load_file(filename); end
337
510
 
338
511
  # Translate absolute filename to relative path for i18n key.
339
512
  #
340
- # source://i18n-1.12.0/lib/i18n/backend/cache_file.rb:28
513
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:28
341
514
  def normalized_path(file); end
342
515
  end
343
516
 
344
- # source://i18n-1.12.0/lib/i18n/backend/cascade.rb:35
517
+ # pkg:gem/i18n#lib/i18n/backend/cascade.rb:35
345
518
  module I18n::Backend::Cascade
346
- # source://i18n-1.12.0/lib/i18n/backend/cascade.rb:36
519
+ # pkg:gem/i18n#lib/i18n/backend/cascade.rb:36
347
520
  def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
348
521
  end
349
522
 
@@ -362,72 +535,62 @@ end
362
535
  # The implementation assumes that all backends added to the Chain implement
363
536
  # a lookup method with the same API as Simple backend does.
364
537
  #
365
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:19
538
+ # Fallback translations using the :default option are only used by the last backend of a chain.
539
+ #
540
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:21
366
541
  class I18n::Backend::Chain
367
542
  include ::I18n::Backend::Transliterator
368
543
  include ::I18n::Backend::Base
369
544
  include ::I18n::Backend::Chain::Implementation
370
545
  end
371
546
 
372
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:20
547
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:22
373
548
  module I18n::Backend::Chain::Implementation
374
549
  include ::I18n::Backend::Transliterator
375
550
  include ::I18n::Backend::Base
376
551
 
377
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:25
552
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:27
378
553
  def initialize(*backends); end
379
554
 
380
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:50
555
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:52
381
556
  def available_locales; end
382
557
 
383
- # Returns the value of attribute backends.
384
- #
385
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:23
558
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:25
386
559
  def backends; end
387
560
 
388
- # Sets the attribute backends
389
- #
390
- # @param value the value to set the attribute backends to.
391
- #
392
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:23
561
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:25
393
562
  def backends=(_arg0); end
394
563
 
395
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:42
564
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:44
396
565
  def eager_load!; end
397
566
 
398
- # @return [Boolean]
399
- #
400
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:74
567
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:76
401
568
  def exists?(locale, key, options = T.unsafe(nil)); end
402
569
 
403
- # @return [Boolean]
404
- #
405
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:29
570
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:31
406
571
  def initialized?; end
407
572
 
408
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:80
573
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:82
409
574
  def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
410
575
 
411
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:38
576
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:40
412
577
  def reload!; end
413
578
 
414
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:46
579
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:48
415
580
  def store_translations(locale, data, options = T.unsafe(nil)); end
416
581
 
417
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:54
582
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:56
418
583
  def translate(locale, key, default_options = T.unsafe(nil)); end
419
584
 
420
585
  protected
421
586
 
422
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:90
587
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:92
423
588
  def init_translations; end
424
589
 
425
- # @return [Boolean]
426
- #
427
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:106
590
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:108
428
591
  def namespace_lookup?(result, options); end
429
592
 
430
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:96
593
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:98
431
594
  def translations; end
432
595
 
433
596
  private
@@ -437,21 +600,19 @@ module I18n::Backend::Chain::Implementation
437
600
  # it is wise to have our own copy. We underscore it
438
601
  # to not pollute the namespace of the including class.
439
602
  #
440
- # source://i18n-1.12.0/lib/i18n/backend/chain.rb:115
603
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:117
441
604
  def _deep_merge(hash, other_hash); end
442
605
  end
443
606
 
444
- # source://i18n-1.12.0/lib/i18n/backend/fallbacks.rb:30
607
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:38
445
608
  module I18n::Backend::Fallbacks
446
- # @return [Boolean]
447
- #
448
- # source://i18n-1.12.0/lib/i18n/backend/fallbacks.rb:94
609
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:106
449
610
  def exists?(locale, key, options = T.unsafe(nil)); end
450
611
 
451
- # source://i18n-1.12.0/lib/i18n/backend/fallbacks.rb:85
612
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:97
452
613
  def extract_non_symbol_default!(options); end
453
614
 
454
- # source://i18n-1.12.0/lib/i18n/backend/fallbacks.rb:67
615
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:75
455
616
  def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end
456
617
 
457
618
  # Overwrites the Base backend translate method so that it will try each
@@ -465,14 +626,14 @@ module I18n::Backend::Fallbacks
465
626
  # it's a Symbol. When the default contains a String, Proc or Hash
466
627
  # it is evaluated last after all the fallback locales have been tried.
467
628
  #
468
- # source://i18n-1.12.0/lib/i18n/backend/fallbacks.rb:41
629
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:49
469
630
  def translate(locale, key, options = T.unsafe(nil)); end
470
631
 
471
632
  private
472
633
 
473
634
  # Overwrite on_fallback to add specified logic when the fallback succeeds.
474
635
  #
475
- # source://i18n-1.12.0/lib/i18n/backend/fallbacks.rb:110
636
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:122
476
637
  def on_fallback(_original_locale, _fallback_locale, _key, _options); end
477
638
  end
478
639
 
@@ -485,14 +646,14 @@ end
485
646
  # You can check both backends above for some examples.
486
647
  # This module also keeps all links in a hash so they can be properly resolved when flattened.
487
648
  #
488
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:13
649
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:13
489
650
  module I18n::Backend::Flatten
490
651
  # Flatten keys for nested Hashes by chaining up keys:
491
652
  #
492
653
  # >> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind
493
654
  # => { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" }
494
655
  #
495
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:59
656
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:59
496
657
  def flatten_keys(hash, escape, prev_key = T.unsafe(nil), &block); end
497
658
 
498
659
  # Receives a hash of translations (where the key is a locale and
@@ -502,53 +663,53 @@ module I18n::Backend::Flatten
502
663
  # Nested hashes are included in the flattened hash just if subtree
503
664
  # is true and Symbols are automatically stored as links.
504
665
  #
505
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:74
666
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:74
506
667
  def flatten_translations(locale, data, escape, subtree); end
507
668
 
508
669
  # Store flattened links.
509
670
  #
510
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:50
671
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:50
511
672
  def links; end
512
673
 
513
674
  # Shortcut to I18n::Backend::Flatten.normalize_flat_keys
514
675
  # and then resolve_links.
515
676
  #
516
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:44
677
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:44
517
678
  def normalize_flat_keys(locale, key, scope, separator); end
518
679
 
519
680
  protected
520
681
 
521
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:112
682
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:112
522
683
  def escape_default_separator(key); end
523
684
 
524
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:106
685
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:106
525
686
  def find_link(locale, key); end
526
687
 
527
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:93
688
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:93
528
689
  def resolve_link(locale, key); end
529
690
 
530
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:89
691
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:89
531
692
  def store_link(locale, key, link); end
532
693
 
533
694
  class << self
534
695
  # Receives a string and escape the default separator.
535
696
  #
536
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:38
697
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:38
537
698
  def escape_default_separator(key); end
538
699
 
539
700
  # normalize_keys the flatten way. This method is significantly faster
540
701
  # and creates way less objects than the one at I18n.normalize_keys.
541
702
  # It also handles escaping the translation keys.
542
703
  #
543
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:20
704
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:20
544
705
  def normalize_flat_keys(locale, key, scope, separator); end
545
706
  end
546
707
  end
547
708
 
548
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:15
709
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:15
549
710
  I18n::Backend::Flatten::FLATTEN_SEPARATOR = T.let(T.unsafe(nil), String)
550
711
 
551
- # source://i18n-1.12.0/lib/i18n/backend/flatten.rb:14
712
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:14
552
713
  I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String)
553
714
 
554
715
  # Experimental support for using Gettext po files to store translations.
@@ -576,292 +737,133 @@ I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String)
576
737
  #
577
738
  # Without it strings containing periods (".") will not be translated.
578
739
  #
579
- # source://i18n-1.12.0/lib/i18n/backend/gettext.rb:33
740
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:33
580
741
  module I18n::Backend::Gettext
581
742
  protected
582
743
 
583
- # source://i18n-1.12.0/lib/i18n/backend/gettext.rb:41
744
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:41
584
745
  def load_po(filename); end
585
746
 
586
- # source://i18n-1.12.0/lib/i18n/backend/gettext.rb:51
747
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:51
587
748
  def normalize(locale, data); end
588
749
 
589
- # source://i18n-1.12.0/lib/i18n/backend/gettext.rb:68
750
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:68
590
751
  def normalize_pluralization(locale, key, value); end
591
752
 
592
- # source://i18n-1.12.0/lib/i18n/backend/gettext.rb:47
753
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:47
593
754
  def parse(filename); end
594
755
  end
595
756
 
596
- # source://i18n-1.12.0/lib/i18n/backend/gettext.rb:34
757
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:34
597
758
  class I18n::Backend::Gettext::PoData < ::Hash
598
- # source://i18n-1.12.0/lib/i18n/backend/gettext.rb:35
759
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:35
599
760
  def set_comment(msgid_or_sym, comment); end
600
761
  end
601
762
 
602
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:20
763
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:20
603
764
  module I18n::Backend::InterpolationCompiler
604
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:99
765
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:98
605
766
  def interpolate(locale, string, values); end
606
767
 
607
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:109
768
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:108
608
769
  def store_translations(locale, data, options = T.unsafe(nil)); end
609
770
 
610
771
  protected
611
772
 
612
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:115
773
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:114
613
774
  def compile_all_strings_in(data); end
614
775
  end
615
776
 
616
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:21
777
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:21
617
778
  module I18n::Backend::InterpolationCompiler::Compiler
618
779
  extend ::I18n::Backend::InterpolationCompiler::Compiler
619
780
 
620
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:27
781
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:26
621
782
  def compile_if_an_interpolation(string); end
622
783
 
623
- # @return [Boolean]
624
- #
625
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:39
784
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:39
626
785
  def interpolated_str?(str); end
627
786
 
628
787
  protected
629
788
 
630
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:60
789
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:59
631
790
  def compile_interpolation_token(key); end
632
791
 
633
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:49
792
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:49
634
793
  def compiled_interpolation_body(str); end
635
794
 
636
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:73
795
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:72
637
796
  def direct_key(key); end
638
797
 
639
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:93
798
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:92
640
799
  def escape_key_sym(key); end
641
800
 
642
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:89
801
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:88
643
802
  def escape_plain_str(str); end
644
803
 
645
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:55
646
- def handle_interpolation_token(interpolation, matchdata); end
804
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:55
805
+ def handle_interpolation_token(token); end
647
806
 
648
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:69
807
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:68
649
808
  def interpolate_key(key); end
650
809
 
651
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:64
810
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:63
652
811
  def interpolate_or_raise_missing(key); end
653
812
 
654
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:81
813
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:80
655
814
  def missing_key(key); end
656
815
 
657
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:77
816
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:76
658
817
  def nil_key(key); end
659
818
 
660
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:85
819
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:84
661
820
  def reserved_key(key); end
662
821
 
663
822
  # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"]
664
823
  #
665
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:45
824
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:45
666
825
  def tokenize(str); end
667
826
  end
668
827
 
669
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:25
670
- I18n::Backend::InterpolationCompiler::Compiler::INTERPOLATION_SYNTAX_PATTERN = T.let(T.unsafe(nil), Regexp)
671
-
672
- # source://i18n-1.12.0/lib/i18n/backend/interpolation_compiler.rb:24
828
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:24
673
829
  I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp)
674
830
 
675
- # This is a basic backend for key value stores. It receives on
676
- # initialization the store, which should respond to three methods:
677
- #
678
- # * store#[](key) - Used to get a value
679
- # * store#[]=(key, value) - Used to set a value
680
- # * store#keys - Used to get all keys
681
- #
682
- # Since these stores only supports string, all values are converted
683
- # to JSON before being stored, allowing it to also store booleans,
684
- # hashes and arrays. However, this store does not support Procs.
685
- #
686
- # As the ActiveRecord backend, Symbols are just supported when loading
687
- # translations from the filesystem or through explicit store translations.
688
- #
689
- # Also, avoid calling I18n.available_locales since it's a somehow
690
- # expensive operation in most stores.
691
- #
692
- # == Example
693
- #
694
- # To setup I18n to use TokyoCabinet in memory is quite straightforward:
695
- #
696
- # require 'rufus/tokyo/cabinet' # gem install rufus-tokyo
697
- # I18n.backend = I18n::Backend::KeyValue.new(Rufus::Tokyo::Cabinet.new('*'))
698
- #
699
- # == Performance
700
- #
701
- # You may make this backend even faster by including the Memoize module.
702
- # However, notice that you should properly clear the cache if you change
703
- # values directly in the key-store.
704
- #
705
- # == Subtrees
706
- #
707
- # In most backends, you are allowed to retrieve part of a translation tree:
708
- #
709
- # I18n.backend.store_translations :en, :foo => { :bar => :baz }
710
- # I18n.t "foo" #=> { :bar => :baz }
711
- #
712
- # This backend supports this feature by default, but it slows down the storage
713
- # of new data considerably and makes hard to delete entries. That said, you are
714
- # allowed to disable the storage of subtrees on initialization:
715
- #
716
- # I18n::Backend::KeyValue.new(@store, false)
717
- #
718
- # This is useful if you are using a KeyValue backend chained to a Simple backend.
719
- #
720
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:69
721
- class I18n::Backend::KeyValue
722
- include ::I18n::Backend::Flatten
723
- include ::I18n::Backend::Transliterator
724
- include ::I18n::Backend::Base
725
- include ::I18n::Backend::KeyValue::Implementation
726
- end
727
-
728
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:70
729
- module I18n::Backend::KeyValue::Implementation
730
- include ::I18n::Backend::Flatten
731
- include ::I18n::Backend::Transliterator
732
- include ::I18n::Backend::Base
733
-
734
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:75
735
- def initialize(store, subtrees = T.unsafe(nil)); end
736
-
737
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:102
738
- def available_locales; end
739
-
740
- # @return [Boolean]
741
- #
742
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:79
743
- def initialized?; end
744
-
745
- # Returns the value of attribute store.
746
- #
747
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:71
748
- def store; end
749
-
750
- # Sets the attribute store
751
- #
752
- # @param value the value to set the attribute store to.
753
- #
754
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:71
755
- def store=(_arg0); end
756
-
757
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:83
758
- def store_translations(locale, data, options = T.unsafe(nil)); end
759
-
760
- protected
761
-
762
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:124
763
- def init_translations; end
764
-
765
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:136
766
- def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
767
-
768
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:150
769
- def pluralize(locale, entry, count); end
770
-
771
- # @return [Boolean]
772
- #
773
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:132
774
- def subtrees?; end
775
-
776
- # Queries the translations from the key-value store and converts
777
- # them into a hash such as the one returned from loading the
778
- # haml files
779
- #
780
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:115
781
- def translations; end
782
- end
783
-
784
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:161
785
- class I18n::Backend::KeyValue::SubtreeProxy
786
- # @return [SubtreeProxy] a new instance of SubtreeProxy
787
- #
788
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:162
789
- def initialize(master_key, store); end
790
-
791
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:172
792
- def [](key); end
793
-
794
- # @return [Boolean]
795
- #
796
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:168
797
- def has_key?(key); end
798
-
799
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:196
800
- def inspect; end
801
-
802
- # @return [Boolean]
803
- #
804
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:188
805
- def instance_of?(klass); end
806
-
807
- # @return [Boolean]
808
- #
809
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:183
810
- def is_a?(klass); end
811
-
812
- # @return [Boolean]
813
- #
814
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:183
815
- def kind_of?(klass); end
816
-
817
- # @return [Boolean]
818
- #
819
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:192
820
- def nil?; end
821
- end
822
-
823
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:65
831
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:65
824
832
  class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple
825
- # @return [LazyLoadable] a new instance of LazyLoadable
826
- #
827
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:66
833
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:66
828
834
  def initialize(lazy_load: T.unsafe(nil)); end
829
835
 
830
836
  # Parse the load path and extract all locales.
831
837
  #
832
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:99
838
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:99
833
839
  def available_locales; end
834
840
 
835
841
  # Eager loading is not supported in the lazy context.
836
842
  #
837
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:90
843
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:90
838
844
  def eager_load!; end
839
845
 
840
846
  # Returns whether the current locale is initialized.
841
847
  #
842
- # @return [Boolean]
843
- #
844
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:71
848
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:71
845
849
  def initialized?; end
846
850
 
847
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:107
851
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:107
848
852
  def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
849
853
 
850
854
  # Clean up translations and uninitialize all locales.
851
855
  #
852
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:80
856
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:80
853
857
  def reload!; end
854
858
 
855
859
  protected
856
860
 
857
861
  # Load translations from files that belong to the current locale.
858
862
  #
859
- # @raise [InvalidFilenames]
860
- #
861
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:121
863
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:121
862
864
  def init_translations; end
863
865
 
864
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:133
866
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:133
865
867
  def initialized_locales; end
866
868
 
867
869
  private
@@ -869,36 +871,30 @@ class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple
869
871
  # Checks if a filename is named in correspondence to the translations it loaded.
870
872
  # The locale extracted from the path must be the single locale loaded in the translations.
871
873
  #
872
- # @raise [FilenameIncorrect]
873
- #
874
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:175
874
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:175
875
875
  def assert_file_named_correctly!(file, translations); end
876
876
 
877
877
  # Select all files from I18n load path that belong to current locale.
878
878
  # These files must start with the locale identifier (ie. "en", "pt-BR"),
879
879
  # followed by an "_" demarcation to separate proceeding text.
880
880
  #
881
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:167
881
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:167
882
882
  def filenames_for_current_locale; end
883
883
 
884
- # @return [Boolean]
885
- #
886
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:139
884
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:139
887
885
  def lazy_load?; end
888
886
 
889
887
  # Loads each file supplied and asserts that the file only loads
890
888
  # translations as expected by the name. The method returns a list of
891
889
  # errors corresponding to offending files.
892
890
  #
893
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:152
891
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:152
894
892
  def load_translations_and_collect_file_errors(files); end
895
893
  end
896
894
 
897
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:143
895
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:143
898
896
  class I18n::Backend::LazyLoadable::FilenameIncorrect < ::StandardError
899
- # @return [FilenameIncorrect] a new instance of FilenameIncorrect
900
- #
901
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:144
897
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:144
902
898
  def initialize(file, expected_locale, unexpected_locales); end
903
899
  end
904
900
 
@@ -952,91 +948,105 @@ end
952
948
  #
953
949
  # I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default
954
950
  #
955
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:55
951
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:55
956
952
  class I18n::Backend::LocaleExtractor
957
953
  class << self
958
- # source://i18n-1.12.0/lib/i18n/backend/lazy_loadable.rb:57
954
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:57
959
955
  def locale_from_path(path); end
960
956
  end
961
957
  end
962
958
 
963
- # source://i18n-1.12.0/lib/i18n/backend/memoize.rb:14
959
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:14
964
960
  module I18n::Backend::Memoize
965
- # source://i18n-1.12.0/lib/i18n/backend/memoize.rb:15
961
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:15
966
962
  def available_locales; end
967
963
 
968
- # source://i18n-1.12.0/lib/i18n/backend/memoize.rb:29
964
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:29
969
965
  def eager_load!; end
970
966
 
971
- # source://i18n-1.12.0/lib/i18n/backend/memoize.rb:24
967
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:24
972
968
  def reload!; end
973
969
 
974
- # source://i18n-1.12.0/lib/i18n/backend/memoize.rb:19
970
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:19
975
971
  def store_translations(locale, data, options = T.unsafe(nil)); end
976
972
 
977
973
  protected
978
974
 
979
- # source://i18n-1.12.0/lib/i18n/backend/memoize.rb:37
975
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:37
980
976
  def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
981
977
 
982
- # source://i18n-1.12.0/lib/i18n/backend/memoize.rb:44
978
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:44
983
979
  def memoized_lookup; end
984
980
 
985
- # source://i18n-1.12.0/lib/i18n/backend/memoize.rb:48
981
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:48
986
982
  def reset_memoizations!(locale = T.unsafe(nil)); end
987
983
  end
988
984
 
989
- # source://i18n-1.12.0/lib/i18n/backend/metadata.rb:21
985
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:21
990
986
  module I18n::Backend::Metadata
991
- # source://i18n-1.12.0/lib/i18n/backend/metadata.rb:52
987
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:52
992
988
  def interpolate(locale, entry, values = T.unsafe(nil)); end
993
989
 
994
- # source://i18n-1.12.0/lib/i18n/backend/metadata.rb:57
990
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:57
995
991
  def pluralize(locale, entry, count); end
996
992
 
997
- # source://i18n-1.12.0/lib/i18n/backend/metadata.rb:40
993
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:40
998
994
  def translate(locale, key, options = T.unsafe(nil)); end
999
995
 
1000
996
  protected
1001
997
 
1002
- # source://i18n-1.12.0/lib/i18n/backend/metadata.rb:63
998
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:63
1003
999
  def with_metadata(metadata, &block); end
1004
1000
 
1005
1001
  class << self
1006
- # @private
1007
- #
1008
- # source://i18n-1.12.0/lib/i18n/backend/metadata.rb:23
1002
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:23
1009
1003
  def included(base); end
1010
1004
  end
1011
1005
  end
1012
1006
 
1013
- # source://i18n-1.12.0/lib/i18n/backend/pluralization.rb:16
1007
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:16
1014
1008
  module I18n::Backend::Pluralization
1015
1009
  # Overwrites the Base backend translate method so that it will check the
1016
1010
  # 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
1011
+ # rule and use it to pluralize the given entry. I.e., the library expects
1018
1012
  # pluralization rules to be stored at I18n.t(:'i18n.plural.rule')
1019
1013
  #
1020
1014
  # 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-1.12.0/lib/i18n/backend/pluralization.rb:31
1015
+ # return a pluralization key. Valid keys depend on the pluralization
1016
+ # rules for the locale, as defined in the CLDR.
1017
+ # As of v41, 6 locale-specific plural categories are defined:
1018
+ # :few, :many, :one, :other, :two, :zero
1019
+ #
1020
+ # n.b., The :one plural category does not imply the number 1.
1021
+ # Instead, :one is a category for any number that behaves like 1 in
1022
+ # that locale. For example, in some locales, :one is used for numbers
1023
+ # that end in "1" (like 1, 21, 151) but that don't end in
1024
+ # 11 (like 11, 111, 10311).
1025
+ # Similar notes apply to the :two, and :zero plural categories.
1026
+ #
1027
+ # If you want to have different strings for the categories of count == 0
1028
+ # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car")
1029
+ # use the explicit `"0"` and `"1"` keys.
1030
+ # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules
1031
+ #
1032
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:39
1031
1033
  def pluralize(locale, entry, count); end
1032
1034
 
1033
1035
  protected
1034
1036
 
1035
- # source://i18n-1.12.0/lib/i18n/backend/pluralization.rb:50
1037
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:81
1036
1038
  def pluralizer(locale); end
1037
1039
 
1038
- # source://i18n-1.12.0/lib/i18n/backend/pluralization.rb:46
1040
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:77
1039
1041
  def pluralizers; end
1042
+
1043
+ private
1044
+
1045
+ # Normalizes categories of 0.0 and 1.0
1046
+ # and returns the symbolic version
1047
+ #
1048
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:89
1049
+ def symbolic_count(count); end
1040
1050
  end
1041
1051
 
1042
1052
  # A simple backend that reads translations from YAML files and stores them in
@@ -1045,43 +1055,41 @@ end
1045
1055
  # The implementation is provided by a Implementation module allowing to easily
1046
1056
  # extend Simple backend's behavior by including modules. E.g.:
1047
1057
  #
1048
- # module I18n::Backend::Pluralization
1049
- # def pluralize(*args)
1050
- # # extended pluralization logic
1051
- # super
1052
- # end
1053
- # end
1058
+ # module I18n::Backend::Pluralization
1059
+ # def pluralize(*args)
1060
+ # # extended pluralization logic
1061
+ # super
1062
+ # end
1063
+ # end
1054
1064
  #
1055
- # I18n::Backend::Simple.include(I18n::Backend::Pluralization)
1065
+ # I18n::Backend::Simple.include(I18n::Backend::Pluralization)
1056
1066
  #
1057
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:21
1067
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:21
1058
1068
  class I18n::Backend::Simple
1059
1069
  include ::I18n::Backend::Transliterator
1060
1070
  include ::I18n::Backend::Base
1061
1071
  include ::I18n::Backend::Simple::Implementation
1062
1072
  end
1063
1073
 
1064
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:22
1074
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:22
1065
1075
  module I18n::Backend::Simple::Implementation
1066
1076
  include ::I18n::Backend::Transliterator
1067
1077
  include ::I18n::Backend::Base
1068
1078
 
1069
1079
  # Get available locales from the translations hash
1070
1080
  #
1071
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:46
1081
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:49
1072
1082
  def available_locales; end
1073
1083
 
1074
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:61
1084
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:64
1075
1085
  def eager_load!; end
1076
1086
 
1077
- # @return [Boolean]
1078
- #
1079
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:25
1087
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:28
1080
1088
  def initialized?; end
1081
1089
 
1082
1090
  # Clean up translations hash and set initialized to false on reload!
1083
1091
  #
1084
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:55
1092
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:58
1085
1093
  def reload!; end
1086
1094
 
1087
1095
  # Stores translations for the given locale in memory.
@@ -1089,15 +1097,15 @@ module I18n::Backend::Simple::Implementation
1089
1097
  # translations will be overwritten by new ones only at the deepest
1090
1098
  # level of the hash.
1091
1099
  #
1092
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:33
1100
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:36
1093
1101
  def store_translations(locale, data, options = T.unsafe(nil)); end
1094
1102
 
1095
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:66
1103
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:69
1096
1104
  def translations(do_init: T.unsafe(nil)); end
1097
1105
 
1098
1106
  protected
1099
1107
 
1100
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:76
1108
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:83
1101
1109
  def init_translations; end
1102
1110
 
1103
1111
  # Looks up a translation from the translations hash. Returns nil if
@@ -1106,318 +1114,208 @@ module I18n::Backend::Simple::Implementation
1106
1114
  # into multiple keys, i.e. <tt>currency.format</tt> is regarded the same as
1107
1115
  # <tt>%w(currency format)</tt>.
1108
1116
  #
1109
- # source://i18n-1.12.0/lib/i18n/backend/simple.rb:86
1117
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:93
1110
1118
  def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
1111
1119
  end
1112
1120
 
1113
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:6
1121
+ # Mutex to ensure that concurrent translations loading will be thread-safe
1122
+ #
1123
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:26
1124
+ I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
1125
+
1126
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:6
1114
1127
  module I18n::Backend::Transliterator
1115
1128
  # Given a locale and a UTF-8 string, return the locale's ASCII
1116
1129
  # approximation for the string.
1117
1130
  #
1118
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:11
1131
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:11
1119
1132
  def transliterate(locale, string, replacement = T.unsafe(nil)); end
1120
1133
 
1121
1134
  class << self
1122
1135
  # Get a transliterator instance.
1123
1136
  #
1124
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:19
1137
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:19
1125
1138
  def get(rule = T.unsafe(nil)); end
1126
1139
  end
1127
1140
  end
1128
1141
 
1129
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:7
1142
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:7
1130
1143
  I18n::Backend::Transliterator::DEFAULT_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String)
1131
1144
 
1132
1145
  # A transliterator which accepts a Hash of characters as its translation
1133
1146
  # rule.
1134
1147
  #
1135
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:42
1148
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:42
1136
1149
  class I18n::Backend::Transliterator::HashTransliterator
1137
- # @return [HashTransliterator] a new instance of HashTransliterator
1138
- #
1139
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:74
1150
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:75
1140
1151
  def initialize(rule = T.unsafe(nil)); end
1141
1152
 
1142
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:80
1153
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:81
1143
1154
  def transliterate(string, replacement = T.unsafe(nil)); end
1144
1155
 
1145
1156
  private
1146
1157
 
1147
1158
  # Add transliteration rules to the approximations hash.
1148
1159
  #
1149
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:100
1160
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:101
1150
1161
  def add(hash); end
1151
1162
 
1152
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:93
1163
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:94
1153
1164
  def add_default_approximations; end
1154
1165
 
1155
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:89
1166
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:90
1156
1167
  def approximations; end
1157
1168
  end
1158
1169
 
1159
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:43
1170
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:43
1160
1171
  I18n::Backend::Transliterator::HashTransliterator::DEFAULT_APPROXIMATIONS = T.let(T.unsafe(nil), Hash)
1161
1172
 
1162
1173
  # A transliterator which accepts a Proc as its transliteration rule.
1163
1174
  #
1164
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:30
1175
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:30
1165
1176
  class I18n::Backend::Transliterator::ProcTransliterator
1166
- # @return [ProcTransliterator] a new instance of ProcTransliterator
1167
- #
1168
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:31
1177
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:31
1169
1178
  def initialize(rule); end
1170
1179
 
1171
- # source://i18n-1.12.0/lib/i18n/backend/transliterator.rb:35
1180
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:35
1172
1181
  def transliterate(string, replacement = T.unsafe(nil)); end
1173
1182
  end
1174
1183
 
1175
- # source://i18n-1.12.0/lib/i18n.rb:54
1184
+ # pkg:gem/i18n#lib/i18n.rb:55
1176
1185
  module I18n::Base
1177
- # source://i18n-1.12.0/lib/i18n.rb:69
1186
+ # pkg:gem/i18n#lib/i18n.rb:99
1178
1187
  def available_locales; end
1179
1188
 
1180
- # source://i18n-1.12.0/lib/i18n.rb:73
1189
+ # pkg:gem/i18n#lib/i18n.rb:99
1181
1190
  def available_locales=(value); end
1182
1191
 
1183
- # @return [Boolean]
1184
- #
1185
- # source://i18n-1.12.0/lib/i18n.rb:355
1192
+ # pkg:gem/i18n#lib/i18n.rb:416
1186
1193
  def available_locales_initialized?; end
1187
1194
 
1188
- # source://i18n-1.12.0/lib/i18n.rb:69
1195
+ # pkg:gem/i18n#lib/i18n.rb:99
1189
1196
  def backend; end
1190
1197
 
1191
- # source://i18n-1.12.0/lib/i18n.rb:73
1198
+ # pkg:gem/i18n#lib/i18n.rb:99
1192
1199
  def backend=(value); end
1193
1200
 
1194
1201
  # Gets I18n configuration object.
1195
1202
  #
1196
- # source://i18n-1.12.0/lib/i18n.rb:56
1203
+ # pkg:gem/i18n#lib/i18n.rb:57
1197
1204
  def config; end
1198
1205
 
1199
1206
  # Sets I18n configuration object.
1200
1207
  #
1201
- # source://i18n-1.12.0/lib/i18n.rb:61
1208
+ # pkg:gem/i18n#lib/i18n.rb:87
1202
1209
  def config=(value); end
1203
1210
 
1204
- # source://i18n-1.12.0/lib/i18n.rb:69
1211
+ # pkg:gem/i18n#lib/i18n.rb:99
1205
1212
  def default_locale; end
1206
1213
 
1207
- # source://i18n-1.12.0/lib/i18n.rb:73
1214
+ # pkg:gem/i18n#lib/i18n.rb:99
1208
1215
  def default_locale=(value); end
1209
1216
 
1210
- # source://i18n-1.12.0/lib/i18n.rb:69
1217
+ # pkg:gem/i18n#lib/i18n.rb:99
1211
1218
  def default_separator; end
1212
1219
 
1213
- # source://i18n-1.12.0/lib/i18n.rb:73
1220
+ # pkg:gem/i18n#lib/i18n.rb:99
1214
1221
  def default_separator=(value); end
1215
1222
 
1216
1223
  # Tells the backend to load translations now. Used in situations like the
1217
1224
  # Rails production environment. Backends can implement whatever strategy
1218
1225
  # is useful.
1219
1226
  #
1220
- # source://i18n-1.12.0/lib/i18n.rb:90
1227
+ # pkg:gem/i18n#lib/i18n.rb:121
1221
1228
  def eager_load!; end
1222
1229
 
1223
- # source://i18n-1.12.0/lib/i18n.rb:69
1230
+ # pkg:gem/i18n#lib/i18n.rb:99
1224
1231
  def enforce_available_locales; end
1225
1232
 
1226
1233
  # Raises an InvalidLocale exception when the passed locale is not available.
1227
1234
  #
1228
- # source://i18n-1.12.0/lib/i18n.rb:349
1235
+ # pkg:gem/i18n#lib/i18n.rb:410
1229
1236
  def enforce_available_locales!(locale); end
1230
1237
 
1231
- # source://i18n-1.12.0/lib/i18n.rb:73
1238
+ # pkg:gem/i18n#lib/i18n.rb:99
1232
1239
  def enforce_available_locales=(value); end
1233
1240
 
1234
- # source://i18n-1.12.0/lib/i18n.rb:69
1241
+ # pkg:gem/i18n#lib/i18n.rb:99
1235
1242
  def exception_handler; end
1236
1243
 
1237
- # source://i18n-1.12.0/lib/i18n.rb:73
1244
+ # pkg:gem/i18n#lib/i18n.rb:99
1238
1245
  def exception_handler=(value); end
1239
1246
 
1240
1247
  # Returns true if a translation exists for a given key, otherwise returns false.
1241
1248
  #
1242
- # @raise [Disabled]
1243
- # @return [Boolean]
1244
- #
1245
- # source://i18n-1.12.0/lib/i18n.rb:235
1249
+ # pkg:gem/i18n#lib/i18n.rb:295
1246
1250
  def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end
1247
1251
 
1248
- # Localizes certain objects, such as dates and numbers to local formatting.
1252
+ # Returns an array of interpolation keys for the given translation key
1249
1253
  #
1250
- # @raise [Disabled]
1254
+ # *Examples*
1251
1255
  #
1252
- # source://i18n-1.12.0/lib/i18n.rb:304
1256
+ # Suppose we have the following:
1257
+ # I18n.t 'example.zero' == 'Zero interpolations'
1258
+ # I18n.t 'example.one' == 'One interpolation %{foo}'
1259
+ # I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}'
1260
+ # I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}']
1261
+ # I18n.t 'example.one', locale: :other == 'One interpolation %{baz}'
1262
+ #
1263
+ # Then we can expect the following results:
1264
+ # I18n.interpolation_keys('example.zero') #=> []
1265
+ # I18n.interpolation_keys('example.one') #=> ['foo']
1266
+ # I18n.interpolation_keys('example.two') #=> ['foo', 'bar']
1267
+ # I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz']
1268
+ # I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz']
1269
+ # I18n.interpolation_keys('does-not-exist') #=> []
1270
+ # I18n.interpolation_keys('example') #=> []
1271
+ #
1272
+ # pkg:gem/i18n#lib/i18n.rb:284
1273
+ def interpolation_keys(key, **options); end
1274
+
1275
+ # pkg:gem/i18n#lib/i18n.rb:373
1253
1276
  def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
1254
1277
 
1255
- # source://i18n-1.12.0/lib/i18n.rb:69
1278
+ # pkg:gem/i18n#lib/i18n.rb:99
1256
1279
  def load_path; end
1257
1280
 
1258
- # source://i18n-1.12.0/lib/i18n.rb:73
1281
+ # pkg:gem/i18n#lib/i18n.rb:99
1259
1282
  def load_path=(value); end
1260
1283
 
1261
- # source://i18n-1.12.0/lib/i18n.rb:69
1284
+ # pkg:gem/i18n#lib/i18n.rb:99
1262
1285
  def locale; end
1263
1286
 
1264
- # source://i18n-1.12.0/lib/i18n.rb:73
1287
+ # pkg:gem/i18n#lib/i18n.rb:99
1265
1288
  def locale=(value); end
1266
1289
 
1267
1290
  # Returns true when the passed locale, which can be either a String or a
1268
1291
  # Symbol, is in the list of available locales. Returns false otherwise.
1269
1292
  #
1270
- # @return [Boolean]
1271
- #
1272
- # source://i18n-1.12.0/lib/i18n.rb:344
1293
+ # pkg:gem/i18n#lib/i18n.rb:405
1273
1294
  def locale_available?(locale); end
1274
1295
 
1275
1296
  # Localizes certain objects, such as dates and numbers to local formatting.
1276
1297
  #
1277
- # @raise [Disabled]
1278
- #
1279
- # source://i18n-1.12.0/lib/i18n.rb:304
1298
+ # pkg:gem/i18n#lib/i18n.rb:365
1280
1299
  def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
1281
1300
 
1282
1301
  # Merges the given locale, key and scope into a single array of keys.
1283
1302
  # Splits keys that contain dots into multiple keys. Makes sure all
1284
1303
  # keys are Symbols.
1285
1304
  #
1286
- # source://i18n-1.12.0/lib/i18n.rb:332
1305
+ # pkg:gem/i18n#lib/i18n.rb:393
1287
1306
  def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end
1288
1307
 
1289
1308
  # Tells the backend to reload translations. Used in situations like the
1290
1309
  # Rails development environment. Backends can implement whatever strategy
1291
1310
  # is useful.
1292
1311
  #
1293
- # source://i18n-1.12.0/lib/i18n.rb:82
1312
+ # pkg:gem/i18n#lib/i18n.rb:113
1294
1313
  def reload!; end
1295
1314
 
1296
- # Translates, pluralizes and interpolates a given key using a given locale,
1297
- # scope, and default, as well as interpolation values.
1298
- #
1299
- # *LOOKUP*
1300
- #
1301
- # Translation data is organized as a nested hash using the upper-level keys
1302
- # as namespaces. <em>E.g.</em>, ActionView ships with the translation:
1303
- # <tt>:date => {:formats => {:short => "%b %d"}}</tt>.
1304
- #
1305
- # Translations can be looked up at any level of this hash using the key argument
1306
- # and the scope option. <em>E.g.</em>, in this example <tt>I18n.t :date</tt>
1307
- # returns the whole translations hash <tt>{:formats => {:short => "%b %d"}}</tt>.
1308
- #
1309
- # Key can be either a single key or a dot-separated key (both Strings and Symbols
1310
- # work). <em>E.g.</em>, the short format can be looked up using both:
1311
- # I18n.t 'date.formats.short'
1312
- # I18n.t :'date.formats.short'
1313
- #
1314
- # Scope can be either a single key, a dot-separated key or an array of keys
1315
- # or dot-separated keys. Keys and scopes can be combined freely. So these
1316
- # examples will all look up the same short date format:
1317
- # I18n.t 'date.formats.short'
1318
- # I18n.t 'formats.short', :scope => 'date'
1319
- # I18n.t 'short', :scope => 'date.formats'
1320
- # I18n.t 'short', :scope => %w(date formats)
1321
- #
1322
- # *INTERPOLATION*
1323
- #
1324
- # Translations can contain interpolation variables which will be replaced by
1325
- # values passed to #translate as part of the options hash, with the keys matching
1326
- # the interpolation variable names.
1327
- #
1328
- # <em>E.g.</em>, with a translation <tt>:foo => "foo %{bar}"</tt> the option
1329
- # value for the key +bar+ will be interpolated into the translation:
1330
- # I18n.t :foo, :bar => 'baz' # => 'foo baz'
1331
- #
1332
- # *PLURALIZATION*
1333
- #
1334
- # Translation data can contain pluralized translations. Pluralized translations
1335
- # are arrays of singular/plural versions of translations like <tt>['Foo', 'Foos']</tt>.
1336
- #
1337
- # Note that <tt>I18n::Backend::Simple</tt> only supports an algorithm for English
1338
- # pluralization rules. Other algorithms can be supported by custom backends.
1339
- #
1340
- # This returns the singular version of a pluralized translation:
1341
- # I18n.t :foo, :count => 1 # => 'Foo'
1342
- #
1343
- # These both return the plural version of a pluralized translation:
1344
- # I18n.t :foo, :count => 0 # => 'Foos'
1345
- # I18n.t :foo, :count => 2 # => 'Foos'
1346
- #
1347
- # The <tt>:count</tt> option can be used both for pluralization and interpolation.
1348
- # <em>E.g.</em>, with the translation
1349
- # <tt>:foo => ['%{count} foo', '%{count} foos']</tt>, count will
1350
- # be interpolated to the pluralized translation:
1351
- # I18n.t :foo, :count => 1 # => '1 foo'
1352
- #
1353
- # *DEFAULTS*
1354
- #
1355
- # This returns the translation for <tt>:foo</tt> or <tt>default</tt> if no translation was found:
1356
- # I18n.t :foo, :default => 'default'
1357
- #
1358
- # This returns the translation for <tt>:foo</tt> or the translation for <tt>:bar</tt> if no
1359
- # translation for <tt>:foo</tt> was found:
1360
- # I18n.t :foo, :default => :bar
1361
- #
1362
- # Returns the translation for <tt>:foo</tt> or the translation for <tt>:bar</tt>
1363
- # or <tt>default</tt> if no translations for <tt>:foo</tt> and <tt>:bar</tt> were found.
1364
- # I18n.t :foo, :default => [:bar, 'default']
1365
- #
1366
- # *BULK LOOKUP*
1367
- #
1368
- # This returns an array with the translations for <tt>:foo</tt> and <tt>:bar</tt>.
1369
- # I18n.t [:foo, :bar]
1370
- #
1371
- # Can be used with dot-separated nested keys:
1372
- # I18n.t [:'baz.foo', :'baz.bar']
1373
- #
1374
- # Which is the same as using a scope option:
1375
- # I18n.t [:foo, :bar], :scope => :baz
1376
- #
1377
- # *LAMBDAS*
1378
- #
1379
- # Both translations and defaults can be given as Ruby lambdas. Lambdas will be
1380
- # called and passed the key and options.
1381
- #
1382
- # E.g. assuming the key <tt>:salutation</tt> resolves to:
1383
- # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
1384
- #
1385
- # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
1386
- #
1387
- # Note that the string returned by lambda will go through string interpolation too,
1388
- # so the following lambda would give the same result:
1389
- # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" }
1390
- #
1391
- # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when
1392
- # a cache layer is put in front of I18n.translate it will generate a cache key
1393
- # from the argument values passed to #translate. Therefore your lambdas should
1394
- # always return the same translations/values per unique combination of argument
1395
- # values.
1396
- #
1397
- # *Ruby 2.7+ keyword arguments warning*
1398
- #
1399
- # This method uses keyword arguments.
1400
- # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
1401
- # The "hash" parameter must be passed as keyword argument.
1402
- #
1403
- # Good:
1404
- # I18n.t(:salutation, :gender => 'w', :name => 'Smith')
1405
- # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' })
1406
- # I18n.t(:salutation, **any_hash)
1407
- #
1408
- # Bad:
1409
- # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' })
1410
- # I18n.t(:salutation, any_hash)
1411
- #
1412
- # @raise [Disabled]
1413
- #
1414
- # source://i18n-1.12.0/lib/i18n.rb:210
1315
+ # pkg:gem/i18n#lib/i18n.rb:256
1415
1316
  def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
1416
1317
 
1417
- # Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
1418
- # this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
1419
- #
1420
- # source://i18n-1.12.0/lib/i18n.rb:229
1318
+ # pkg:gem/i18n#lib/i18n.rb:263
1421
1319
  def t!(key, **options); end
1422
1320
 
1423
1321
  # Translates, pluralizes and interpolates a given key using a given locale,
@@ -1490,7 +1388,7 @@ module I18n::Base
1490
1388
  # or <tt>default</tt> if no translations for <tt>:foo</tt> and <tt>:bar</tt> were found.
1491
1389
  # I18n.t :foo, :default => [:bar, 'default']
1492
1390
  #
1493
- # *BULK LOOKUP*
1391
+ # <b>BULK LOOKUP</b>
1494
1392
  #
1495
1393
  # This returns an array with the translations for <tt>:foo</tt> and <tt>:bar</tt>.
1496
1394
  # I18n.t [:foo, :bar]
@@ -1509,7 +1407,7 @@ module I18n::Base
1509
1407
  # E.g. assuming the key <tt>:salutation</tt> resolves to:
1510
1408
  # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
1511
1409
  #
1512
- # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
1410
+ # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith')</tt> will result in "Mrs. Smith".
1513
1411
  #
1514
1412
  # Note that the string returned by lambda will go through string interpolation too,
1515
1413
  # so the following lambda would give the same result:
@@ -1521,7 +1419,7 @@ module I18n::Base
1521
1419
  # always return the same translations/values per unique combination of argument
1522
1420
  # values.
1523
1421
  #
1524
- # *Ruby 2.7+ keyword arguments warning*
1422
+ # <b>Ruby 2.7+ keyword arguments warning</b>
1525
1423
  #
1526
1424
  # This method uses keyword arguments.
1527
1425
  # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
@@ -1536,15 +1434,13 @@ module I18n::Base
1536
1434
  # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' })
1537
1435
  # I18n.t(:salutation, any_hash)
1538
1436
  #
1539
- # @raise [Disabled]
1540
- #
1541
- # source://i18n-1.12.0/lib/i18n.rb:210
1437
+ # pkg:gem/i18n#lib/i18n.rb:241
1542
1438
  def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
1543
1439
 
1544
1440
  # Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
1545
1441
  # this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
1546
1442
  #
1547
- # source://i18n-1.12.0/lib/i18n.rb:229
1443
+ # pkg:gem/i18n#lib/i18n.rb:260
1548
1444
  def translate!(key, **options); end
1549
1445
 
1550
1446
  # Transliterates UTF-8 characters to ASCII. By default this method will
@@ -1599,14 +1495,19 @@ module I18n::Base
1599
1495
  # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen"
1600
1496
  # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen"
1601
1497
  #
1602
- # source://i18n-1.12.0/lib/i18n.rb:293
1498
+ # pkg:gem/i18n#lib/i18n.rb:354
1603
1499
  def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end
1604
1500
 
1605
1501
  # Executes block with given I18n.locale set.
1606
1502
  #
1607
- # source://i18n-1.12.0/lib/i18n.rb:315
1503
+ # pkg:gem/i18n#lib/i18n.rb:376
1608
1504
  def with_locale(tmp_locale = T.unsafe(nil)); end
1609
1505
 
1506
+ # Gets a mutable I18n configuration object.
1507
+ #
1508
+ # pkg:gem/i18n#lib/i18n.rb:73
1509
+ def writable_config; end
1510
+
1610
1511
  private
1611
1512
 
1612
1513
  # Any exceptions thrown in translate will be sent to the @@exception_handler
@@ -1628,100 +1529,104 @@ module I18n::Base
1628
1529
  # I18n.exception_handler = I18nExceptionHandler.new # an object
1629
1530
  # I18n.exception_handler.call(exception, locale, key, options) # will be called like this
1630
1531
  #
1631
- # source://i18n-1.12.0/lib/i18n.rb:391
1532
+ # pkg:gem/i18n#lib/i18n.rb:452
1632
1533
  def handle_exception(handling, exception, locale, key, options); end
1633
1534
 
1634
- # source://i18n-1.12.0/lib/i18n.rb:409
1535
+ # pkg:gem/i18n#lib/i18n.rb:494
1536
+ def interpolation_keys_from_translation(translation); end
1537
+
1538
+ # pkg:gem/i18n#lib/i18n.rb:470
1635
1539
  def normalize_key(key, separator); end
1636
1540
 
1637
- # source://i18n-1.12.0/lib/i18n.rb:361
1541
+ # pkg:gem/i18n#lib/i18n.rb:422
1638
1542
  def translate_key(key, throw, raise, locale, backend, options); end
1639
1543
  end
1640
1544
 
1641
- # source://i18n-1.12.0/lib/i18n/config.rb:6
1545
+ # pkg:gem/i18n#lib/i18n/config.rb:6
1642
1546
  class I18n::Config
1547
+ # pkg:gem/i18n#lib/i18n/config.rb:13
1548
+ def initialize; end
1549
+
1643
1550
  # Returns an array of locales for which translations are available.
1644
1551
  # Unless you explicitly set these through I18n.available_locales=
1645
1552
  # the call will be delegated to the backend.
1646
1553
  #
1647
- # source://i18n-1.12.0/lib/i18n/config.rb:43
1554
+ # pkg:gem/i18n#lib/i18n/config.rb:77
1648
1555
  def available_locales; end
1649
1556
 
1650
1557
  # Sets the available locales.
1651
1558
  #
1652
- # source://i18n-1.12.0/lib/i18n/config.rb:57
1559
+ # pkg:gem/i18n#lib/i18n/config.rb:91
1653
1560
  def available_locales=(locales); end
1654
1561
 
1655
1562
  # Returns true if the available_locales have been initialized
1656
1563
  #
1657
- # @return [Boolean]
1658
- #
1659
- # source://i18n-1.12.0/lib/i18n/config.rb:64
1564
+ # pkg:gem/i18n#lib/i18n/config.rb:98
1660
1565
  def available_locales_initialized?; end
1661
1566
 
1662
1567
  # Caches the available locales list as both strings and symbols in a Set, so
1663
1568
  # that we can have faster lookups to do the available locales enforce check.
1664
1569
  #
1665
- # source://i18n-1.12.0/lib/i18n/config.rb:50
1570
+ # pkg:gem/i18n#lib/i18n/config.rb:84
1666
1571
  def available_locales_set; end
1667
1572
 
1668
1573
  # Returns the current backend. Defaults to +Backend::Simple+.
1669
1574
  #
1670
- # source://i18n-1.12.0/lib/i18n/config.rb:20
1575
+ # pkg:gem/i18n#lib/i18n/config.rb:54
1671
1576
  def backend; end
1672
1577
 
1673
1578
  # Sets the current backend. Used to set a custom backend.
1674
1579
  #
1675
- # source://i18n-1.12.0/lib/i18n/config.rb:25
1580
+ # pkg:gem/i18n#lib/i18n/config.rb:59
1676
1581
  def backend=(backend); end
1677
1582
 
1678
1583
  # Clears the available locales set so it can be recomputed again after I18n
1679
1584
  # gets reloaded.
1680
1585
  #
1681
- # source://i18n-1.12.0/lib/i18n/config.rb:70
1586
+ # pkg:gem/i18n#lib/i18n/config.rb:104
1682
1587
  def clear_available_locales_set; end
1683
1588
 
1684
1589
  # Returns the current default locale. Defaults to :'en'
1685
1590
  #
1686
- # source://i18n-1.12.0/lib/i18n/config.rb:30
1591
+ # pkg:gem/i18n#lib/i18n/config.rb:64
1687
1592
  def default_locale; end
1688
1593
 
1689
1594
  # Sets the current default locale. Used to set a custom default locale.
1690
1595
  #
1691
- # source://i18n-1.12.0/lib/i18n/config.rb:35
1596
+ # pkg:gem/i18n#lib/i18n/config.rb:69
1692
1597
  def default_locale=(locale); end
1693
1598
 
1694
1599
  # Returns the current default scope separator. Defaults to '.'
1695
1600
  #
1696
- # source://i18n-1.12.0/lib/i18n/config.rb:75
1601
+ # pkg:gem/i18n#lib/i18n/config.rb:109
1697
1602
  def default_separator; end
1698
1603
 
1699
1604
  # Sets the current default scope separator.
1700
1605
  #
1701
- # source://i18n-1.12.0/lib/i18n/config.rb:80
1606
+ # pkg:gem/i18n#lib/i18n/config.rb:114
1702
1607
  def default_separator=(separator); end
1703
1608
 
1704
- # source://i18n-1.12.0/lib/i18n/config.rb:141
1609
+ # pkg:gem/i18n#lib/i18n/config.rb:175
1705
1610
  def enforce_available_locales; end
1706
1611
 
1707
- # source://i18n-1.12.0/lib/i18n/config.rb:145
1612
+ # pkg:gem/i18n#lib/i18n/config.rb:179
1708
1613
  def enforce_available_locales=(enforce_available_locales); end
1709
1614
 
1710
1615
  # Returns the current exception handler. Defaults to an instance of
1711
1616
  # I18n::ExceptionHandler.
1712
1617
  #
1713
- # source://i18n-1.12.0/lib/i18n/config.rb:86
1618
+ # pkg:gem/i18n#lib/i18n/config.rb:120
1714
1619
  def exception_handler; end
1715
1620
 
1716
1621
  # Sets the exception handler.
1717
1622
  #
1718
- # source://i18n-1.12.0/lib/i18n/config.rb:91
1623
+ # pkg:gem/i18n#lib/i18n/config.rb:125
1719
1624
  def exception_handler=(exception_handler); end
1720
1625
 
1721
1626
  # Returns the current interpolation patterns. Defaults to
1722
1627
  # I18n::DEFAULT_INTERPOLATION_PATTERNS.
1723
1628
  #
1724
- # source://i18n-1.12.0/lib/i18n/config.rb:151
1629
+ # pkg:gem/i18n#lib/i18n/config.rb:185
1725
1630
  def interpolation_patterns; end
1726
1631
 
1727
1632
  # Sets the current interpolation patterns. Used to set a interpolation
@@ -1731,7 +1636,7 @@ class I18n::Config
1731
1636
  #
1732
1637
  # I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/
1733
1638
  #
1734
- # source://i18n-1.12.0/lib/i18n/config.rb:161
1639
+ # pkg:gem/i18n#lib/i18n/config.rb:195
1735
1640
  def interpolation_patterns=(interpolation_patterns); end
1736
1641
 
1737
1642
  # Allow clients to register paths providing translation data sources. The
@@ -1743,30 +1648,30 @@ class I18n::Config
1743
1648
  # register translation files like this:
1744
1649
  # I18n.load_path << 'path/to/locale/en.yml'
1745
1650
  #
1746
- # source://i18n-1.12.0/lib/i18n/config.rb:126
1651
+ # pkg:gem/i18n#lib/i18n/config.rb:160
1747
1652
  def load_path; end
1748
1653
 
1749
1654
  # Sets the load path instance. Custom implementations are expected to
1750
1655
  # behave like a Ruby Array.
1751
1656
  #
1752
- # source://i18n-1.12.0/lib/i18n/config.rb:132
1657
+ # pkg:gem/i18n#lib/i18n/config.rb:166
1753
1658
  def load_path=(load_path); end
1754
1659
 
1755
1660
  # The only configuration value that is not global and scoped to thread is :locale.
1756
1661
  # It defaults to the default_locale.
1757
1662
  #
1758
- # source://i18n-1.12.0/lib/i18n/config.rb:9
1663
+ # pkg:gem/i18n#lib/i18n/config.rb:9
1759
1664
  def locale; end
1760
1665
 
1761
- # Sets the current locale pseudo-globally, i.e. in the Thread.current hash.
1666
+ # Sets the current locale pseudo-globally, i.e. in the Thread.current or Fiber local hash.
1762
1667
  #
1763
- # source://i18n-1.12.0/lib/i18n/config.rb:14
1668
+ # pkg:gem/i18n#lib/i18n/config.rb:48
1764
1669
  def locale=(locale); end
1765
1670
 
1766
1671
  # Returns the current handler for situations when interpolation argument
1767
1672
  # is missing. MissingInterpolationArgument will be raised by default.
1768
1673
  #
1769
- # source://i18n-1.12.0/lib/i18n/config.rb:97
1674
+ # pkg:gem/i18n#lib/i18n/config.rb:131
1770
1675
  def missing_interpolation_argument_handler; end
1771
1676
 
1772
1677
  # Sets the missing interpolation argument handler. It can be any
@@ -1781,34 +1686,54 @@ class I18n::Config
1781
1686
  # "#{key} is missing"
1782
1687
  # end
1783
1688
  #
1784
- # source://i18n-1.12.0/lib/i18n/config.rb:114
1689
+ # pkg:gem/i18n#lib/i18n/config.rb:148
1785
1690
  def missing_interpolation_argument_handler=(exception_handler); end
1691
+
1692
+ # pkg:gem/i18n#lib/i18n/config.rb:17
1693
+ def owned_by?(fiber); end
1694
+
1695
+ # pkg:gem/i18n#lib/i18n/config.rb:21
1696
+ def owner=(fiber); end
1697
+
1698
+ # Sets this configuration as the current one for the active execution context.
1699
+ # The stored configuration is frozen to avoid sharing mutable state between fibers.
1700
+ #
1701
+ # pkg:gem/i18n#lib/i18n/config.rb:40
1702
+ def set!; end
1703
+
1704
+ # Returns a copied configuration with the provided attributes set.
1705
+ #
1706
+ # pkg:gem/i18n#lib/i18n/config.rb:30
1707
+ def with(**attrs); end
1708
+
1709
+ private
1710
+
1711
+ # pkg:gem/i18n#lib/i18n/config.rb:25
1712
+ def initialize_copy(other); end
1786
1713
  end
1787
1714
 
1788
- # source://i18n-1.12.0/lib/i18n/interpolate/ruby.rb:5
1715
+ # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:7
1789
1716
  I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array)
1790
1717
 
1791
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:18
1718
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:16
1792
1719
  class I18n::Disabled < ::I18n::ArgumentError
1793
- # @return [Disabled] a new instance of Disabled
1794
- #
1795
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:19
1720
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:17
1796
1721
  def initialize(method); end
1797
1722
  end
1798
1723
 
1799
- # source://i18n-1.12.0/lib/i18n.rb:35
1724
+ # pkg:gem/i18n#lib/i18n.rb:36
1800
1725
  I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
1801
1726
 
1802
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:6
1727
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:4
1803
1728
  class I18n::ExceptionHandler
1804
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:7
1729
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:5
1805
1730
  def call(exception, _locale, _key, _options); end
1806
1731
  end
1807
1732
 
1808
- # source://i18n-1.12.0/lib/i18n/gettext.rb:4
1733
+ # pkg:gem/i18n#lib/i18n/gettext.rb:4
1809
1734
  module I18n::Gettext
1810
1735
  class << self
1811
- # source://i18n-1.12.0/lib/i18n/gettext.rb:21
1736
+ # pkg:gem/i18n#lib/i18n/gettext.rb:21
1812
1737
  def extract_scope(msgid, separator); end
1813
1738
 
1814
1739
  # returns an array of plural keys for the given locale or the whole hash
@@ -1816,12 +1741,12 @@ module I18n::Gettext
1816
1741
  # integer-index based style
1817
1742
  # TODO move this information to the pluralization module
1818
1743
  #
1819
- # source://i18n-1.12.0/lib/i18n/gettext.rb:17
1744
+ # pkg:gem/i18n#lib/i18n/gettext.rb:17
1820
1745
  def plural_keys(*args); end
1821
1746
  end
1822
1747
  end
1823
1748
 
1824
- # source://i18n-1.12.0/lib/i18n/gettext.rb:6
1749
+ # pkg:gem/i18n#lib/i18n/gettext.rb:6
1825
1750
  I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String)
1826
1751
 
1827
1752
  # Implements classical Gettext style accessors. To use this include the
@@ -1829,7 +1754,7 @@ I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String)
1829
1754
  #
1830
1755
  # include I18n::Gettext::Helpers
1831
1756
  #
1832
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:11
1757
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:11
1833
1758
  module I18n::Gettext::Helpers
1834
1759
  # Makes dynamic translation messages readable for the gettext parser.
1835
1760
  # <tt>_(fruit)</tt> cannot be understood by the gettext parser. To help the parser find all your translations,
@@ -1837,460 +1762,395 @@ module I18n::Gettext::Helpers
1837
1762
  # * msgid: the message id.
1838
1763
  # * Returns: msgid.
1839
1764
  #
1840
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:17
1765
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:17
1841
1766
  def N_(msgsid); end
1842
1767
 
1843
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:21
1768
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:24
1844
1769
  def _(msgid, options = T.unsafe(nil)); end
1845
1770
 
1846
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:21
1771
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:21
1847
1772
  def gettext(msgid, options = T.unsafe(nil)); end
1848
1773
 
1849
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:38
1774
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:41
1850
1775
  def n_(msgid, msgid_plural, n = T.unsafe(nil)); end
1851
1776
 
1852
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:38
1777
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:38
1853
1778
  def ngettext(msgid, msgid_plural, n = T.unsafe(nil)); end
1854
1779
 
1855
- # Method signatures:
1856
- # npgettext('Fruits', 'apple', 'apples', 2)
1857
- # npgettext('Fruits', ['apple', 'apples'], 2)
1858
- #
1859
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:61
1780
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:72
1860
1781
  def np_(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end
1861
1782
 
1862
1783
  # Method signatures:
1863
1784
  # npgettext('Fruits', 'apple', 'apples', 2)
1864
1785
  # npgettext('Fruits', ['apple', 'apples'], 2)
1865
1786
  #
1866
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:61
1787
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:61
1867
1788
  def npgettext(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end
1868
1789
 
1869
- # Method signatures:
1870
- # nsgettext('Fruits|apple', 'apples', 2)
1871
- # nsgettext(['Fruits|apple', 'apples'], 2)
1872
- #
1873
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:46
1790
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:56
1874
1791
  def ns_(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end
1875
1792
 
1876
1793
  # Method signatures:
1877
1794
  # nsgettext('Fruits|apple', 'apples', 2)
1878
1795
  # nsgettext(['Fruits|apple', 'apples'], 2)
1879
1796
  #
1880
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:46
1797
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:46
1881
1798
  def nsgettext(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end
1882
1799
 
1883
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:32
1800
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:36
1884
1801
  def p_(msgctxt, msgid); end
1885
1802
 
1886
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:32
1803
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:32
1887
1804
  def pgettext(msgctxt, msgid); end
1888
1805
 
1889
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:26
1806
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:30
1890
1807
  def s_(msgid, separator = T.unsafe(nil)); end
1891
1808
 
1892
- # source://i18n-1.12.0/lib/i18n/gettext/helpers.rb:26
1809
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:26
1893
1810
  def sgettext(msgid, separator = T.unsafe(nil)); end
1894
1811
  end
1895
1812
 
1896
- # source://i18n-1.12.0/lib/i18n/gettext.rb:5
1813
+ # pkg:gem/i18n#lib/i18n/gettext.rb:5
1897
1814
  I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String)
1898
1815
 
1899
- # source://i18n-1.12.0/lib/i18n/interpolate/ruby.rb:10
1816
+ # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:12
1900
1817
  I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp)
1901
1818
 
1902
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:124
1819
+ # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:15
1820
+ I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash)
1821
+
1822
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:132
1903
1823
  class I18n::InvalidFilenames < ::I18n::ArgumentError
1904
- # @return [InvalidFilenames] a new instance of InvalidFilenames
1905
- #
1906
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:126
1824
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:134
1907
1825
  def initialize(file_errors); end
1908
1826
  end
1909
1827
 
1910
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:125
1828
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:133
1911
1829
  I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer)
1912
1830
 
1913
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:32
1831
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:30
1914
1832
  class I18n::InvalidLocale < ::I18n::ArgumentError
1915
- # @return [InvalidLocale] a new instance of InvalidLocale
1916
- #
1917
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:34
1833
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:32
1918
1834
  def initialize(locale); end
1919
1835
 
1920
- # Returns the value of attribute locale.
1921
- #
1922
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:33
1836
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:31
1923
1837
  def locale; end
1924
1838
  end
1925
1839
 
1926
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:40
1840
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:38
1927
1841
  class I18n::InvalidLocaleData < ::I18n::ArgumentError
1928
- # @return [InvalidLocaleData] a new instance of InvalidLocaleData
1929
- #
1930
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:42
1842
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:40
1931
1843
  def initialize(filename, exception_message); end
1932
1844
 
1933
- # Returns the value of attribute filename.
1934
- #
1935
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:41
1845
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:39
1936
1846
  def filename; end
1937
1847
  end
1938
1848
 
1939
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:82
1849
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:90
1940
1850
  class I18n::InvalidPluralizationData < ::I18n::ArgumentError
1941
- # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData
1942
- #
1943
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:84
1851
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:92
1944
1852
  def initialize(entry, count, key); end
1945
1853
 
1946
- # Returns the value of attribute count.
1947
- #
1948
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:83
1854
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:91
1949
1855
  def count; end
1950
1856
 
1951
- # Returns the value of attribute entry.
1952
- #
1953
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:83
1857
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:91
1954
1858
  def entry; end
1955
1859
 
1956
- # Returns the value of attribute key.
1957
- #
1958
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:83
1860
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:91
1959
1861
  def key; end
1960
1862
  end
1961
1863
 
1962
- # source://i18n-1.12.0/lib/i18n/backend/key_value.rb:21
1963
- I18n::JSON = ActiveSupport::JSON
1964
-
1965
- # source://i18n-1.12.0/lib/i18n/locale.rb:4
1864
+ # pkg:gem/i18n#lib/i18n/locale.rb:4
1966
1865
  module I18n::Locale; end
1967
1866
 
1968
- # source://i18n-1.12.0/lib/i18n/locale/fallbacks.rb:48
1867
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:48
1969
1868
  class I18n::Locale::Fallbacks < ::Hash
1970
- # @return [Fallbacks] a new instance of Fallbacks
1971
- #
1972
- # source://i18n-1.12.0/lib/i18n/locale/fallbacks.rb:49
1869
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:49
1973
1870
  def initialize(*mappings); end
1974
1871
 
1975
- # @raise [InvalidLocale]
1976
- #
1977
- # source://i18n-1.12.0/lib/i18n/locale/fallbacks.rb:60
1872
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:60
1978
1873
  def [](locale); end
1979
1874
 
1980
- # Returns the value of attribute defaults.
1981
- #
1982
- # source://i18n-1.12.0/lib/i18n/locale/fallbacks.rb:58
1875
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:58
1983
1876
  def defaults; end
1984
1877
 
1985
- # source://i18n-1.12.0/lib/i18n/locale/fallbacks.rb:55
1878
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:55
1986
1879
  def defaults=(defaults); end
1987
1880
 
1988
- # source://i18n-1.12.0/lib/i18n/locale/fallbacks.rb:67
1881
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:82
1882
+ def empty?; end
1883
+
1884
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:86
1885
+ def inspect; end
1886
+
1887
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:67
1989
1888
  def map(*args, &block); end
1990
1889
 
1991
1890
  protected
1992
1891
 
1993
- # source://i18n-1.12.0/lib/i18n/locale/fallbacks.rb:84
1892
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:92
1994
1893
  def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end
1995
1894
  end
1996
1895
 
1997
- # source://i18n-1.12.0/lib/i18n/locale/tag.rb:5
1896
+ # pkg:gem/i18n#lib/i18n/locale/tag.rb:5
1998
1897
  module I18n::Locale::Tag
1999
1898
  class << self
2000
1899
  # Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+.
2001
1900
  #
2002
- # source://i18n-1.12.0/lib/i18n/locale/tag.rb:12
1901
+ # pkg:gem/i18n#lib/i18n/locale/tag.rb:12
2003
1902
  def implementation; end
2004
1903
 
2005
1904
  # Sets the current locale tag implementation. Use this to set a different locale tag implementation.
2006
1905
  #
2007
- # source://i18n-1.12.0/lib/i18n/locale/tag.rb:17
1906
+ # pkg:gem/i18n#lib/i18n/locale/tag.rb:17
2008
1907
  def implementation=(implementation); end
2009
1908
 
2010
1909
  # Factory method for locale tags. Delegates to the current locale tag implementation.
2011
1910
  #
2012
- # source://i18n-1.12.0/lib/i18n/locale/tag.rb:22
1911
+ # pkg:gem/i18n#lib/i18n/locale/tag.rb:22
2013
1912
  def tag(tag); end
2014
1913
  end
2015
1914
  end
2016
1915
 
2017
- # source://i18n-1.12.0/lib/i18n/locale/tag/parents.rb:4
1916
+ # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:4
2018
1917
  module I18n::Locale::Tag::Parents
2019
- # source://i18n-1.12.0/lib/i18n/locale/tag/parents.rb:5
1918
+ # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:5
2020
1919
  def parent; end
2021
1920
 
2022
- # source://i18n-1.12.0/lib/i18n/locale/tag/parents.rb:18
1921
+ # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:18
2023
1922
  def parents; end
2024
1923
 
2025
- # source://i18n-1.12.0/lib/i18n/locale/tag/parents.rb:14
1924
+ # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:14
2026
1925
  def self_and_parents; end
2027
1926
  end
2028
1927
 
2029
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:12
1928
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:12
2030
1929
  I18n::Locale::Tag::RFC4646_FORMATS = T.let(T.unsafe(nil), Hash)
2031
1930
 
2032
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:11
1931
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:11
2033
1932
  I18n::Locale::Tag::RFC4646_SUBTAGS = T.let(T.unsafe(nil), Array)
2034
1933
 
2035
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:14
1934
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:14
2036
1935
  class I18n::Locale::Tag::Rfc4646 < ::Struct
2037
1936
  include ::I18n::Locale::Tag::Parents
2038
1937
 
2039
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:35
1938
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35
2040
1939
  def language; end
2041
1940
 
2042
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:35
1941
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35
2043
1942
  def region; end
2044
1943
 
2045
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:35
1944
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35
2046
1945
  def script; end
2047
1946
 
2048
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:46
1947
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:46
2049
1948
  def to_a; end
2050
1949
 
2051
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:42
1950
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:42
2052
1951
  def to_s; end
2053
1952
 
2054
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:38
1953
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:38
2055
1954
  def to_sym; end
2056
1955
 
2057
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:35
1956
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35
2058
1957
  def variant; end
2059
1958
 
2060
1959
  class << self
2061
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:23
1960
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:23
2062
1961
  def parser; end
2063
1962
 
2064
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:27
1963
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:27
2065
1964
  def parser=(parser); end
2066
1965
 
2067
1966
  # Parses the given tag and returns a Tag instance if it is valid.
2068
1967
  # Returns false if the given tag is not valid according to RFC 4646.
2069
1968
  #
2070
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:18
1969
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:18
2071
1970
  def tag(tag); end
2072
1971
  end
2073
1972
  end
2074
1973
 
2075
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:50
1974
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:50
2076
1975
  module I18n::Locale::Tag::Rfc4646::Parser
2077
1976
  class << self
2078
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:63
1977
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:63
2079
1978
  def match(tag); end
2080
1979
  end
2081
1980
  end
2082
1981
 
2083
- # source://i18n-1.12.0/lib/i18n/locale/tag/rfc4646.rb:51
1982
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:51
2084
1983
  I18n::Locale::Tag::Rfc4646::Parser::PATTERN = T.let(T.unsafe(nil), Regexp)
2085
1984
 
2086
- # source://i18n-1.12.0/lib/i18n/locale/tag/simple.rb:6
1985
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:6
2087
1986
  class I18n::Locale::Tag::Simple
2088
1987
  include ::I18n::Locale::Tag::Parents
2089
1988
 
2090
- # @return [Simple] a new instance of Simple
2091
- #
2092
- # source://i18n-1.12.0/lib/i18n/locale/tag/simple.rb:17
1989
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:17
2093
1990
  def initialize(*tag); end
2094
1991
 
2095
- # source://i18n-1.12.0/lib/i18n/locale/tag/simple.rb:21
1992
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:21
2096
1993
  def subtags; end
2097
1994
 
2098
- # Returns the value of attribute tag.
2099
- #
2100
- # source://i18n-1.12.0/lib/i18n/locale/tag/simple.rb:15
1995
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:15
2101
1996
  def tag; end
2102
1997
 
2103
- # source://i18n-1.12.0/lib/i18n/locale/tag/simple.rb:33
1998
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:33
2104
1999
  def to_a; end
2105
2000
 
2106
- # source://i18n-1.12.0/lib/i18n/locale/tag/simple.rb:29
2001
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:29
2107
2002
  def to_s; end
2108
2003
 
2109
- # source://i18n-1.12.0/lib/i18n/locale/tag/simple.rb:25
2004
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:25
2110
2005
  def to_sym; end
2111
2006
 
2112
2007
  class << self
2113
- # source://i18n-1.12.0/lib/i18n/locale/tag/simple.rb:8
2008
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:8
2114
2009
  def tag(tag); end
2115
2010
  end
2116
2011
  end
2117
2012
 
2118
- # source://i18n-1.12.0/lib/i18n/middleware.rb:4
2013
+ # pkg:gem/i18n#lib/i18n/middleware.rb:4
2119
2014
  class I18n::Middleware
2120
- # @return [Middleware] a new instance of Middleware
2121
- #
2122
- # source://i18n-1.12.0/lib/i18n/middleware.rb:6
2015
+ # pkg:gem/i18n#lib/i18n/middleware.rb:6
2123
2016
  def initialize(app); end
2124
2017
 
2125
- # source://i18n-1.12.0/lib/i18n/middleware.rb:10
2018
+ # pkg:gem/i18n#lib/i18n/middleware.rb:10
2126
2019
  def call(env); end
2127
2020
  end
2128
2021
 
2129
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:90
2022
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:98
2130
2023
  class I18n::MissingInterpolationArgument < ::I18n::ArgumentError
2131
- # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument
2132
- #
2133
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:92
2024
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:100
2134
2025
  def initialize(key, values, string); end
2135
2026
 
2136
- # Returns the value of attribute key.
2137
- #
2138
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:91
2027
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:99
2139
2028
  def key; end
2140
2029
 
2141
- # Returns the value of attribute string.
2142
- #
2143
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:91
2030
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:99
2144
2031
  def string; end
2145
2032
 
2146
- # Returns the value of attribute values.
2147
- #
2148
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:91
2033
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:99
2149
2034
  def values; end
2150
2035
  end
2151
2036
 
2152
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:48
2037
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:46
2153
2038
  class I18n::MissingTranslation < ::I18n::ArgumentError
2154
2039
  include ::I18n::MissingTranslation::Base
2155
2040
  end
2156
2041
 
2157
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:49
2042
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:47
2158
2043
  module I18n::MissingTranslation::Base
2159
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:54
2044
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:52
2160
2045
  def initialize(locale, key, options = T.unsafe(nil)); end
2161
2046
 
2162
- # Returns the value of attribute key.
2163
- #
2164
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:52
2047
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:50
2165
2048
  def key; end
2166
2049
 
2167
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:59
2050
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:57
2168
2051
  def keys; end
2169
2052
 
2170
- # Returns the value of attribute locale.
2171
- #
2172
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:52
2053
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:50
2173
2054
  def locale; end
2174
2055
 
2175
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:65
2056
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:63
2176
2057
  def message; end
2177
2058
 
2178
- # Returns the value of attribute options.
2179
- #
2180
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:52
2059
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:72
2060
+ def normalized_option(key); end
2061
+
2062
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:50
2181
2063
  def options; end
2182
2064
 
2183
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:70
2065
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:78
2184
2066
  def to_exception; end
2185
2067
 
2186
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:65
2068
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:76
2187
2069
  def to_s; end
2188
2070
  end
2189
2071
 
2190
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:50
2072
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:48
2191
2073
  I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array)
2192
2074
 
2193
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:78
2075
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:86
2194
2076
  class I18n::MissingTranslationData < ::I18n::ArgumentError
2195
2077
  include ::I18n::MissingTranslation::Base
2196
2078
  end
2197
2079
 
2198
- # source://i18n-1.12.0/lib/i18n.rb:19
2080
+ # pkg:gem/i18n#lib/i18n.rb:19
2199
2081
  I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array)
2200
2082
 
2201
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:98
2083
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:106
2202
2084
  class I18n::ReservedInterpolationKey < ::I18n::ArgumentError
2203
- # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey
2204
- #
2205
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:100
2085
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:108
2206
2086
  def initialize(key, string); end
2207
2087
 
2208
- # Returns the value of attribute key.
2209
- #
2210
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:99
2088
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:107
2211
2089
  def key; end
2212
2090
 
2213
- # Returns the value of attribute string.
2214
- #
2215
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:99
2091
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:107
2216
2092
  def string; end
2217
2093
  end
2218
2094
 
2219
- # source://i18n-1.12.0/lib/i18n/tests.rb:4
2095
+ # pkg:gem/i18n#lib/i18n/tests.rb:4
2220
2096
  module I18n::Tests; end
2221
2097
 
2222
- # source://i18n-1.12.0/lib/i18n/tests/localization.rb:3
2098
+ # pkg:gem/i18n#lib/i18n/tests/localization.rb:3
2223
2099
  module I18n::Tests::Localization
2224
2100
  class << self
2225
- # @private
2226
- #
2227
- # source://i18n-1.12.0/lib/i18n/tests/localization.rb:9
2101
+ # pkg:gem/i18n#lib/i18n/tests/localization.rb:9
2228
2102
  def included(base); end
2229
2103
  end
2230
2104
  end
2231
2105
 
2232
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:106
2106
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:114
2233
2107
  class I18n::UnknownFileType < ::I18n::ArgumentError
2234
- # @return [UnknownFileType] a new instance of UnknownFileType
2235
- #
2236
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:108
2108
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:116
2237
2109
  def initialize(type, filename); end
2238
2110
 
2239
- # Returns the value of attribute filename.
2240
- #
2241
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:107
2111
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:115
2242
2112
  def filename; end
2243
2113
 
2244
- # Returns the value of attribute type.
2245
- #
2246
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:107
2114
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:115
2247
2115
  def type; end
2248
2116
  end
2249
2117
 
2250
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:114
2118
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:122
2251
2119
  class I18n::UnsupportedMethod < ::I18n::ArgumentError
2252
- # @return [UnsupportedMethod] a new instance of UnsupportedMethod
2253
- #
2254
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:116
2120
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:124
2255
2121
  def initialize(method, backend_klass, msg); end
2256
2122
 
2257
- # Returns the value of attribute backend_klass.
2258
- #
2259
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:115
2123
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:123
2260
2124
  def backend_klass; end
2261
2125
 
2262
- # Returns the value of attribute method.
2263
- #
2264
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:115
2126
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:123
2265
2127
  def method; end
2266
2128
 
2267
- # Returns the value of attribute msg.
2268
- #
2269
- # source://i18n-1.12.0/lib/i18n/exceptions.rb:115
2129
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:123
2270
2130
  def msg; end
2271
2131
  end
2272
2132
 
2273
- # source://i18n-1.12.0/lib/i18n/utils.rb:4
2133
+ # pkg:gem/i18n#lib/i18n/utils.rb:4
2274
2134
  module I18n::Utils
2275
2135
  class << self
2276
- # source://i18n-1.12.0/lib/i18n/utils.rb:18
2136
+ # pkg:gem/i18n#lib/i18n/utils.rb:18
2277
2137
  def deep_merge(hash, other_hash, &block); end
2278
2138
 
2279
- # source://i18n-1.12.0/lib/i18n/utils.rb:22
2139
+ # pkg:gem/i18n#lib/i18n/utils.rb:22
2280
2140
  def deep_merge!(hash, other_hash, &block); end
2281
2141
 
2282
- # source://i18n-1.12.0/lib/i18n/utils.rb:34
2142
+ # pkg:gem/i18n#lib/i18n/utils.rb:34
2283
2143
  def deep_symbolize_keys(hash); end
2284
2144
 
2285
- # source://i18n-1.12.0/lib/i18n/utils.rb:7
2145
+ # pkg:gem/i18n#lib/i18n/utils.rb:7
2286
2146
  def except(hash, *keys); end
2287
2147
 
2288
2148
  private
2289
2149
 
2290
- # source://i18n-1.12.0/lib/i18n/utils.rb:43
2150
+ # pkg:gem/i18n#lib/i18n/utils.rb:43
2291
2151
  def deep_symbolize_keys_in_object(value); end
2292
2152
  end
2293
2153
  end
2294
2154
 
2295
- # source://i18n-1.12.0/lib/i18n/version.rb:4
2155
+ # pkg:gem/i18n#lib/i18n/version.rb:4
2296
2156
  I18n::VERSION = T.let(T.unsafe(nil), String)