privat_bank_business_api 0.2.1

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 (102) hide show
  1. checksums.yaml +7 -0
  2. data/.devcontainer/Dockerfile +17 -0
  3. data/.devcontainer/devcontainer.json +33 -0
  4. data/.devcontainer/post-create.sh +8 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +9 -0
  7. data/.vscode/settings.json +6 -0
  8. data/CHANGELOG.md +12 -0
  9. data/CODE_OF_CONDUCT.md +132 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +123 -0
  12. data/Rakefile +12 -0
  13. data/lib/pb_api/base_transformer.rb +19 -0
  14. data/lib/pb_api/client.rb +41 -0
  15. data/lib/pb_api/models/balance.rb +79 -0
  16. data/lib/pb_api/models/base_struct.rb +30 -0
  17. data/lib/pb_api/models/transaction.rb +114 -0
  18. data/lib/pb_api/pagination_helper.rb +73 -0
  19. data/lib/pb_api/resource.rb +97 -0
  20. data/lib/pb_api/resources/balance_resource.rb +40 -0
  21. data/lib/pb_api/resources/transaction_resource.rb +105 -0
  22. data/lib/pb_api/transformers/balance_transformer.rb +35 -0
  23. data/lib/pb_api/transformers/transaction_transformer.rb +46 -0
  24. data/lib/pb_api/types.rb +8 -0
  25. data/lib/pb_api/version.rb +5 -0
  26. data/lib/pb_api.rb +34 -0
  27. data/sig/privat_bank_buisness_api.rbs +4 -0
  28. data/sorbet/config +4 -0
  29. data/sorbet/rbi/annotations/.gitattributes +1 -0
  30. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  31. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  32. data/sorbet/rbi/gems/.gitattributes +1 -0
  33. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  34. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
  35. data/sorbet/rbi/gems/bigdecimal@3.1.9.rbi +9 -0
  36. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +9 -0
  37. data/sorbet/rbi/gems/date@3.4.1.rbi +75 -0
  38. data/sorbet/rbi/gems/diff-lcs@1.6.0.rbi +1134 -0
  39. data/sorbet/rbi/gems/dry-core@1.1.0.rbi +9 -0
  40. data/sorbet/rbi/gems/dry-inflector@1.2.0.rbi +9 -0
  41. data/sorbet/rbi/gems/dry-logic@1.6.0.rbi +9 -0
  42. data/sorbet/rbi/gems/dry-struct@1.7.1.rbi +925 -0
  43. data/sorbet/rbi/gems/dry-transformer@1.0.1.rbi +1512 -0
  44. data/sorbet/rbi/gems/dry-types@1.8.2.rbi +9 -0
  45. data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
  46. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +9 -0
  47. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +9 -0
  48. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +9 -0
  49. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +9 -0
  50. data/sorbet/rbi/gems/faraday-multipart@1.1.0.rbi +9 -0
  51. data/sorbet/rbi/gems/faraday-net_http@1.0.2.rbi +9 -0
  52. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +9 -0
  53. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +9 -0
  54. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +9 -0
  55. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +9 -0
  56. data/sorbet/rbi/gems/faraday@1.10.4.rbi +9 -0
  57. data/sorbet/rbi/gems/faraday_middleware@1.2.1.rbi +9 -0
  58. data/sorbet/rbi/gems/i18n@1.14.7.rbi +2208 -0
  59. data/sorbet/rbi/gems/ice_nine@0.11.2.rbi +9 -0
  60. data/sorbet/rbi/gems/io-console@0.8.0.rbi +9 -0
  61. data/sorbet/rbi/gems/json@2.10.1.rbi +2120 -0
  62. data/sorbet/rbi/gems/language_server-protocol@3.17.0.4.rbi +9 -0
  63. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +86 -0
  64. data/sorbet/rbi/gems/logger@1.6.6.rbi +940 -0
  65. data/sorbet/rbi/gems/money@6.19.0.rbi +2260 -0
  66. data/sorbet/rbi/gems/multipart-post@2.4.1.rbi +9 -0
  67. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  68. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  69. data/sorbet/rbi/gems/parser@3.3.7.1.rbi +5525 -0
  70. data/sorbet/rbi/gems/pp@0.6.2.rbi +368 -0
  71. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +477 -0
  72. data/sorbet/rbi/gems/prism@1.3.0.rbi +41403 -0
  73. data/sorbet/rbi/gems/psych@5.2.3.rbi +2435 -0
  74. data/sorbet/rbi/gems/racc@1.8.1.rbi +164 -0
  75. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  76. data/sorbet/rbi/gems/rake@13.2.1.rbi +3028 -0
  77. data/sorbet/rbi/gems/rbi@0.2.4.rbi +4542 -0
  78. data/sorbet/rbi/gems/rdoc@6.12.0.rbi +12758 -0
  79. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3795 -0
  80. data/sorbet/rbi/gems/reline@0.6.0.rbi +2451 -0
  81. data/sorbet/rbi/gems/rspec-core@3.13.3.rbi +10986 -0
  82. data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +8183 -0
  83. data/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi +5341 -0
  84. data/sorbet/rbi/gems/rspec-support@3.13.2.rbi +1630 -0
  85. data/sorbet/rbi/gems/rspec@3.13.0.rbi +83 -0
  86. data/sorbet/rbi/gems/rubocop-ast@1.38.0.rbi +7654 -0
  87. data/sorbet/rbi/gems/rubocop@1.72.2.rbi +61026 -0
  88. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  89. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  90. data/sorbet/rbi/gems/spoom@1.5.4.rbi +5026 -0
  91. data/sorbet/rbi/gems/stringio@3.1.5.rbi +9 -0
  92. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +3656 -0
  93. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  94. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +132 -0
  95. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
  96. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  97. data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
  98. data/sorbet/rbi/gems/zeitwerk@2.7.2.rbi +9 -0
  99. data/sorbet/rbi/todo.rbi +17 -0
  100. data/sorbet/tapioca/config.yml +13 -0
  101. data/sorbet/tapioca/require.rb +8 -0
  102. metadata +231 -0
@@ -0,0 +1,2208 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `i18n` gem.
5
+ # Please instead update this file by running `bin/tapioca gem i18n`.
6
+
7
+
8
+ # source://i18n//lib/i18n/gettext/po_parser.rb#15
9
+ module GetText; end
10
+
11
+ # source://i18n//lib/i18n/gettext/po_parser.rb#17
12
+ class GetText::PoParser < ::Racc::Parser
13
+ # source://i18n//lib/i18n/gettext/po_parser.rb#19
14
+ def _(x); end
15
+
16
+ def _reduce_10(val, _values, result); end
17
+ def _reduce_12(val, _values, result); end
18
+ def _reduce_13(val, _values, result); end
19
+ def _reduce_14(val, _values, result); end
20
+ def _reduce_15(val, _values, result); end
21
+ def _reduce_5(val, _values, result); end
22
+ def _reduce_8(val, _values, result); end
23
+ def _reduce_9(val, _values, result); end
24
+
25
+ # source://i18n//lib/i18n/gettext/po_parser.rb#323
26
+ def _reduce_none(val, _values, result); end
27
+
28
+ def next_token; end
29
+ def on_comment(comment); end
30
+ def on_message(msgid, msgstr); end
31
+ def parse(str, data, ignore_fuzzy = T.unsafe(nil)); end
32
+ def unescape(orig); end
33
+ end
34
+
35
+ # source://i18n//lib/i18n/gettext/po_parser.rb#184
36
+ GetText::PoParser::Racc_arg = T.let(T.unsafe(nil), Array)
37
+
38
+ # source://i18n//lib/i18n/gettext/po_parser.rb#221
39
+ GetText::PoParser::Racc_debug_parser = T.let(T.unsafe(nil), TrueClass)
40
+
41
+ # source://i18n//lib/i18n/gettext/po_parser.rb#200
42
+ GetText::PoParser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
43
+
44
+ # Simple Locale tag implementation that computes subtags by simply splitting
45
+ # the locale tag at '-' occurrences.
46
+ #
47
+ # source://i18n//lib/i18n/version.rb#3
48
+ module I18n
49
+ extend ::I18n::Base
50
+
51
+ class << self
52
+ # source://i18n//lib/i18n/backend/cache.rb#64
53
+ def cache_key_digest; end
54
+
55
+ # source://i18n//lib/i18n/backend/cache.rb#68
56
+ def cache_key_digest=(key_digest); end
57
+
58
+ # source://i18n//lib/i18n/backend/cache.rb#56
59
+ def cache_namespace; end
60
+
61
+ # source://i18n//lib/i18n/backend/cache.rb#60
62
+ def cache_namespace=(namespace); end
63
+
64
+ # source://i18n//lib/i18n/backend/cache.rb#48
65
+ def cache_store; end
66
+
67
+ # source://i18n//lib/i18n/backend/cache.rb#52
68
+ def cache_store=(store); end
69
+
70
+ # Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+.
71
+ #
72
+ # source://i18n//lib/i18n/backend/fallbacks.rb#17
73
+ def fallbacks; end
74
+
75
+ # Sets the current fallbacks implementation. Use this to set a different fallbacks implementation.
76
+ #
77
+ # source://i18n//lib/i18n/backend/fallbacks.rb#23
78
+ def fallbacks=(fallbacks); end
79
+
80
+ # Return String or raises MissingInterpolationArgument exception.
81
+ # Missing argument's logic is handled by I18n.config.missing_interpolation_argument_handler.
82
+ #
83
+ # @raise [ReservedInterpolationKey]
84
+ #
85
+ # source://i18n//lib/i18n/interpolate/ruby.rb#23
86
+ def interpolate(string, values); end
87
+
88
+ # source://i18n//lib/i18n/interpolate/ruby.rb#29
89
+ def interpolate_hash(string, values); end
90
+
91
+ # source://i18n//lib/i18n.rb#38
92
+ def new_double_nested_cache; end
93
+
94
+ # @return [Boolean]
95
+ #
96
+ # source://i18n//lib/i18n/backend/cache.rb#72
97
+ def perform_caching?; end
98
+
99
+ # Marks a key as reserved. Reserved keys are used internally,
100
+ # and can't also be used for interpolation. If you are using any
101
+ # extra keys as I18n options, you should call I18n.reserve_key
102
+ # before any I18n.translate (etc) calls are made.
103
+ #
104
+ # source://i18n//lib/i18n.rb#46
105
+ def reserve_key(key); end
106
+
107
+ # source://i18n//lib/i18n.rb#51
108
+ def reserved_keys_pattern; end
109
+ end
110
+ end
111
+
112
+ # source://i18n//lib/i18n/exceptions.rb#16
113
+ class I18n::ArgumentError < ::ArgumentError; end
114
+
115
+ # source://i18n//lib/i18n/backend.rb#4
116
+ module I18n::Backend; end
117
+
118
+ # source://i18n//lib/i18n/backend/base.rb#8
119
+ module I18n::Backend::Base
120
+ include ::I18n::Backend::Transliterator
121
+
122
+ # Returns an array of locales for which translations are available
123
+ # ignoring the reserved translation meta data key :i18n.
124
+ #
125
+ # @raise [NotImplementedError]
126
+ #
127
+ # source://i18n//lib/i18n/backend/base.rb#97
128
+ def available_locales; end
129
+
130
+ # source://i18n//lib/i18n/backend/base.rb#105
131
+ def eager_load!; end
132
+
133
+ # @return [Boolean]
134
+ #
135
+ # source://i18n//lib/i18n/backend/base.rb#71
136
+ def exists?(locale, key, options = T.unsafe(nil)); end
137
+
138
+ # Accepts a list of paths to translation files. Loads translations from
139
+ # plain Ruby (*.rb), YAML files (*.yml), or JSON files (*.json). See #load_rb, #load_yml, and #load_json
140
+ # for details.
141
+ #
142
+ # source://i18n//lib/i18n/backend/base.rb#14
143
+ def load_translations(*filenames); end
144
+
145
+ # Acts the same as +strftime+, but uses a localized version of the
146
+ # format string. Takes a key from the date/time formats translations as
147
+ # a format argument (<em>e.g.</em>, <tt>:short</tt> in <tt>:'date.formats'</tt>).
148
+ #
149
+ # @raise [ArgumentError]
150
+ #
151
+ # source://i18n//lib/i18n/backend/base.rb#78
152
+ def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
153
+
154
+ # source://i18n//lib/i18n/backend/base.rb#101
155
+ def reload!; end
156
+
157
+ # This method receives a locale, a data hash and options for storing translations.
158
+ # Should be implemented
159
+ #
160
+ # @raise [NotImplementedError]
161
+ #
162
+ # source://i18n//lib/i18n/backend/base.rb#24
163
+ def store_translations(locale, data, options = T.unsafe(nil)); end
164
+
165
+ # @raise [I18n::ArgumentError]
166
+ #
167
+ # source://i18n//lib/i18n/backend/base.rb#28
168
+ def translate(locale, key, options = T.unsafe(nil)); end
169
+
170
+ protected
171
+
172
+ # Deep interpolation
173
+ #
174
+ # deep_interpolate { people: { ann: "Ann is %{ann}", john: "John is %{john}" } },
175
+ # ann: 'good', john: 'big'
176
+ # #=> { people: { ann: "Ann is good", john: "John is big" } }
177
+ #
178
+ # source://i18n//lib/i18n/backend/base.rb#217
179
+ def deep_interpolate(locale, data, values = T.unsafe(nil)); end
180
+
181
+ # Evaluates defaults.
182
+ # If given subject is an Array, it walks the array and returns the
183
+ # first translation that can be resolved. Otherwise it tries to resolve
184
+ # the translation directly.
185
+ #
186
+ # source://i18n//lib/i18n/backend/base.rb#128
187
+ def default(locale, object, subject, options = T.unsafe(nil)); end
188
+
189
+ # @return [Boolean]
190
+ #
191
+ # source://i18n//lib/i18n/backend/base.rb#111
192
+ def eager_loaded?; end
193
+
194
+ # Interpolates values into a given subject.
195
+ #
196
+ # if the given subject is a string then:
197
+ # method interpolates "file %{file} opened by %%{user}", :file => 'test.txt', :user => 'Mr. X'
198
+ # # => "file test.txt opened by %{user}"
199
+ #
200
+ # if the given subject is an array then:
201
+ # each element of the array is recursively interpolated (until it finds a string)
202
+ # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz"
203
+ # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]]
204
+ #
205
+ # source://i18n//lib/i18n/backend/base.rb#201
206
+ def interpolate(locale, subject, values = T.unsafe(nil)); end
207
+
208
+ # Loads a single translations file by delegating to #load_rb or
209
+ # #load_yml depending on the file extension and directly merges the
210
+ # data to the existing translations. Raises I18n::UnknownFileType
211
+ # for all other file extensions.
212
+ #
213
+ # @raise [UnknownFileType]
214
+ #
215
+ # source://i18n//lib/i18n/backend/base.rb#240
216
+ def load_file(filename); end
217
+
218
+ # Loads a JSON translations file. The data must have locales as
219
+ # toplevel keys.
220
+ #
221
+ # source://i18n//lib/i18n/backend/base.rb#276
222
+ def load_json(filename); end
223
+
224
+ # Loads a plain Ruby translations file. eval'ing the file must yield
225
+ # a Hash containing translation data with locales as toplevel keys.
226
+ #
227
+ # source://i18n//lib/i18n/backend/base.rb#254
228
+ def load_rb(filename); end
229
+
230
+ # Loads a YAML translations file. The data must have locales as
231
+ # toplevel keys.
232
+ #
233
+ # source://i18n//lib/i18n/backend/base.rb#261
234
+ def load_yaml(filename); end
235
+
236
+ # Loads a YAML translations file. The data must have locales as
237
+ # toplevel keys.
238
+ #
239
+ # source://i18n//lib/i18n/backend/base.rb#261
240
+ def load_yml(filename); end
241
+
242
+ # The method which actually looks up for the translation in the store.
243
+ #
244
+ # @raise [NotImplementedError]
245
+ #
246
+ # source://i18n//lib/i18n/backend/base.rb#116
247
+ def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
248
+
249
+ # source://i18n//lib/i18n/backend/base.rb#308
250
+ def pluralization_key(entry, count); end
251
+
252
+ # Picks a translation from a pluralized mnemonic subkey according to English
253
+ # pluralization rules :
254
+ # - It will pick the :one subkey if count is equal to 1.
255
+ # - It will pick the :other subkey otherwise.
256
+ # - It will pick the :zero subkey in the special case where count is
257
+ # equal to 0 and there is a :zero subkey present. This behaviour is
258
+ # not standard with regards to the CLDR pluralization rules.
259
+ # Other backends can implement more flexible or complex pluralization rules.
260
+ #
261
+ # @raise [InvalidPluralizationData]
262
+ #
263
+ # source://i18n//lib/i18n/backend/base.rb#182
264
+ def pluralize(locale, entry, count); end
265
+
266
+ # Resolves a translation.
267
+ # If the given subject is a Symbol, it will be translated with the
268
+ # given options. If it is a Proc then it will be evaluated. All other
269
+ # subjects will be returned directly.
270
+ #
271
+ # source://i18n//lib/i18n/backend/base.rb#150
272
+ def resolve(locale, object, subject, options = T.unsafe(nil)); end
273
+
274
+ # Resolves a translation.
275
+ # If the given subject is a Symbol, it will be translated with the
276
+ # given options. If it is a Proc then it will be evaluated. All other
277
+ # subjects will be returned directly.
278
+ #
279
+ # source://i18n//lib/i18n/backend/base.rb#150
280
+ def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end
281
+
282
+ # @return [Boolean]
283
+ #
284
+ # source://i18n//lib/i18n/backend/base.rb#120
285
+ def subtrees?; end
286
+
287
+ # source://i18n//lib/i18n/backend/base.rb#289
288
+ def translate_localization_format(locale, object, format, options); end
289
+ end
290
+
291
+ # TODO Should the cache be cleared if new translations are stored?
292
+ #
293
+ # source://i18n//lib/i18n/backend/cache.rb#79
294
+ module I18n::Backend::Cache
295
+ # source://i18n//lib/i18n/backend/cache.rb#80
296
+ def translate(locale, key, options = T.unsafe(nil)); end
297
+
298
+ protected
299
+
300
+ # source://i18n//lib/i18n/backend/cache.rb#93
301
+ def _fetch(cache_key, &block); end
302
+
303
+ # source://i18n//lib/i18n/backend/cache.rb#101
304
+ def cache_key(locale, key, options); end
305
+
306
+ # source://i18n//lib/i18n/backend/cache.rb#86
307
+ def fetch(cache_key, &block); end
308
+
309
+ private
310
+
311
+ # source://i18n//lib/i18n/backend/cache.rb#108
312
+ def digest_item(key); end
313
+ end
314
+
315
+ # Overwrites the Base load_file method to cache loaded file contents.
316
+ #
317
+ # source://i18n//lib/i18n/backend/cache_file.rb#8
318
+ module I18n::Backend::CacheFile
319
+ # Optionally provide path_roots array to normalize filename paths,
320
+ # to make the cached i18n data portable across environments.
321
+ #
322
+ # source://i18n//lib/i18n/backend/cache_file.rb#11
323
+ def path_roots; end
324
+
325
+ # Optionally provide path_roots array to normalize filename paths,
326
+ # to make the cached i18n data portable across environments.
327
+ #
328
+ # source://i18n//lib/i18n/backend/cache_file.rb#11
329
+ def path_roots=(_arg0); end
330
+
331
+ protected
332
+
333
+ # Track loaded translation files in the `i18n.load_file` scope,
334
+ # and skip loading the file if its contents are still up-to-date.
335
+ #
336
+ # source://i18n//lib/i18n/backend/cache_file.rb#17
337
+ def load_file(filename); end
338
+
339
+ # Translate absolute filename to relative path for i18n key.
340
+ #
341
+ # source://i18n//lib/i18n/backend/cache_file.rb#28
342
+ def normalized_path(file); end
343
+ end
344
+
345
+ # source://i18n//lib/i18n/backend/cascade.rb#35
346
+ module I18n::Backend::Cascade
347
+ # source://i18n//lib/i18n/backend/cascade.rb#36
348
+ def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
349
+ end
350
+
351
+ # Backend that chains multiple other backends and checks each of them when
352
+ # a translation needs to be looked up. This is useful when you want to use
353
+ # standard translations with a Simple backend but store custom application
354
+ # translations in a database or other backends.
355
+ #
356
+ # To use the Chain backend instantiate it and set it to the I18n module.
357
+ # You can add chained backends through the initializer or backends
358
+ # accessor:
359
+ #
360
+ # # preserves the existing Simple backend set to I18n.backend
361
+ # I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend)
362
+ #
363
+ # The implementation assumes that all backends added to the Chain implement
364
+ # a lookup method with the same API as Simple backend does.
365
+ #
366
+ # Fallback translations using the :default option are only used by the last backend of a chain.
367
+ #
368
+ # source://i18n//lib/i18n/backend/chain.rb#21
369
+ class I18n::Backend::Chain
370
+ include ::I18n::Backend::Transliterator
371
+ include ::I18n::Backend::Base
372
+ include ::I18n::Backend::Chain::Implementation
373
+ end
374
+
375
+ # source://i18n//lib/i18n/backend/chain.rb#22
376
+ module I18n::Backend::Chain::Implementation
377
+ include ::I18n::Backend::Transliterator
378
+ include ::I18n::Backend::Base
379
+
380
+ # source://i18n//lib/i18n/backend/chain.rb#27
381
+ def initialize(*backends); end
382
+
383
+ # source://i18n//lib/i18n/backend/chain.rb#52
384
+ def available_locales; end
385
+
386
+ # Returns the value of attribute backends.
387
+ #
388
+ # source://i18n//lib/i18n/backend/chain.rb#25
389
+ def backends; end
390
+
391
+ # Sets the attribute backends
392
+ #
393
+ # @param value the value to set the attribute backends to.
394
+ #
395
+ # source://i18n//lib/i18n/backend/chain.rb#25
396
+ def backends=(_arg0); end
397
+
398
+ # source://i18n//lib/i18n/backend/chain.rb#44
399
+ def eager_load!; end
400
+
401
+ # @return [Boolean]
402
+ #
403
+ # source://i18n//lib/i18n/backend/chain.rb#76
404
+ def exists?(locale, key, options = T.unsafe(nil)); end
405
+
406
+ # @return [Boolean]
407
+ #
408
+ # source://i18n//lib/i18n/backend/chain.rb#31
409
+ def initialized?; end
410
+
411
+ # source://i18n//lib/i18n/backend/chain.rb#82
412
+ def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
413
+
414
+ # source://i18n//lib/i18n/backend/chain.rb#40
415
+ def reload!; end
416
+
417
+ # source://i18n//lib/i18n/backend/chain.rb#48
418
+ def store_translations(locale, data, options = T.unsafe(nil)); end
419
+
420
+ # source://i18n//lib/i18n/backend/chain.rb#56
421
+ def translate(locale, key, default_options = T.unsafe(nil)); end
422
+
423
+ protected
424
+
425
+ # source://i18n//lib/i18n/backend/chain.rb#92
426
+ def init_translations; end
427
+
428
+ # @return [Boolean]
429
+ #
430
+ # source://i18n//lib/i18n/backend/chain.rb#108
431
+ def namespace_lookup?(result, options); end
432
+
433
+ # source://i18n//lib/i18n/backend/chain.rb#98
434
+ def translations; end
435
+
436
+ private
437
+
438
+ # This is approximately what gets used in ActiveSupport.
439
+ # However since we are not guaranteed to run in an ActiveSupport context
440
+ # it is wise to have our own copy. We underscore it
441
+ # to not pollute the namespace of the including class.
442
+ #
443
+ # source://i18n//lib/i18n/backend/chain.rb#117
444
+ def _deep_merge(hash, other_hash); end
445
+ end
446
+
447
+ # source://i18n//lib/i18n/backend/fallbacks.rb#30
448
+ module I18n::Backend::Fallbacks
449
+ # @return [Boolean]
450
+ #
451
+ # source://i18n//lib/i18n/backend/fallbacks.rb#98
452
+ def exists?(locale, key, options = T.unsafe(nil)); end
453
+
454
+ # source://i18n//lib/i18n/backend/fallbacks.rb#89
455
+ def extract_non_symbol_default!(options); end
456
+
457
+ # source://i18n//lib/i18n/backend/fallbacks.rb#67
458
+ def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end
459
+
460
+ # Overwrites the Base backend translate method so that it will try each
461
+ # locale given by I18n.fallbacks for the given locale. E.g. for the
462
+ # locale :"de-DE" it might try the locales :"de-DE", :de and :en
463
+ # (depends on the fallbacks implementation) until it finds a result with
464
+ # the given options. If it does not find any result for any of the
465
+ # locales it will then throw MissingTranslation as usual.
466
+ #
467
+ # The default option takes precedence over fallback locales only when
468
+ # it's a Symbol. When the default contains a String, Proc or Hash
469
+ # it is evaluated last after all the fallback locales have been tried.
470
+ #
471
+ # source://i18n//lib/i18n/backend/fallbacks.rb#41
472
+ def translate(locale, key, options = T.unsafe(nil)); end
473
+
474
+ private
475
+
476
+ # Overwrite on_fallback to add specified logic when the fallback succeeds.
477
+ #
478
+ # source://i18n//lib/i18n/backend/fallbacks.rb#114
479
+ def on_fallback(_original_locale, _fallback_locale, _key, _options); end
480
+ end
481
+
482
+ # This module contains several helpers to assist flattening translations.
483
+ # You may want to flatten translations for:
484
+ #
485
+ # 1) speed up lookups, as in the Memoize backend;
486
+ # 2) In case you want to store translations in a data store, as in ActiveRecord backend;
487
+ #
488
+ # You can check both backends above for some examples.
489
+ # This module also keeps all links in a hash so they can be properly resolved when flattened.
490
+ #
491
+ # source://i18n//lib/i18n/backend/flatten.rb#13
492
+ module I18n::Backend::Flatten
493
+ # Flatten keys for nested Hashes by chaining up keys:
494
+ #
495
+ # >> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind
496
+ # => { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" }
497
+ #
498
+ # source://i18n//lib/i18n/backend/flatten.rb#59
499
+ def flatten_keys(hash, escape, prev_key = T.unsafe(nil), &block); end
500
+
501
+ # Receives a hash of translations (where the key is a locale and
502
+ # the value is another hash) and return a hash with all
503
+ # translations flattened.
504
+ #
505
+ # Nested hashes are included in the flattened hash just if subtree
506
+ # is true and Symbols are automatically stored as links.
507
+ #
508
+ # source://i18n//lib/i18n/backend/flatten.rb#74
509
+ def flatten_translations(locale, data, escape, subtree); end
510
+
511
+ # Store flattened links.
512
+ #
513
+ # source://i18n//lib/i18n/backend/flatten.rb#50
514
+ def links; end
515
+
516
+ # Shortcut to I18n::Backend::Flatten.normalize_flat_keys
517
+ # and then resolve_links.
518
+ #
519
+ # source://i18n//lib/i18n/backend/flatten.rb#44
520
+ def normalize_flat_keys(locale, key, scope, separator); end
521
+
522
+ protected
523
+
524
+ # source://i18n//lib/i18n/backend/flatten.rb#112
525
+ def escape_default_separator(key); end
526
+
527
+ # source://i18n//lib/i18n/backend/flatten.rb#106
528
+ def find_link(locale, key); end
529
+
530
+ # source://i18n//lib/i18n/backend/flatten.rb#93
531
+ def resolve_link(locale, key); end
532
+
533
+ # source://i18n//lib/i18n/backend/flatten.rb#89
534
+ def store_link(locale, key, link); end
535
+
536
+ class << self
537
+ # Receives a string and escape the default separator.
538
+ #
539
+ # source://i18n//lib/i18n/backend/flatten.rb#38
540
+ def escape_default_separator(key); end
541
+
542
+ # normalize_keys the flatten way. This method is significantly faster
543
+ # and creates way less objects than the one at I18n.normalize_keys.
544
+ # It also handles escaping the translation keys.
545
+ #
546
+ # source://i18n//lib/i18n/backend/flatten.rb#20
547
+ def normalize_flat_keys(locale, key, scope, separator); end
548
+ end
549
+ end
550
+
551
+ # source://i18n//lib/i18n/backend/flatten.rb#15
552
+ I18n::Backend::Flatten::FLATTEN_SEPARATOR = T.let(T.unsafe(nil), String)
553
+
554
+ # source://i18n//lib/i18n/backend/flatten.rb#14
555
+ I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String)
556
+
557
+ # Experimental support for using Gettext po files to store translations.
558
+ #
559
+ # To use this you can simply include the module to the Simple backend - or
560
+ # whatever other backend you are using.
561
+ #
562
+ # I18n::Backend::Simple.include(I18n::Backend::Gettext)
563
+ #
564
+ # Now you should be able to include your Gettext translation (*.po) files to
565
+ # the +I18n.load_path+ so they're loaded to the backend and you can use them as
566
+ # usual:
567
+ #
568
+ # I18n.load_path += Dir["path/to/locales/*.po"]
569
+ #
570
+ # Following the Gettext convention this implementation expects that your
571
+ # translation files are named by their locales. E.g. the file en.po would
572
+ # contain the translations for the English locale.
573
+ #
574
+ # To translate text <b>you must use</b> one of the translate methods provided by
575
+ # I18n::Gettext::Helpers.
576
+ #
577
+ # include I18n::Gettext::Helpers
578
+ # puts _("some string")
579
+ #
580
+ # Without it strings containing periods (".") will not be translated.
581
+ #
582
+ # source://i18n//lib/i18n/backend/gettext.rb#33
583
+ module I18n::Backend::Gettext
584
+ protected
585
+
586
+ # source://i18n//lib/i18n/backend/gettext.rb#41
587
+ def load_po(filename); end
588
+
589
+ # source://i18n//lib/i18n/backend/gettext.rb#51
590
+ def normalize(locale, data); end
591
+
592
+ # source://i18n//lib/i18n/backend/gettext.rb#68
593
+ def normalize_pluralization(locale, key, value); end
594
+
595
+ # source://i18n//lib/i18n/backend/gettext.rb#47
596
+ def parse(filename); end
597
+ end
598
+
599
+ # source://i18n//lib/i18n/backend/gettext.rb#34
600
+ class I18n::Backend::Gettext::PoData < ::Hash
601
+ # source://i18n//lib/i18n/backend/gettext.rb#35
602
+ def set_comment(msgid_or_sym, comment); end
603
+ end
604
+
605
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#20
606
+ module I18n::Backend::InterpolationCompiler
607
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#97
608
+ def interpolate(locale, string, values); end
609
+
610
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#107
611
+ def store_translations(locale, data, options = T.unsafe(nil)); end
612
+
613
+ protected
614
+
615
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#113
616
+ def compile_all_strings_in(data); end
617
+ end
618
+
619
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#21
620
+ module I18n::Backend::InterpolationCompiler::Compiler
621
+ extend ::I18n::Backend::InterpolationCompiler::Compiler
622
+
623
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#26
624
+ def compile_if_an_interpolation(string); end
625
+
626
+ # @return [Boolean]
627
+ #
628
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#38
629
+ def interpolated_str?(str); end
630
+
631
+ protected
632
+
633
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#58
634
+ def compile_interpolation_token(key); end
635
+
636
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#48
637
+ def compiled_interpolation_body(str); end
638
+
639
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#71
640
+ def direct_key(key); end
641
+
642
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#91
643
+ def escape_key_sym(key); end
644
+
645
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#87
646
+ def escape_plain_str(str); end
647
+
648
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#54
649
+ def handle_interpolation_token(token); end
650
+
651
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#67
652
+ def interpolate_key(key); end
653
+
654
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#62
655
+ def interpolate_or_raise_missing(key); end
656
+
657
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#79
658
+ def missing_key(key); end
659
+
660
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#75
661
+ def nil_key(key); end
662
+
663
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#83
664
+ def reserved_key(key); end
665
+
666
+ # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"]
667
+ #
668
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#44
669
+ def tokenize(str); end
670
+ end
671
+
672
+ # source://i18n//lib/i18n/backend/interpolation_compiler.rb#24
673
+ I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp)
674
+
675
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#65
676
+ class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple
677
+ # @return [LazyLoadable] a new instance of LazyLoadable
678
+ #
679
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#66
680
+ def initialize(lazy_load: T.unsafe(nil)); end
681
+
682
+ # Parse the load path and extract all locales.
683
+ #
684
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#99
685
+ def available_locales; end
686
+
687
+ # Eager loading is not supported in the lazy context.
688
+ #
689
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#90
690
+ def eager_load!; end
691
+
692
+ # Returns whether the current locale is initialized.
693
+ #
694
+ # @return [Boolean]
695
+ #
696
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#71
697
+ def initialized?; end
698
+
699
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#107
700
+ def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
701
+
702
+ # Clean up translations and uninitialize all locales.
703
+ #
704
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#80
705
+ def reload!; end
706
+
707
+ protected
708
+
709
+ # Load translations from files that belong to the current locale.
710
+ #
711
+ # @raise [InvalidFilenames]
712
+ #
713
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#121
714
+ def init_translations; end
715
+
716
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#133
717
+ def initialized_locales; end
718
+
719
+ private
720
+
721
+ # Checks if a filename is named in correspondence to the translations it loaded.
722
+ # The locale extracted from the path must be the single locale loaded in the translations.
723
+ #
724
+ # @raise [FilenameIncorrect]
725
+ #
726
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#175
727
+ def assert_file_named_correctly!(file, translations); end
728
+
729
+ # Select all files from I18n load path that belong to current locale.
730
+ # These files must start with the locale identifier (ie. "en", "pt-BR"),
731
+ # followed by an "_" demarcation to separate proceeding text.
732
+ #
733
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#167
734
+ def filenames_for_current_locale; end
735
+
736
+ # @return [Boolean]
737
+ #
738
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#139
739
+ def lazy_load?; end
740
+
741
+ # Loads each file supplied and asserts that the file only loads
742
+ # translations as expected by the name. The method returns a list of
743
+ # errors corresponding to offending files.
744
+ #
745
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#152
746
+ def load_translations_and_collect_file_errors(files); end
747
+ end
748
+
749
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#143
750
+ class I18n::Backend::LazyLoadable::FilenameIncorrect < ::StandardError
751
+ # @return [FilenameIncorrect] a new instance of FilenameIncorrect
752
+ #
753
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#144
754
+ def initialize(file, expected_locale, unexpected_locales); end
755
+ end
756
+
757
+ # Backend that lazy loads translations based on the current locale. This
758
+ # implementation avoids loading all translations up front. Instead, it only
759
+ # loads the translations that belong to the current locale. This offers a
760
+ # performance incentive in local development and test environments for
761
+ # applications with many translations for many different locales. It's
762
+ # particularly useful when the application only refers to a single locales'
763
+ # translations at a time (ex. A Rails workload). The implementation
764
+ # identifies which translation files from the load path belong to the
765
+ # current locale by pattern matching against their path name.
766
+ #
767
+ # Specifically, a translation file is considered to belong to a locale if:
768
+ # a) the filename is in the I18n load path
769
+ # b) the filename ends in a supported extension (ie. .yml, .json, .po, .rb)
770
+ # c) the filename starts with the locale identifier
771
+ # d) the locale identifier and optional proceeding text is separated by an underscore, ie. "_".
772
+ #
773
+ # Examples:
774
+ # Valid files that will be selected by this backend:
775
+ #
776
+ # "files/locales/en_translation.yml" (Selected for locale "en")
777
+ # "files/locales/fr.po" (Selected for locale "fr")
778
+ #
779
+ # Invalid files that won't be selected by this backend:
780
+ #
781
+ # "files/locales/translation-file"
782
+ # "files/locales/en-translation.unsupported"
783
+ # "files/locales/french/translation.yml"
784
+ # "files/locales/fr/translation.yml"
785
+ #
786
+ # The implementation uses this assumption to defer the loading of
787
+ # translation files until the current locale actually requires them.
788
+ #
789
+ # The backend has two working modes: lazy_load and eager_load.
790
+ #
791
+ # Note: This backend should only be enabled in test environments!
792
+ # When the mode is set to false, the backend behaves exactly like the
793
+ # Simple backend, with an additional check that the paths being loaded
794
+ # abide by the format. If paths can't be matched to the format, an error is raised.
795
+ #
796
+ # You can configure lazy loaded backends through the initializer or backends
797
+ # accessor:
798
+ #
799
+ # # In test environments
800
+ #
801
+ # I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: true)
802
+ #
803
+ # # In other environments, such as production and CI
804
+ #
805
+ # I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default
806
+ #
807
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#55
808
+ class I18n::Backend::LocaleExtractor
809
+ class << self
810
+ # source://i18n//lib/i18n/backend/lazy_loadable.rb#57
811
+ def locale_from_path(path); end
812
+ end
813
+ end
814
+
815
+ # source://i18n//lib/i18n/backend/memoize.rb#14
816
+ module I18n::Backend::Memoize
817
+ # source://i18n//lib/i18n/backend/memoize.rb#15
818
+ def available_locales; end
819
+
820
+ # source://i18n//lib/i18n/backend/memoize.rb#29
821
+ def eager_load!; end
822
+
823
+ # source://i18n//lib/i18n/backend/memoize.rb#24
824
+ def reload!; end
825
+
826
+ # source://i18n//lib/i18n/backend/memoize.rb#19
827
+ def store_translations(locale, data, options = T.unsafe(nil)); end
828
+
829
+ protected
830
+
831
+ # source://i18n//lib/i18n/backend/memoize.rb#37
832
+ def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
833
+
834
+ # source://i18n//lib/i18n/backend/memoize.rb#44
835
+ def memoized_lookup; end
836
+
837
+ # source://i18n//lib/i18n/backend/memoize.rb#48
838
+ def reset_memoizations!(locale = T.unsafe(nil)); end
839
+ end
840
+
841
+ # source://i18n//lib/i18n/backend/metadata.rb#21
842
+ module I18n::Backend::Metadata
843
+ # source://i18n//lib/i18n/backend/metadata.rb#52
844
+ def interpolate(locale, entry, values = T.unsafe(nil)); end
845
+
846
+ # source://i18n//lib/i18n/backend/metadata.rb#57
847
+ def pluralize(locale, entry, count); end
848
+
849
+ # source://i18n//lib/i18n/backend/metadata.rb#40
850
+ def translate(locale, key, options = T.unsafe(nil)); end
851
+
852
+ protected
853
+
854
+ # source://i18n//lib/i18n/backend/metadata.rb#63
855
+ def with_metadata(metadata, &block); end
856
+
857
+ class << self
858
+ # @private
859
+ #
860
+ # source://i18n//lib/i18n/backend/metadata.rb#23
861
+ def included(base); end
862
+ end
863
+ end
864
+
865
+ # source://i18n//lib/i18n/backend/pluralization.rb#16
866
+ module I18n::Backend::Pluralization
867
+ # Overwrites the Base backend translate method so that it will check the
868
+ # translation meta data space (:i18n) for a locale specific pluralization
869
+ # rule and use it to pluralize the given entry. I.e., the library expects
870
+ # pluralization rules to be stored at I18n.t(:'i18n.plural.rule')
871
+ #
872
+ # Pluralization rules are expected to respond to #call(count) and
873
+ # return a pluralization key. Valid keys depend on the pluralization
874
+ # rules for the locale, as defined in the CLDR.
875
+ # As of v41, 6 locale-specific plural categories are defined:
876
+ # :few, :many, :one, :other, :two, :zero
877
+ #
878
+ # n.b., The :one plural category does not imply the number 1.
879
+ # Instead, :one is a category for any number that behaves like 1 in
880
+ # that locale. For example, in some locales, :one is used for numbers
881
+ # that end in "1" (like 1, 21, 151) but that don't end in
882
+ # 11 (like 11, 111, 10311).
883
+ # Similar notes apply to the :two, and :zero plural categories.
884
+ #
885
+ # If you want to have different strings for the categories of count == 0
886
+ # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car")
887
+ # use the explicit `"0"` and `"1"` keys.
888
+ # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules
889
+ #
890
+ # source://i18n//lib/i18n/backend/pluralization.rb#39
891
+ def pluralize(locale, entry, count); end
892
+
893
+ protected
894
+
895
+ # source://i18n//lib/i18n/backend/pluralization.rb#81
896
+ def pluralizer(locale); end
897
+
898
+ # source://i18n//lib/i18n/backend/pluralization.rb#77
899
+ def pluralizers; end
900
+
901
+ private
902
+
903
+ # Normalizes categories of 0.0 and 1.0
904
+ # and returns the symbolic version
905
+ #
906
+ # source://i18n//lib/i18n/backend/pluralization.rb#89
907
+ def symbolic_count(count); end
908
+ end
909
+
910
+ # A simple backend that reads translations from YAML files and stores them in
911
+ # an in-memory hash. Relies on the Base backend.
912
+ #
913
+ # The implementation is provided by a Implementation module allowing to easily
914
+ # extend Simple backend's behavior by including modules. E.g.:
915
+ #
916
+ # module I18n::Backend::Pluralization
917
+ # def pluralize(*args)
918
+ # # extended pluralization logic
919
+ # super
920
+ # end
921
+ # end
922
+ #
923
+ # I18n::Backend::Simple.include(I18n::Backend::Pluralization)
924
+ #
925
+ # source://i18n//lib/i18n/backend/simple.rb#21
926
+ class I18n::Backend::Simple
927
+ include ::I18n::Backend::Transliterator
928
+ include ::I18n::Backend::Base
929
+ include ::I18n::Backend::Simple::Implementation
930
+ end
931
+
932
+ # source://i18n//lib/i18n/backend/simple.rb#22
933
+ module I18n::Backend::Simple::Implementation
934
+ include ::I18n::Backend::Transliterator
935
+ include ::I18n::Backend::Base
936
+
937
+ # Get available locales from the translations hash
938
+ #
939
+ # source://i18n//lib/i18n/backend/simple.rb#49
940
+ def available_locales; end
941
+
942
+ # source://i18n//lib/i18n/backend/simple.rb#64
943
+ def eager_load!; end
944
+
945
+ # @return [Boolean]
946
+ #
947
+ # source://i18n//lib/i18n/backend/simple.rb#28
948
+ def initialized?; end
949
+
950
+ # Clean up translations hash and set initialized to false on reload!
951
+ #
952
+ # source://i18n//lib/i18n/backend/simple.rb#58
953
+ def reload!; end
954
+
955
+ # Stores translations for the given locale in memory.
956
+ # This uses a deep merge for the translations hash, so existing
957
+ # translations will be overwritten by new ones only at the deepest
958
+ # level of the hash.
959
+ #
960
+ # source://i18n//lib/i18n/backend/simple.rb#36
961
+ def store_translations(locale, data, options = T.unsafe(nil)); end
962
+
963
+ # source://i18n//lib/i18n/backend/simple.rb#69
964
+ def translations(do_init: T.unsafe(nil)); end
965
+
966
+ protected
967
+
968
+ # source://i18n//lib/i18n/backend/simple.rb#83
969
+ def init_translations; end
970
+
971
+ # Looks up a translation from the translations hash. Returns nil if
972
+ # either key is nil, or locale, scope or key do not exist as a key in the
973
+ # nested translations hash. Splits keys or scopes containing dots
974
+ # into multiple keys, i.e. <tt>currency.format</tt> is regarded the same as
975
+ # <tt>%w(currency format)</tt>.
976
+ #
977
+ # source://i18n//lib/i18n/backend/simple.rb#93
978
+ def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
979
+ end
980
+
981
+ # Mutex to ensure that concurrent translations loading will be thread-safe
982
+ #
983
+ # source://i18n//lib/i18n/backend/simple.rb#26
984
+ I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
985
+
986
+ # source://i18n//lib/i18n/backend/transliterator.rb#6
987
+ module I18n::Backend::Transliterator
988
+ # Given a locale and a UTF-8 string, return the locale's ASCII
989
+ # approximation for the string.
990
+ #
991
+ # source://i18n//lib/i18n/backend/transliterator.rb#11
992
+ def transliterate(locale, string, replacement = T.unsafe(nil)); end
993
+
994
+ class << self
995
+ # Get a transliterator instance.
996
+ #
997
+ # source://i18n//lib/i18n/backend/transliterator.rb#19
998
+ def get(rule = T.unsafe(nil)); end
999
+ end
1000
+ end
1001
+
1002
+ # source://i18n//lib/i18n/backend/transliterator.rb#7
1003
+ I18n::Backend::Transliterator::DEFAULT_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String)
1004
+
1005
+ # A transliterator which accepts a Hash of characters as its translation
1006
+ # rule.
1007
+ #
1008
+ # source://i18n//lib/i18n/backend/transliterator.rb#42
1009
+ class I18n::Backend::Transliterator::HashTransliterator
1010
+ # @return [HashTransliterator] a new instance of HashTransliterator
1011
+ #
1012
+ # source://i18n//lib/i18n/backend/transliterator.rb#74
1013
+ def initialize(rule = T.unsafe(nil)); end
1014
+
1015
+ # source://i18n//lib/i18n/backend/transliterator.rb#80
1016
+ def transliterate(string, replacement = T.unsafe(nil)); end
1017
+
1018
+ private
1019
+
1020
+ # Add transliteration rules to the approximations hash.
1021
+ #
1022
+ # source://i18n//lib/i18n/backend/transliterator.rb#100
1023
+ def add(hash); end
1024
+
1025
+ # source://i18n//lib/i18n/backend/transliterator.rb#93
1026
+ def add_default_approximations; end
1027
+
1028
+ # source://i18n//lib/i18n/backend/transliterator.rb#89
1029
+ def approximations; end
1030
+ end
1031
+
1032
+ # source://i18n//lib/i18n/backend/transliterator.rb#43
1033
+ I18n::Backend::Transliterator::HashTransliterator::DEFAULT_APPROXIMATIONS = T.let(T.unsafe(nil), Hash)
1034
+
1035
+ # A transliterator which accepts a Proc as its transliteration rule.
1036
+ #
1037
+ # source://i18n//lib/i18n/backend/transliterator.rb#30
1038
+ class I18n::Backend::Transliterator::ProcTransliterator
1039
+ # @return [ProcTransliterator] a new instance of ProcTransliterator
1040
+ #
1041
+ # source://i18n//lib/i18n/backend/transliterator.rb#31
1042
+ def initialize(rule); end
1043
+
1044
+ # source://i18n//lib/i18n/backend/transliterator.rb#35
1045
+ def transliterate(string, replacement = T.unsafe(nil)); end
1046
+ end
1047
+
1048
+ # source://i18n//lib/i18n.rb#55
1049
+ module I18n::Base
1050
+ # source://i18n//lib/i18n.rb#70
1051
+ def available_locales; end
1052
+
1053
+ # source://i18n//lib/i18n.rb#74
1054
+ def available_locales=(value); end
1055
+
1056
+ # @return [Boolean]
1057
+ #
1058
+ # source://i18n//lib/i18n.rb#386
1059
+ def available_locales_initialized?; end
1060
+
1061
+ # source://i18n//lib/i18n.rb#70
1062
+ def backend; end
1063
+
1064
+ # source://i18n//lib/i18n.rb#74
1065
+ def backend=(value); end
1066
+
1067
+ # Gets I18n configuration object.
1068
+ #
1069
+ # source://i18n//lib/i18n.rb#57
1070
+ def config; end
1071
+
1072
+ # Sets I18n configuration object.
1073
+ #
1074
+ # source://i18n//lib/i18n.rb#62
1075
+ def config=(value); end
1076
+
1077
+ # source://i18n//lib/i18n.rb#70
1078
+ def default_locale; end
1079
+
1080
+ # source://i18n//lib/i18n.rb#74
1081
+ def default_locale=(value); end
1082
+
1083
+ # source://i18n//lib/i18n.rb#70
1084
+ def default_separator; end
1085
+
1086
+ # source://i18n//lib/i18n.rb#74
1087
+ def default_separator=(value); end
1088
+
1089
+ # Tells the backend to load translations now. Used in situations like the
1090
+ # Rails production environment. Backends can implement whatever strategy
1091
+ # is useful.
1092
+ #
1093
+ # source://i18n//lib/i18n.rb#91
1094
+ def eager_load!; end
1095
+
1096
+ # source://i18n//lib/i18n.rb#70
1097
+ def enforce_available_locales; end
1098
+
1099
+ # Raises an InvalidLocale exception when the passed locale is not available.
1100
+ #
1101
+ # source://i18n//lib/i18n.rb#380
1102
+ def enforce_available_locales!(locale); end
1103
+
1104
+ # source://i18n//lib/i18n.rb#74
1105
+ def enforce_available_locales=(value); end
1106
+
1107
+ # source://i18n//lib/i18n.rb#70
1108
+ def exception_handler; end
1109
+
1110
+ # source://i18n//lib/i18n.rb#74
1111
+ def exception_handler=(value); end
1112
+
1113
+ # Returns true if a translation exists for a given key, otherwise returns false.
1114
+ #
1115
+ # @raise [Disabled]
1116
+ # @return [Boolean]
1117
+ #
1118
+ # source://i18n//lib/i18n.rb#265
1119
+ def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end
1120
+
1121
+ # Returns an array of interpolation keys for the given translation key
1122
+ #
1123
+ # *Examples*
1124
+ #
1125
+ # Suppose we have the following:
1126
+ # I18n.t 'example.zero' == 'Zero interpolations'
1127
+ # I18n.t 'example.one' == 'One interpolation %{foo}'
1128
+ # I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}'
1129
+ # I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}']
1130
+ # I18n.t 'example.one', locale: :other == 'One interpolation %{baz}'
1131
+ #
1132
+ # Then we can expect the following results:
1133
+ # I18n.interpolation_keys('example.zero') #=> []
1134
+ # I18n.interpolation_keys('example.one') #=> ['foo']
1135
+ # I18n.interpolation_keys('example.two') #=> ['foo', 'bar']
1136
+ # I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz']
1137
+ # I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz']
1138
+ # I18n.interpolation_keys('does-not-exist') #=> []
1139
+ # I18n.interpolation_keys('example') #=> []
1140
+ #
1141
+ # @raise [I18n::ArgumentError]
1142
+ #
1143
+ # source://i18n//lib/i18n.rb#254
1144
+ def interpolation_keys(key, **options); end
1145
+
1146
+ # Localizes certain objects, such as dates and numbers to local formatting.
1147
+ #
1148
+ # @raise [Disabled]
1149
+ #
1150
+ # source://i18n//lib/i18n.rb#335
1151
+ def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
1152
+
1153
+ # source://i18n//lib/i18n.rb#70
1154
+ def load_path; end
1155
+
1156
+ # source://i18n//lib/i18n.rb#74
1157
+ def load_path=(value); end
1158
+
1159
+ # source://i18n//lib/i18n.rb#70
1160
+ def locale; end
1161
+
1162
+ # source://i18n//lib/i18n.rb#74
1163
+ def locale=(value); end
1164
+
1165
+ # Returns true when the passed locale, which can be either a String or a
1166
+ # Symbol, is in the list of available locales. Returns false otherwise.
1167
+ #
1168
+ # @return [Boolean]
1169
+ #
1170
+ # source://i18n//lib/i18n.rb#375
1171
+ def locale_available?(locale); end
1172
+
1173
+ # Localizes certain objects, such as dates and numbers to local formatting.
1174
+ #
1175
+ # @raise [Disabled]
1176
+ #
1177
+ # source://i18n//lib/i18n.rb#335
1178
+ def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
1179
+
1180
+ # Merges the given locale, key and scope into a single array of keys.
1181
+ # Splits keys that contain dots into multiple keys. Makes sure all
1182
+ # keys are Symbols.
1183
+ #
1184
+ # source://i18n//lib/i18n.rb#363
1185
+ def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end
1186
+
1187
+ # Tells the backend to reload translations. Used in situations like the
1188
+ # Rails development environment. Backends can implement whatever strategy
1189
+ # is useful.
1190
+ #
1191
+ # source://i18n//lib/i18n.rb#83
1192
+ def reload!; end
1193
+
1194
+ # Translates, pluralizes and interpolates a given key using a given locale,
1195
+ # scope, and default, as well as interpolation values.
1196
+ #
1197
+ # *LOOKUP*
1198
+ #
1199
+ # Translation data is organized as a nested hash using the upper-level keys
1200
+ # as namespaces. <em>E.g.</em>, ActionView ships with the translation:
1201
+ # <tt>:date => {:formats => {:short => "%b %d"}}</tt>.
1202
+ #
1203
+ # Translations can be looked up at any level of this hash using the key argument
1204
+ # and the scope option. <em>E.g.</em>, in this example <tt>I18n.t :date</tt>
1205
+ # returns the whole translations hash <tt>{:formats => {:short => "%b %d"}}</tt>.
1206
+ #
1207
+ # Key can be either a single key or a dot-separated key (both Strings and Symbols
1208
+ # work). <em>E.g.</em>, the short format can be looked up using both:
1209
+ # I18n.t 'date.formats.short'
1210
+ # I18n.t :'date.formats.short'
1211
+ #
1212
+ # Scope can be either a single key, a dot-separated key or an array of keys
1213
+ # or dot-separated keys. Keys and scopes can be combined freely. So these
1214
+ # examples will all look up the same short date format:
1215
+ # I18n.t 'date.formats.short'
1216
+ # I18n.t 'formats.short', :scope => 'date'
1217
+ # I18n.t 'short', :scope => 'date.formats'
1218
+ # I18n.t 'short', :scope => %w(date formats)
1219
+ #
1220
+ # *INTERPOLATION*
1221
+ #
1222
+ # Translations can contain interpolation variables which will be replaced by
1223
+ # values passed to #translate as part of the options hash, with the keys matching
1224
+ # the interpolation variable names.
1225
+ #
1226
+ # <em>E.g.</em>, with a translation <tt>:foo => "foo %{bar}"</tt> the option
1227
+ # value for the key +bar+ will be interpolated into the translation:
1228
+ # I18n.t :foo, :bar => 'baz' # => 'foo baz'
1229
+ #
1230
+ # *PLURALIZATION*
1231
+ #
1232
+ # Translation data can contain pluralized translations. Pluralized translations
1233
+ # are arrays of singular/plural versions of translations like <tt>['Foo', 'Foos']</tt>.
1234
+ #
1235
+ # Note that <tt>I18n::Backend::Simple</tt> only supports an algorithm for English
1236
+ # pluralization rules. Other algorithms can be supported by custom backends.
1237
+ #
1238
+ # This returns the singular version of a pluralized translation:
1239
+ # I18n.t :foo, :count => 1 # => 'Foo'
1240
+ #
1241
+ # These both return the plural version of a pluralized translation:
1242
+ # I18n.t :foo, :count => 0 # => 'Foos'
1243
+ # I18n.t :foo, :count => 2 # => 'Foos'
1244
+ #
1245
+ # The <tt>:count</tt> option can be used both for pluralization and interpolation.
1246
+ # <em>E.g.</em>, with the translation
1247
+ # <tt>:foo => ['%{count} foo', '%{count} foos']</tt>, count will
1248
+ # be interpolated to the pluralized translation:
1249
+ # I18n.t :foo, :count => 1 # => '1 foo'
1250
+ #
1251
+ # *DEFAULTS*
1252
+ #
1253
+ # This returns the translation for <tt>:foo</tt> or <tt>default</tt> if no translation was found:
1254
+ # I18n.t :foo, :default => 'default'
1255
+ #
1256
+ # This returns the translation for <tt>:foo</tt> or the translation for <tt>:bar</tt> if no
1257
+ # translation for <tt>:foo</tt> was found:
1258
+ # I18n.t :foo, :default => :bar
1259
+ #
1260
+ # Returns the translation for <tt>:foo</tt> or the translation for <tt>:bar</tt>
1261
+ # or <tt>default</tt> if no translations for <tt>:foo</tt> and <tt>:bar</tt> were found.
1262
+ # I18n.t :foo, :default => [:bar, 'default']
1263
+ #
1264
+ # <b>BULK LOOKUP</b>
1265
+ #
1266
+ # This returns an array with the translations for <tt>:foo</tt> and <tt>:bar</tt>.
1267
+ # I18n.t [:foo, :bar]
1268
+ #
1269
+ # Can be used with dot-separated nested keys:
1270
+ # I18n.t [:'baz.foo', :'baz.bar']
1271
+ #
1272
+ # Which is the same as using a scope option:
1273
+ # I18n.t [:foo, :bar], :scope => :baz
1274
+ #
1275
+ # *LAMBDAS*
1276
+ #
1277
+ # Both translations and defaults can be given as Ruby lambdas. Lambdas will be
1278
+ # called and passed the key and options.
1279
+ #
1280
+ # E.g. assuming the key <tt>:salutation</tt> resolves to:
1281
+ # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
1282
+ #
1283
+ # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith')</tt> will result in "Mrs. Smith".
1284
+ #
1285
+ # Note that the string returned by lambda will go through string interpolation too,
1286
+ # so the following lambda would give the same result:
1287
+ # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" }
1288
+ #
1289
+ # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when
1290
+ # a cache layer is put in front of I18n.translate it will generate a cache key
1291
+ # from the argument values passed to #translate. Therefore your lambdas should
1292
+ # always return the same translations/values per unique combination of argument
1293
+ # values.
1294
+ #
1295
+ # <b>Ruby 2.7+ keyword arguments warning</b>
1296
+ #
1297
+ # This method uses keyword arguments.
1298
+ # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
1299
+ # The "hash" parameter must be passed as keyword argument.
1300
+ #
1301
+ # Good:
1302
+ # I18n.t(:salutation, :gender => 'w', :name => 'Smith')
1303
+ # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' })
1304
+ # I18n.t(:salutation, **any_hash)
1305
+ #
1306
+ # Bad:
1307
+ # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' })
1308
+ # I18n.t(:salutation, any_hash)
1309
+ #
1310
+ # @raise [Disabled]
1311
+ #
1312
+ # source://i18n//lib/i18n.rb#211
1313
+ def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
1314
+
1315
+ # Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
1316
+ # this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
1317
+ #
1318
+ # source://i18n//lib/i18n.rb#230
1319
+ def t!(key, **options); end
1320
+
1321
+ # Translates, pluralizes and interpolates a given key using a given locale,
1322
+ # scope, and default, as well as interpolation values.
1323
+ #
1324
+ # *LOOKUP*
1325
+ #
1326
+ # Translation data is organized as a nested hash using the upper-level keys
1327
+ # as namespaces. <em>E.g.</em>, ActionView ships with the translation:
1328
+ # <tt>:date => {:formats => {:short => "%b %d"}}</tt>.
1329
+ #
1330
+ # Translations can be looked up at any level of this hash using the key argument
1331
+ # and the scope option. <em>E.g.</em>, in this example <tt>I18n.t :date</tt>
1332
+ # returns the whole translations hash <tt>{:formats => {:short => "%b %d"}}</tt>.
1333
+ #
1334
+ # Key can be either a single key or a dot-separated key (both Strings and Symbols
1335
+ # work). <em>E.g.</em>, the short format can be looked up using both:
1336
+ # I18n.t 'date.formats.short'
1337
+ # I18n.t :'date.formats.short'
1338
+ #
1339
+ # Scope can be either a single key, a dot-separated key or an array of keys
1340
+ # or dot-separated keys. Keys and scopes can be combined freely. So these
1341
+ # examples will all look up the same short date format:
1342
+ # I18n.t 'date.formats.short'
1343
+ # I18n.t 'formats.short', :scope => 'date'
1344
+ # I18n.t 'short', :scope => 'date.formats'
1345
+ # I18n.t 'short', :scope => %w(date formats)
1346
+ #
1347
+ # *INTERPOLATION*
1348
+ #
1349
+ # Translations can contain interpolation variables which will be replaced by
1350
+ # values passed to #translate as part of the options hash, with the keys matching
1351
+ # the interpolation variable names.
1352
+ #
1353
+ # <em>E.g.</em>, with a translation <tt>:foo => "foo %{bar}"</tt> the option
1354
+ # value for the key +bar+ will be interpolated into the translation:
1355
+ # I18n.t :foo, :bar => 'baz' # => 'foo baz'
1356
+ #
1357
+ # *PLURALIZATION*
1358
+ #
1359
+ # Translation data can contain pluralized translations. Pluralized translations
1360
+ # are arrays of singular/plural versions of translations like <tt>['Foo', 'Foos']</tt>.
1361
+ #
1362
+ # Note that <tt>I18n::Backend::Simple</tt> only supports an algorithm for English
1363
+ # pluralization rules. Other algorithms can be supported by custom backends.
1364
+ #
1365
+ # This returns the singular version of a pluralized translation:
1366
+ # I18n.t :foo, :count => 1 # => 'Foo'
1367
+ #
1368
+ # These both return the plural version of a pluralized translation:
1369
+ # I18n.t :foo, :count => 0 # => 'Foos'
1370
+ # I18n.t :foo, :count => 2 # => 'Foos'
1371
+ #
1372
+ # The <tt>:count</tt> option can be used both for pluralization and interpolation.
1373
+ # <em>E.g.</em>, with the translation
1374
+ # <tt>:foo => ['%{count} foo', '%{count} foos']</tt>, count will
1375
+ # be interpolated to the pluralized translation:
1376
+ # I18n.t :foo, :count => 1 # => '1 foo'
1377
+ #
1378
+ # *DEFAULTS*
1379
+ #
1380
+ # This returns the translation for <tt>:foo</tt> or <tt>default</tt> if no translation was found:
1381
+ # I18n.t :foo, :default => 'default'
1382
+ #
1383
+ # This returns the translation for <tt>:foo</tt> or the translation for <tt>:bar</tt> if no
1384
+ # translation for <tt>:foo</tt> was found:
1385
+ # I18n.t :foo, :default => :bar
1386
+ #
1387
+ # Returns the translation for <tt>:foo</tt> or the translation for <tt>:bar</tt>
1388
+ # or <tt>default</tt> if no translations for <tt>:foo</tt> and <tt>:bar</tt> were found.
1389
+ # I18n.t :foo, :default => [:bar, 'default']
1390
+ #
1391
+ # <b>BULK LOOKUP</b>
1392
+ #
1393
+ # This returns an array with the translations for <tt>:foo</tt> and <tt>:bar</tt>.
1394
+ # I18n.t [:foo, :bar]
1395
+ #
1396
+ # Can be used with dot-separated nested keys:
1397
+ # I18n.t [:'baz.foo', :'baz.bar']
1398
+ #
1399
+ # Which is the same as using a scope option:
1400
+ # I18n.t [:foo, :bar], :scope => :baz
1401
+ #
1402
+ # *LAMBDAS*
1403
+ #
1404
+ # Both translations and defaults can be given as Ruby lambdas. Lambdas will be
1405
+ # called and passed the key and options.
1406
+ #
1407
+ # E.g. assuming the key <tt>:salutation</tt> resolves to:
1408
+ # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
1409
+ #
1410
+ # Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith')</tt> will result in "Mrs. Smith".
1411
+ #
1412
+ # Note that the string returned by lambda will go through string interpolation too,
1413
+ # so the following lambda would give the same result:
1414
+ # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" }
1415
+ #
1416
+ # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when
1417
+ # a cache layer is put in front of I18n.translate it will generate a cache key
1418
+ # from the argument values passed to #translate. Therefore your lambdas should
1419
+ # always return the same translations/values per unique combination of argument
1420
+ # values.
1421
+ #
1422
+ # <b>Ruby 2.7+ keyword arguments warning</b>
1423
+ #
1424
+ # This method uses keyword arguments.
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
1426
+ # The "hash" parameter must be passed as keyword argument.
1427
+ #
1428
+ # Good:
1429
+ # I18n.t(:salutation, :gender => 'w', :name => 'Smith')
1430
+ # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' })
1431
+ # I18n.t(:salutation, **any_hash)
1432
+ #
1433
+ # Bad:
1434
+ # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' })
1435
+ # I18n.t(:salutation, any_hash)
1436
+ #
1437
+ # @raise [Disabled]
1438
+ #
1439
+ # source://i18n//lib/i18n.rb#211
1440
+ def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
1441
+
1442
+ # Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
1443
+ # this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
1444
+ #
1445
+ # source://i18n//lib/i18n.rb#230
1446
+ def translate!(key, **options); end
1447
+
1448
+ # Transliterates UTF-8 characters to ASCII. By default this method will
1449
+ # transliterate only Latin strings to an ASCII approximation:
1450
+ #
1451
+ # I18n.transliterate("Ærøskøbing")
1452
+ # # => "AEroskobing"
1453
+ #
1454
+ # I18n.transliterate("日本語")
1455
+ # # => "???"
1456
+ #
1457
+ # It's also possible to add support for per-locale transliterations. I18n
1458
+ # expects transliteration rules to be stored at
1459
+ # <tt>i18n.transliterate.rule</tt>.
1460
+ #
1461
+ # Transliteration rules can either be a Hash or a Proc. Procs must accept a
1462
+ # single string argument. Hash rules inherit the default transliteration
1463
+ # rules, while Procs do not.
1464
+ #
1465
+ # *Examples*
1466
+ #
1467
+ # Setting a Hash in <locale>.yml:
1468
+ #
1469
+ # i18n:
1470
+ # transliterate:
1471
+ # rule:
1472
+ # ü: "ue"
1473
+ # ö: "oe"
1474
+ #
1475
+ # Setting a Hash using Ruby:
1476
+ #
1477
+ # store_translations(:de, i18n: {
1478
+ # transliterate: {
1479
+ # rule: {
1480
+ # 'ü' => 'ue',
1481
+ # 'ö' => 'oe'
1482
+ # }
1483
+ # }
1484
+ # })
1485
+ #
1486
+ # Setting a Proc:
1487
+ #
1488
+ # translit = lambda {|string| MyTransliterator.transliterate(string) }
1489
+ # store_translations(:xx, :i18n => {:transliterate => {:rule => translit})
1490
+ #
1491
+ # Transliterating strings:
1492
+ #
1493
+ # I18n.locale = :en
1494
+ # I18n.transliterate("Jürgen") # => "Jurgen"
1495
+ # I18n.locale = :de
1496
+ # I18n.transliterate("Jürgen") # => "Juergen"
1497
+ # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen"
1498
+ # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen"
1499
+ #
1500
+ # source://i18n//lib/i18n.rb#324
1501
+ def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end
1502
+
1503
+ # Executes block with given I18n.locale set.
1504
+ #
1505
+ # source://i18n//lib/i18n.rb#346
1506
+ def with_locale(tmp_locale = T.unsafe(nil)); end
1507
+
1508
+ private
1509
+
1510
+ # Any exceptions thrown in translate will be sent to the @@exception_handler
1511
+ # which can be a Symbol, a Proc or any other Object unless they're forced to
1512
+ # be raised or thrown (MissingTranslation).
1513
+ #
1514
+ # If exception_handler is a Symbol then it will simply be sent to I18n as
1515
+ # a method call. A Proc will simply be called. In any other case the
1516
+ # method #call will be called on the exception_handler object.
1517
+ #
1518
+ # Examples:
1519
+ #
1520
+ # I18n.exception_handler = :custom_exception_handler # this is the default
1521
+ # I18n.custom_exception_handler(exception, locale, key, options) # will be called like this
1522
+ #
1523
+ # I18n.exception_handler = lambda { |*args| ... } # a lambda
1524
+ # I18n.exception_handler.call(exception, locale, key, options) # will be called like this
1525
+ #
1526
+ # I18n.exception_handler = I18nExceptionHandler.new # an object
1527
+ # I18n.exception_handler.call(exception, locale, key, options) # will be called like this
1528
+ #
1529
+ # source://i18n//lib/i18n.rb#422
1530
+ def handle_exception(handling, exception, locale, key, options); end
1531
+
1532
+ # source://i18n//lib/i18n.rb#464
1533
+ def interpolation_keys_from_translation(translation); end
1534
+
1535
+ # source://i18n//lib/i18n.rb#440
1536
+ def normalize_key(key, separator); end
1537
+
1538
+ # source://i18n//lib/i18n.rb#392
1539
+ def translate_key(key, throw, raise, locale, backend, options); end
1540
+ end
1541
+
1542
+ # source://i18n//lib/i18n/config.rb#6
1543
+ class I18n::Config
1544
+ # Returns an array of locales for which translations are available.
1545
+ # Unless you explicitly set these through I18n.available_locales=
1546
+ # the call will be delegated to the backend.
1547
+ #
1548
+ # source://i18n//lib/i18n/config.rb#43
1549
+ def available_locales; end
1550
+
1551
+ # Sets the available locales.
1552
+ #
1553
+ # source://i18n//lib/i18n/config.rb#57
1554
+ def available_locales=(locales); end
1555
+
1556
+ # Returns true if the available_locales have been initialized
1557
+ #
1558
+ # @return [Boolean]
1559
+ #
1560
+ # source://i18n//lib/i18n/config.rb#64
1561
+ def available_locales_initialized?; end
1562
+
1563
+ # Caches the available locales list as both strings and symbols in a Set, so
1564
+ # that we can have faster lookups to do the available locales enforce check.
1565
+ #
1566
+ # source://i18n//lib/i18n/config.rb#50
1567
+ def available_locales_set; end
1568
+
1569
+ # Returns the current backend. Defaults to +Backend::Simple+.
1570
+ #
1571
+ # source://i18n//lib/i18n/config.rb#20
1572
+ def backend; end
1573
+
1574
+ # Sets the current backend. Used to set a custom backend.
1575
+ #
1576
+ # source://i18n//lib/i18n/config.rb#25
1577
+ def backend=(backend); end
1578
+
1579
+ # Clears the available locales set so it can be recomputed again after I18n
1580
+ # gets reloaded.
1581
+ #
1582
+ # source://i18n//lib/i18n/config.rb#70
1583
+ def clear_available_locales_set; end
1584
+
1585
+ # Returns the current default locale. Defaults to :'en'
1586
+ #
1587
+ # source://i18n//lib/i18n/config.rb#30
1588
+ def default_locale; end
1589
+
1590
+ # Sets the current default locale. Used to set a custom default locale.
1591
+ #
1592
+ # source://i18n//lib/i18n/config.rb#35
1593
+ def default_locale=(locale); end
1594
+
1595
+ # Returns the current default scope separator. Defaults to '.'
1596
+ #
1597
+ # source://i18n//lib/i18n/config.rb#75
1598
+ def default_separator; end
1599
+
1600
+ # Sets the current default scope separator.
1601
+ #
1602
+ # source://i18n//lib/i18n/config.rb#80
1603
+ def default_separator=(separator); end
1604
+
1605
+ # source://i18n//lib/i18n/config.rb#141
1606
+ def enforce_available_locales; end
1607
+
1608
+ # source://i18n//lib/i18n/config.rb#145
1609
+ def enforce_available_locales=(enforce_available_locales); end
1610
+
1611
+ # Returns the current exception handler. Defaults to an instance of
1612
+ # I18n::ExceptionHandler.
1613
+ #
1614
+ # source://i18n//lib/i18n/config.rb#86
1615
+ def exception_handler; end
1616
+
1617
+ # Sets the exception handler.
1618
+ #
1619
+ # source://i18n//lib/i18n/config.rb#91
1620
+ def exception_handler=(exception_handler); end
1621
+
1622
+ # Returns the current interpolation patterns. Defaults to
1623
+ # I18n::DEFAULT_INTERPOLATION_PATTERNS.
1624
+ #
1625
+ # source://i18n//lib/i18n/config.rb#151
1626
+ def interpolation_patterns; end
1627
+
1628
+ # Sets the current interpolation patterns. Used to set a interpolation
1629
+ # patterns.
1630
+ #
1631
+ # E.g. using {{}} as a placeholder like "{{hello}}, world!":
1632
+ #
1633
+ # I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/
1634
+ #
1635
+ # source://i18n//lib/i18n/config.rb#161
1636
+ def interpolation_patterns=(interpolation_patterns); end
1637
+
1638
+ # Allow clients to register paths providing translation data sources. The
1639
+ # backend defines acceptable sources.
1640
+ #
1641
+ # E.g. the provided SimpleBackend accepts a list of paths to translation
1642
+ # files which are either named *.rb and contain plain Ruby Hashes or are
1643
+ # named *.yml and contain YAML data. So for the SimpleBackend clients may
1644
+ # register translation files like this:
1645
+ # I18n.load_path << 'path/to/locale/en.yml'
1646
+ #
1647
+ # source://i18n//lib/i18n/config.rb#126
1648
+ def load_path; end
1649
+
1650
+ # Sets the load path instance. Custom implementations are expected to
1651
+ # behave like a Ruby Array.
1652
+ #
1653
+ # source://i18n//lib/i18n/config.rb#132
1654
+ def load_path=(load_path); end
1655
+
1656
+ # The only configuration value that is not global and scoped to thread is :locale.
1657
+ # It defaults to the default_locale.
1658
+ #
1659
+ # source://i18n//lib/i18n/config.rb#9
1660
+ def locale; end
1661
+
1662
+ # Sets the current locale pseudo-globally, i.e. in the Thread.current hash.
1663
+ #
1664
+ # source://i18n//lib/i18n/config.rb#14
1665
+ def locale=(locale); end
1666
+
1667
+ # Returns the current handler for situations when interpolation argument
1668
+ # is missing. MissingInterpolationArgument will be raised by default.
1669
+ #
1670
+ # source://i18n//lib/i18n/config.rb#97
1671
+ def missing_interpolation_argument_handler; end
1672
+
1673
+ # Sets the missing interpolation argument handler. It can be any
1674
+ # object that responds to #call. The arguments that will be passed to #call
1675
+ # are the same as for MissingInterpolationArgument initializer. Use +Proc.new+
1676
+ # if you don't care about arity.
1677
+ #
1678
+ # == Example:
1679
+ # You can suppress raising an exception and return string instead:
1680
+ #
1681
+ # I18n.config.missing_interpolation_argument_handler = Proc.new do |key|
1682
+ # "#{key} is missing"
1683
+ # end
1684
+ #
1685
+ # source://i18n//lib/i18n/config.rb#114
1686
+ def missing_interpolation_argument_handler=(exception_handler); end
1687
+ end
1688
+
1689
+ # source://i18n//lib/i18n/interpolate/ruby.rb#7
1690
+ I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array)
1691
+
1692
+ # source://i18n//lib/i18n/exceptions.rb#18
1693
+ class I18n::Disabled < ::I18n::ArgumentError
1694
+ # @return [Disabled] a new instance of Disabled
1695
+ #
1696
+ # source://i18n//lib/i18n/exceptions.rb#19
1697
+ def initialize(method); end
1698
+ end
1699
+
1700
+ # source://i18n//lib/i18n.rb#36
1701
+ I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
1702
+
1703
+ # source://i18n//lib/i18n/exceptions.rb#6
1704
+ class I18n::ExceptionHandler
1705
+ # source://i18n//lib/i18n/exceptions.rb#7
1706
+ def call(exception, _locale, _key, _options); end
1707
+ end
1708
+
1709
+ # source://i18n//lib/i18n/gettext.rb#4
1710
+ module I18n::Gettext
1711
+ class << self
1712
+ # source://i18n//lib/i18n/gettext.rb#21
1713
+ def extract_scope(msgid, separator); end
1714
+
1715
+ # returns an array of plural keys for the given locale or the whole hash
1716
+ # of locale mappings to plural keys so that we can convert from gettext's
1717
+ # integer-index based style
1718
+ # TODO move this information to the pluralization module
1719
+ #
1720
+ # source://i18n//lib/i18n/gettext.rb#17
1721
+ def plural_keys(*args); end
1722
+ end
1723
+ end
1724
+
1725
+ # source://i18n//lib/i18n/gettext.rb#6
1726
+ I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String)
1727
+
1728
+ # Implements classical Gettext style accessors. To use this include the
1729
+ # module to the global namespace or wherever you want to use it.
1730
+ #
1731
+ # include I18n::Gettext::Helpers
1732
+ #
1733
+ # source://i18n//lib/i18n/gettext/helpers.rb#11
1734
+ module I18n::Gettext::Helpers
1735
+ # Makes dynamic translation messages readable for the gettext parser.
1736
+ # <tt>_(fruit)</tt> cannot be understood by the gettext parser. To help the parser find all your translations,
1737
+ # you can add <tt>fruit = N_("Apple")</tt> which does not translate, but tells the parser: "Apple" needs translation.
1738
+ # * msgid: the message id.
1739
+ # * Returns: msgid.
1740
+ #
1741
+ # source://i18n//lib/i18n/gettext/helpers.rb#17
1742
+ def N_(msgsid); end
1743
+
1744
+ # source://i18n//lib/i18n/gettext/helpers.rb#21
1745
+ def _(msgid, options = T.unsafe(nil)); end
1746
+
1747
+ # source://i18n//lib/i18n/gettext/helpers.rb#21
1748
+ def gettext(msgid, options = T.unsafe(nil)); end
1749
+
1750
+ # source://i18n//lib/i18n/gettext/helpers.rb#38
1751
+ def n_(msgid, msgid_plural, n = T.unsafe(nil)); end
1752
+
1753
+ # source://i18n//lib/i18n/gettext/helpers.rb#38
1754
+ def ngettext(msgid, msgid_plural, n = T.unsafe(nil)); end
1755
+
1756
+ # Method signatures:
1757
+ # npgettext('Fruits', 'apple', 'apples', 2)
1758
+ # npgettext('Fruits', ['apple', 'apples'], 2)
1759
+ #
1760
+ # source://i18n//lib/i18n/gettext/helpers.rb#61
1761
+ def np_(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end
1762
+
1763
+ # Method signatures:
1764
+ # npgettext('Fruits', 'apple', 'apples', 2)
1765
+ # npgettext('Fruits', ['apple', 'apples'], 2)
1766
+ #
1767
+ # source://i18n//lib/i18n/gettext/helpers.rb#61
1768
+ def npgettext(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end
1769
+
1770
+ # Method signatures:
1771
+ # nsgettext('Fruits|apple', 'apples', 2)
1772
+ # nsgettext(['Fruits|apple', 'apples'], 2)
1773
+ #
1774
+ # source://i18n//lib/i18n/gettext/helpers.rb#46
1775
+ def ns_(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end
1776
+
1777
+ # Method signatures:
1778
+ # nsgettext('Fruits|apple', 'apples', 2)
1779
+ # nsgettext(['Fruits|apple', 'apples'], 2)
1780
+ #
1781
+ # source://i18n//lib/i18n/gettext/helpers.rb#46
1782
+ def nsgettext(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end
1783
+
1784
+ # source://i18n//lib/i18n/gettext/helpers.rb#32
1785
+ def p_(msgctxt, msgid); end
1786
+
1787
+ # source://i18n//lib/i18n/gettext/helpers.rb#32
1788
+ def pgettext(msgctxt, msgid); end
1789
+
1790
+ # source://i18n//lib/i18n/gettext/helpers.rb#26
1791
+ def s_(msgid, separator = T.unsafe(nil)); end
1792
+
1793
+ # source://i18n//lib/i18n/gettext/helpers.rb#26
1794
+ def sgettext(msgid, separator = T.unsafe(nil)); end
1795
+ end
1796
+
1797
+ # source://i18n//lib/i18n/gettext.rb#5
1798
+ I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String)
1799
+
1800
+ # source://i18n//lib/i18n/interpolate/ruby.rb#12
1801
+ I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp)
1802
+
1803
+ # source://i18n//lib/i18n/interpolate/ruby.rb#15
1804
+ I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash)
1805
+
1806
+ # source://i18n//lib/i18n/exceptions.rb#134
1807
+ class I18n::InvalidFilenames < ::I18n::ArgumentError
1808
+ # @return [InvalidFilenames] a new instance of InvalidFilenames
1809
+ #
1810
+ # source://i18n//lib/i18n/exceptions.rb#136
1811
+ def initialize(file_errors); end
1812
+ end
1813
+
1814
+ # source://i18n//lib/i18n/exceptions.rb#135
1815
+ I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer)
1816
+
1817
+ # source://i18n//lib/i18n/exceptions.rb#32
1818
+ class I18n::InvalidLocale < ::I18n::ArgumentError
1819
+ # @return [InvalidLocale] a new instance of InvalidLocale
1820
+ #
1821
+ # source://i18n//lib/i18n/exceptions.rb#34
1822
+ def initialize(locale); end
1823
+
1824
+ # Returns the value of attribute locale.
1825
+ #
1826
+ # source://i18n//lib/i18n/exceptions.rb#33
1827
+ def locale; end
1828
+ end
1829
+
1830
+ # source://i18n//lib/i18n/exceptions.rb#40
1831
+ class I18n::InvalidLocaleData < ::I18n::ArgumentError
1832
+ # @return [InvalidLocaleData] a new instance of InvalidLocaleData
1833
+ #
1834
+ # source://i18n//lib/i18n/exceptions.rb#42
1835
+ def initialize(filename, exception_message); end
1836
+
1837
+ # Returns the value of attribute filename.
1838
+ #
1839
+ # source://i18n//lib/i18n/exceptions.rb#41
1840
+ def filename; end
1841
+ end
1842
+
1843
+ # source://i18n//lib/i18n/exceptions.rb#92
1844
+ class I18n::InvalidPluralizationData < ::I18n::ArgumentError
1845
+ # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData
1846
+ #
1847
+ # source://i18n//lib/i18n/exceptions.rb#94
1848
+ def initialize(entry, count, key); end
1849
+
1850
+ # Returns the value of attribute count.
1851
+ #
1852
+ # source://i18n//lib/i18n/exceptions.rb#93
1853
+ def count; end
1854
+
1855
+ # Returns the value of attribute entry.
1856
+ #
1857
+ # source://i18n//lib/i18n/exceptions.rb#93
1858
+ def entry; end
1859
+
1860
+ # Returns the value of attribute key.
1861
+ #
1862
+ # source://i18n//lib/i18n/exceptions.rb#93
1863
+ def key; end
1864
+ end
1865
+
1866
+ # source://i18n//lib/i18n/locale.rb#4
1867
+ module I18n::Locale; end
1868
+
1869
+ # source://i18n//lib/i18n/locale/fallbacks.rb#48
1870
+ class I18n::Locale::Fallbacks < ::Hash
1871
+ # @return [Fallbacks] a new instance of Fallbacks
1872
+ #
1873
+ # source://i18n//lib/i18n/locale/fallbacks.rb#49
1874
+ def initialize(*mappings); end
1875
+
1876
+ # @raise [InvalidLocale]
1877
+ #
1878
+ # source://i18n//lib/i18n/locale/fallbacks.rb#60
1879
+ def [](locale); end
1880
+
1881
+ # Returns the value of attribute defaults.
1882
+ #
1883
+ # source://i18n//lib/i18n/locale/fallbacks.rb#58
1884
+ def defaults; end
1885
+
1886
+ # source://i18n//lib/i18n/locale/fallbacks.rb#55
1887
+ def defaults=(defaults); end
1888
+
1889
+ # @return [Boolean]
1890
+ #
1891
+ # source://i18n//lib/i18n/locale/fallbacks.rb#82
1892
+ def empty?; end
1893
+
1894
+ # source://i18n//lib/i18n/locale/fallbacks.rb#86
1895
+ def inspect; end
1896
+
1897
+ # source://i18n//lib/i18n/locale/fallbacks.rb#67
1898
+ def map(*args, &block); end
1899
+
1900
+ protected
1901
+
1902
+ # source://i18n//lib/i18n/locale/fallbacks.rb#92
1903
+ def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end
1904
+ end
1905
+
1906
+ # source://i18n//lib/i18n/locale/tag.rb#5
1907
+ module I18n::Locale::Tag
1908
+ class << self
1909
+ # Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+.
1910
+ #
1911
+ # source://i18n//lib/i18n/locale/tag.rb#12
1912
+ def implementation; end
1913
+
1914
+ # Sets the current locale tag implementation. Use this to set a different locale tag implementation.
1915
+ #
1916
+ # source://i18n//lib/i18n/locale/tag.rb#17
1917
+ def implementation=(implementation); end
1918
+
1919
+ # Factory method for locale tags. Delegates to the current locale tag implementation.
1920
+ #
1921
+ # source://i18n//lib/i18n/locale/tag.rb#22
1922
+ def tag(tag); end
1923
+ end
1924
+ end
1925
+
1926
+ # source://i18n//lib/i18n/locale/tag/parents.rb#4
1927
+ module I18n::Locale::Tag::Parents
1928
+ # source://i18n//lib/i18n/locale/tag/parents.rb#5
1929
+ def parent; end
1930
+
1931
+ # source://i18n//lib/i18n/locale/tag/parents.rb#18
1932
+ def parents; end
1933
+
1934
+ # source://i18n//lib/i18n/locale/tag/parents.rb#14
1935
+ def self_and_parents; end
1936
+ end
1937
+
1938
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#12
1939
+ I18n::Locale::Tag::RFC4646_FORMATS = T.let(T.unsafe(nil), Hash)
1940
+
1941
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#11
1942
+ I18n::Locale::Tag::RFC4646_SUBTAGS = T.let(T.unsafe(nil), Array)
1943
+
1944
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#14
1945
+ class I18n::Locale::Tag::Rfc4646 < ::Struct
1946
+ include ::I18n::Locale::Tag::Parents
1947
+
1948
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35
1949
+ def language; end
1950
+
1951
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35
1952
+ def region; end
1953
+
1954
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35
1955
+ def script; end
1956
+
1957
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#46
1958
+ def to_a; end
1959
+
1960
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#42
1961
+ def to_s; end
1962
+
1963
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#38
1964
+ def to_sym; end
1965
+
1966
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35
1967
+ def variant; end
1968
+
1969
+ class << self
1970
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#23
1971
+ def parser; end
1972
+
1973
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#27
1974
+ def parser=(parser); end
1975
+
1976
+ # Parses the given tag and returns a Tag instance if it is valid.
1977
+ # Returns false if the given tag is not valid according to RFC 4646.
1978
+ #
1979
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#18
1980
+ def tag(tag); end
1981
+ end
1982
+ end
1983
+
1984
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#50
1985
+ module I18n::Locale::Tag::Rfc4646::Parser
1986
+ class << self
1987
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#63
1988
+ def match(tag); end
1989
+ end
1990
+ end
1991
+
1992
+ # source://i18n//lib/i18n/locale/tag/rfc4646.rb#51
1993
+ I18n::Locale::Tag::Rfc4646::Parser::PATTERN = T.let(T.unsafe(nil), Regexp)
1994
+
1995
+ # source://i18n//lib/i18n/locale/tag/simple.rb#6
1996
+ class I18n::Locale::Tag::Simple
1997
+ include ::I18n::Locale::Tag::Parents
1998
+
1999
+ # @return [Simple] a new instance of Simple
2000
+ #
2001
+ # source://i18n//lib/i18n/locale/tag/simple.rb#17
2002
+ def initialize(*tag); end
2003
+
2004
+ # source://i18n//lib/i18n/locale/tag/simple.rb#21
2005
+ def subtags; end
2006
+
2007
+ # Returns the value of attribute tag.
2008
+ #
2009
+ # source://i18n//lib/i18n/locale/tag/simple.rb#15
2010
+ def tag; end
2011
+
2012
+ # source://i18n//lib/i18n/locale/tag/simple.rb#33
2013
+ def to_a; end
2014
+
2015
+ # source://i18n//lib/i18n/locale/tag/simple.rb#29
2016
+ def to_s; end
2017
+
2018
+ # source://i18n//lib/i18n/locale/tag/simple.rb#25
2019
+ def to_sym; end
2020
+
2021
+ class << self
2022
+ # source://i18n//lib/i18n/locale/tag/simple.rb#8
2023
+ def tag(tag); end
2024
+ end
2025
+ end
2026
+
2027
+ # source://i18n//lib/i18n/middleware.rb#4
2028
+ class I18n::Middleware
2029
+ # @return [Middleware] a new instance of Middleware
2030
+ #
2031
+ # source://i18n//lib/i18n/middleware.rb#6
2032
+ def initialize(app); end
2033
+
2034
+ # source://i18n//lib/i18n/middleware.rb#10
2035
+ def call(env); end
2036
+ end
2037
+
2038
+ # source://i18n//lib/i18n/exceptions.rb#100
2039
+ class I18n::MissingInterpolationArgument < ::I18n::ArgumentError
2040
+ # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument
2041
+ #
2042
+ # source://i18n//lib/i18n/exceptions.rb#102
2043
+ def initialize(key, values, string); end
2044
+
2045
+ # Returns the value of attribute key.
2046
+ #
2047
+ # source://i18n//lib/i18n/exceptions.rb#101
2048
+ def key; end
2049
+
2050
+ # Returns the value of attribute string.
2051
+ #
2052
+ # source://i18n//lib/i18n/exceptions.rb#101
2053
+ def string; end
2054
+
2055
+ # Returns the value of attribute values.
2056
+ #
2057
+ # source://i18n//lib/i18n/exceptions.rb#101
2058
+ def values; end
2059
+ end
2060
+
2061
+ # source://i18n//lib/i18n/exceptions.rb#48
2062
+ class I18n::MissingTranslation < ::I18n::ArgumentError
2063
+ include ::I18n::MissingTranslation::Base
2064
+ end
2065
+
2066
+ # source://i18n//lib/i18n/exceptions.rb#49
2067
+ module I18n::MissingTranslation::Base
2068
+ # source://i18n//lib/i18n/exceptions.rb#54
2069
+ def initialize(locale, key, options = T.unsafe(nil)); end
2070
+
2071
+ # Returns the value of attribute key.
2072
+ #
2073
+ # source://i18n//lib/i18n/exceptions.rb#52
2074
+ def key; end
2075
+
2076
+ # source://i18n//lib/i18n/exceptions.rb#59
2077
+ def keys; end
2078
+
2079
+ # Returns the value of attribute locale.
2080
+ #
2081
+ # source://i18n//lib/i18n/exceptions.rb#52
2082
+ def locale; end
2083
+
2084
+ # source://i18n//lib/i18n/exceptions.rb#65
2085
+ def message; end
2086
+
2087
+ # source://i18n//lib/i18n/exceptions.rb#74
2088
+ def normalized_option(key); end
2089
+
2090
+ # Returns the value of attribute options.
2091
+ #
2092
+ # source://i18n//lib/i18n/exceptions.rb#52
2093
+ def options; end
2094
+
2095
+ # source://i18n//lib/i18n/exceptions.rb#80
2096
+ def to_exception; end
2097
+
2098
+ # source://i18n//lib/i18n/exceptions.rb#65
2099
+ def to_s; end
2100
+ end
2101
+
2102
+ # source://i18n//lib/i18n/exceptions.rb#50
2103
+ I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array)
2104
+
2105
+ # source://i18n//lib/i18n/exceptions.rb#88
2106
+ class I18n::MissingTranslationData < ::I18n::ArgumentError
2107
+ include ::I18n::MissingTranslation::Base
2108
+ end
2109
+
2110
+ # source://i18n//lib/i18n.rb#19
2111
+ I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array)
2112
+
2113
+ # source://i18n//lib/i18n/exceptions.rb#108
2114
+ class I18n::ReservedInterpolationKey < ::I18n::ArgumentError
2115
+ # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey
2116
+ #
2117
+ # source://i18n//lib/i18n/exceptions.rb#110
2118
+ def initialize(key, string); end
2119
+
2120
+ # Returns the value of attribute key.
2121
+ #
2122
+ # source://i18n//lib/i18n/exceptions.rb#109
2123
+ def key; end
2124
+
2125
+ # Returns the value of attribute string.
2126
+ #
2127
+ # source://i18n//lib/i18n/exceptions.rb#109
2128
+ def string; end
2129
+ end
2130
+
2131
+ # source://i18n//lib/i18n/tests.rb#4
2132
+ module I18n::Tests; end
2133
+
2134
+ # source://i18n//lib/i18n/tests/localization.rb#3
2135
+ module I18n::Tests::Localization
2136
+ class << self
2137
+ # @private
2138
+ #
2139
+ # source://i18n//lib/i18n/tests/localization.rb#9
2140
+ def included(base); end
2141
+ end
2142
+ end
2143
+
2144
+ # source://i18n//lib/i18n/exceptions.rb#116
2145
+ class I18n::UnknownFileType < ::I18n::ArgumentError
2146
+ # @return [UnknownFileType] a new instance of UnknownFileType
2147
+ #
2148
+ # source://i18n//lib/i18n/exceptions.rb#118
2149
+ def initialize(type, filename); end
2150
+
2151
+ # Returns the value of attribute filename.
2152
+ #
2153
+ # source://i18n//lib/i18n/exceptions.rb#117
2154
+ def filename; end
2155
+
2156
+ # Returns the value of attribute type.
2157
+ #
2158
+ # source://i18n//lib/i18n/exceptions.rb#117
2159
+ def type; end
2160
+ end
2161
+
2162
+ # source://i18n//lib/i18n/exceptions.rb#124
2163
+ class I18n::UnsupportedMethod < ::I18n::ArgumentError
2164
+ # @return [UnsupportedMethod] a new instance of UnsupportedMethod
2165
+ #
2166
+ # source://i18n//lib/i18n/exceptions.rb#126
2167
+ def initialize(method, backend_klass, msg); end
2168
+
2169
+ # Returns the value of attribute backend_klass.
2170
+ #
2171
+ # source://i18n//lib/i18n/exceptions.rb#125
2172
+ def backend_klass; end
2173
+
2174
+ # Returns the value of attribute method.
2175
+ #
2176
+ # source://i18n//lib/i18n/exceptions.rb#125
2177
+ def method; end
2178
+
2179
+ # Returns the value of attribute msg.
2180
+ #
2181
+ # source://i18n//lib/i18n/exceptions.rb#125
2182
+ def msg; end
2183
+ end
2184
+
2185
+ # source://i18n//lib/i18n/utils.rb#4
2186
+ module I18n::Utils
2187
+ class << self
2188
+ # source://i18n//lib/i18n/utils.rb#18
2189
+ def deep_merge(hash, other_hash, &block); end
2190
+
2191
+ # source://i18n//lib/i18n/utils.rb#22
2192
+ def deep_merge!(hash, other_hash, &block); end
2193
+
2194
+ # source://i18n//lib/i18n/utils.rb#34
2195
+ def deep_symbolize_keys(hash); end
2196
+
2197
+ # source://i18n//lib/i18n/utils.rb#7
2198
+ def except(hash, *keys); end
2199
+
2200
+ private
2201
+
2202
+ # source://i18n//lib/i18n/utils.rb#43
2203
+ def deep_symbolize_keys_in_object(value); end
2204
+ end
2205
+ end
2206
+
2207
+ # source://i18n//lib/i18n/version.rb#4
2208
+ I18n::VERSION = T.let(T.unsafe(nil), String)