checkoff 0.219.0 → 0.221.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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -4
- data/.overcommit.yml +2 -0
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +2 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +42 -8
- data/Makefile +13 -7
- data/bin/tapioca +1 -1
- data/checkoff.gemspec +1 -0
- data/fix.sh +1 -0
- data/lib/checkoff/tasks.rb +8 -2
- data/lib/checkoff/version.rb +1 -1
- data/sorbet/rbi/gems/{activesupport@7.1.3.rbi → activesupport@7.1.5.rbi} +157 -160
- data/sorbet/rbi/gems/brakeman@6.2.2.rbi +222 -0
- data/sorbet/rbi/gems/{i18n@1.14.1.rbi → i18n@1.14.6.rbi} +135 -102
- data/sorbet/rbi/gems/{logger@1.6.1.rbi → logger@1.6.2.rbi} +4 -1
- data/sorbet/rbi/gems/{mutex_m@0.2.0.rbi → mutex_m@0.3.0.rbi} +15 -12
- data/sorbet/rbi/gems/{nokogiri@1.16.7.rbi → nokogiri@1.17.0.rbi} +1693 -803
- data/sorbet/rbi/gems/{racc@1.7.3.rbi → racc@1.8.1.rbi} +33 -33
- data/sorbet/rbi/gems/{rack@3.0.8.rbi → rack@3.1.8.rbi} +697 -985
- data/sorbet/rbi/gems/{rexml@3.2.6.rbi → rexml@3.3.9.rbi} +354 -278
- data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +7546 -0
- data/sorbet/rbi/gems/securerandom@0.4.0.rbi +75 -0
- data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +320 -0
- data/sorbet/rbi/gems/{tapioca@0.16.4.rbi → tapioca@0.16.5.rbi} +89 -76
- data/sorbet/rbi/gems/{yard@0.9.34.rbi → yard@0.9.37.rbi} +429 -270
- metadata +33 -16
- data/sorbet/rbi/gems/ostruct@0.6.1.rbi +0 -354
- /data/sorbet/rbi/gems/{drb@2.2.0.rbi → drb@2.2.1.rbi} +0 -0
- /data/sorbet/rbi/gems/{gli@2.21.1.rbi → gli@2.22.0.rbi} +0 -0
- /data/sorbet/rbi/gems/{overcommit@0.64.0.rbi → overcommit@0.64.1.rbi} +0 -0
@@ -88,7 +88,7 @@ module I18n
|
|
88
88
|
# source://i18n//lib/i18n/interpolate/ruby.rb#29
|
89
89
|
def interpolate_hash(string, values); end
|
90
90
|
|
91
|
-
# source://i18n//lib/i18n.rb#
|
91
|
+
# source://i18n//lib/i18n.rb#38
|
92
92
|
def new_double_nested_cache; end
|
93
93
|
|
94
94
|
# @return [Boolean]
|
@@ -101,10 +101,10 @@ module I18n
|
|
101
101
|
# extra keys as I18n options, you should call I18n.reserve_key
|
102
102
|
# before any I18n.translate (etc) calls are made.
|
103
103
|
#
|
104
|
-
# source://i18n//lib/i18n.rb#
|
104
|
+
# source://i18n//lib/i18n.rb#46
|
105
105
|
def reserve_key(key); end
|
106
106
|
|
107
|
-
# source://i18n//lib/i18n.rb#
|
107
|
+
# source://i18n//lib/i18n.rb#51
|
108
108
|
def reserved_keys_pattern; end
|
109
109
|
end
|
110
110
|
end
|
@@ -124,15 +124,15 @@ module I18n::Backend::Base
|
|
124
124
|
#
|
125
125
|
# @raise [NotImplementedError]
|
126
126
|
#
|
127
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
127
|
+
# source://i18n//lib/i18n/backend/base.rb#97
|
128
128
|
def available_locales; end
|
129
129
|
|
130
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
130
|
+
# source://i18n//lib/i18n/backend/base.rb#105
|
131
131
|
def eager_load!; end
|
132
132
|
|
133
133
|
# @return [Boolean]
|
134
134
|
#
|
135
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
135
|
+
# source://i18n//lib/i18n/backend/base.rb#71
|
136
136
|
def exists?(locale, key, options = T.unsafe(nil)); end
|
137
137
|
|
138
138
|
# Accepts a list of paths to translation files. Loads translations from
|
@@ -148,10 +148,10 @@ module I18n::Backend::Base
|
|
148
148
|
#
|
149
149
|
# @raise [ArgumentError]
|
150
150
|
#
|
151
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
151
|
+
# source://i18n//lib/i18n/backend/base.rb#78
|
152
152
|
def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
|
153
153
|
|
154
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
154
|
+
# source://i18n//lib/i18n/backend/base.rb#101
|
155
155
|
def reload!; end
|
156
156
|
|
157
157
|
# This method receives a locale, a data hash and options for storing translations.
|
@@ -175,7 +175,7 @@ module I18n::Backend::Base
|
|
175
175
|
# ann: 'good', john: 'big'
|
176
176
|
# #=> { people: { ann: "Ann is good", john: "John is big" } }
|
177
177
|
#
|
178
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
178
|
+
# source://i18n//lib/i18n/backend/base.rb#217
|
179
179
|
def deep_interpolate(locale, data, values = T.unsafe(nil)); end
|
180
180
|
|
181
181
|
# Evaluates defaults.
|
@@ -183,12 +183,12 @@ module I18n::Backend::Base
|
|
183
183
|
# first translation that can be resolved. Otherwise it tries to resolve
|
184
184
|
# the translation directly.
|
185
185
|
#
|
186
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
186
|
+
# source://i18n//lib/i18n/backend/base.rb#128
|
187
187
|
def default(locale, object, subject, options = T.unsafe(nil)); end
|
188
188
|
|
189
189
|
# @return [Boolean]
|
190
190
|
#
|
191
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
191
|
+
# source://i18n//lib/i18n/backend/base.rb#111
|
192
192
|
def eager_loaded?; end
|
193
193
|
|
194
194
|
# Interpolates values into a given subject.
|
@@ -199,10 +199,10 @@ module I18n::Backend::Base
|
|
199
199
|
#
|
200
200
|
# if the given subject is an array then:
|
201
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
|
-
# # =>
|
202
|
+
# method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz"
|
203
|
+
# # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]]
|
204
204
|
#
|
205
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
205
|
+
# source://i18n//lib/i18n/backend/base.rb#201
|
206
206
|
def interpolate(locale, subject, values = T.unsafe(nil)); end
|
207
207
|
|
208
208
|
# Loads a single translations file by delegating to #load_rb or
|
@@ -212,41 +212,41 @@ module I18n::Backend::Base
|
|
212
212
|
#
|
213
213
|
# @raise [UnknownFileType]
|
214
214
|
#
|
215
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
215
|
+
# source://i18n//lib/i18n/backend/base.rb#240
|
216
216
|
def load_file(filename); end
|
217
217
|
|
218
218
|
# Loads a JSON translations file. The data must have locales as
|
219
219
|
# toplevel keys.
|
220
220
|
#
|
221
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
221
|
+
# source://i18n//lib/i18n/backend/base.rb#276
|
222
222
|
def load_json(filename); end
|
223
223
|
|
224
224
|
# Loads a plain Ruby translations file. eval'ing the file must yield
|
225
225
|
# a Hash containing translation data with locales as toplevel keys.
|
226
226
|
#
|
227
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
227
|
+
# source://i18n//lib/i18n/backend/base.rb#254
|
228
228
|
def load_rb(filename); end
|
229
229
|
|
230
230
|
# Loads a YAML translations file. The data must have locales as
|
231
231
|
# toplevel keys.
|
232
232
|
#
|
233
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
233
|
+
# source://i18n//lib/i18n/backend/base.rb#261
|
234
234
|
def load_yaml(filename); end
|
235
235
|
|
236
236
|
# Loads a YAML translations file. The data must have locales as
|
237
237
|
# toplevel keys.
|
238
238
|
#
|
239
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
239
|
+
# source://i18n//lib/i18n/backend/base.rb#261
|
240
240
|
def load_yml(filename); end
|
241
241
|
|
242
242
|
# The method which actually looks up for the translation in the store.
|
243
243
|
#
|
244
244
|
# @raise [NotImplementedError]
|
245
245
|
#
|
246
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
246
|
+
# source://i18n//lib/i18n/backend/base.rb#116
|
247
247
|
def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
|
248
248
|
|
249
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
249
|
+
# source://i18n//lib/i18n/backend/base.rb#308
|
250
250
|
def pluralization_key(entry, count); end
|
251
251
|
|
252
252
|
# Picks a translation from a pluralized mnemonic subkey according to English
|
@@ -260,7 +260,7 @@ module I18n::Backend::Base
|
|
260
260
|
#
|
261
261
|
# @raise [InvalidPluralizationData]
|
262
262
|
#
|
263
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
263
|
+
# source://i18n//lib/i18n/backend/base.rb#182
|
264
264
|
def pluralize(locale, entry, count); end
|
265
265
|
|
266
266
|
# Resolves a translation.
|
@@ -268,7 +268,7 @@ module I18n::Backend::Base
|
|
268
268
|
# given options. If it is a Proc then it will be evaluated. All other
|
269
269
|
# subjects will be returned directly.
|
270
270
|
#
|
271
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
271
|
+
# source://i18n//lib/i18n/backend/base.rb#150
|
272
272
|
def resolve(locale, object, subject, options = T.unsafe(nil)); end
|
273
273
|
|
274
274
|
# Resolves a translation.
|
@@ -276,15 +276,15 @@ module I18n::Backend::Base
|
|
276
276
|
# given options. If it is a Proc then it will be evaluated. All other
|
277
277
|
# subjects will be returned directly.
|
278
278
|
#
|
279
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
279
|
+
# source://i18n//lib/i18n/backend/base.rb#150
|
280
280
|
def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end
|
281
281
|
|
282
282
|
# @return [Boolean]
|
283
283
|
#
|
284
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
284
|
+
# source://i18n//lib/i18n/backend/base.rb#120
|
285
285
|
def subtrees?; end
|
286
286
|
|
287
|
-
# source://i18n//lib/i18n/backend/base.rb#
|
287
|
+
# source://i18n//lib/i18n/backend/base.rb#289
|
288
288
|
def translate_localization_format(locale, object, format, options); end
|
289
289
|
end
|
290
290
|
|
@@ -448,10 +448,10 @@ end
|
|
448
448
|
module I18n::Backend::Fallbacks
|
449
449
|
# @return [Boolean]
|
450
450
|
#
|
451
|
-
# source://i18n//lib/i18n/backend/fallbacks.rb#
|
451
|
+
# source://i18n//lib/i18n/backend/fallbacks.rb#98
|
452
452
|
def exists?(locale, key, options = T.unsafe(nil)); end
|
453
453
|
|
454
|
-
# source://i18n//lib/i18n/backend/fallbacks.rb#
|
454
|
+
# source://i18n//lib/i18n/backend/fallbacks.rb#89
|
455
455
|
def extract_non_symbol_default!(options); end
|
456
456
|
|
457
457
|
# source://i18n//lib/i18n/backend/fallbacks.rb#67
|
@@ -475,7 +475,7 @@ module I18n::Backend::Fallbacks
|
|
475
475
|
|
476
476
|
# Overwrite on_fallback to add specified logic when the fallback succeeds.
|
477
477
|
#
|
478
|
-
# source://i18n//lib/i18n/backend/fallbacks.rb#
|
478
|
+
# source://i18n//lib/i18n/backend/fallbacks.rb#114
|
479
479
|
def on_fallback(_original_locale, _fallback_locale, _key, _options); end
|
480
480
|
end
|
481
481
|
|
@@ -604,15 +604,15 @@ end
|
|
604
604
|
|
605
605
|
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#20
|
606
606
|
module I18n::Backend::InterpolationCompiler
|
607
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
607
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#97
|
608
608
|
def interpolate(locale, string, values); end
|
609
609
|
|
610
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
610
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#107
|
611
611
|
def store_translations(locale, data, options = T.unsafe(nil)); end
|
612
612
|
|
613
613
|
protected
|
614
614
|
|
615
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
615
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#113
|
616
616
|
def compile_all_strings_in(data); end
|
617
617
|
end
|
618
618
|
|
@@ -620,58 +620,55 @@ end
|
|
620
620
|
module I18n::Backend::InterpolationCompiler::Compiler
|
621
621
|
extend ::I18n::Backend::InterpolationCompiler::Compiler
|
622
622
|
|
623
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
623
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#26
|
624
624
|
def compile_if_an_interpolation(string); end
|
625
625
|
|
626
626
|
# @return [Boolean]
|
627
627
|
#
|
628
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
628
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#38
|
629
629
|
def interpolated_str?(str); end
|
630
630
|
|
631
631
|
protected
|
632
632
|
|
633
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
633
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#58
|
634
634
|
def compile_interpolation_token(key); end
|
635
635
|
|
636
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
636
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#48
|
637
637
|
def compiled_interpolation_body(str); end
|
638
638
|
|
639
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
639
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#71
|
640
640
|
def direct_key(key); end
|
641
641
|
|
642
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
642
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#91
|
643
643
|
def escape_key_sym(key); end
|
644
644
|
|
645
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
645
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#87
|
646
646
|
def escape_plain_str(str); end
|
647
647
|
|
648
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
649
|
-
def handle_interpolation_token(
|
648
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#54
|
649
|
+
def handle_interpolation_token(token); end
|
650
650
|
|
651
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
651
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#67
|
652
652
|
def interpolate_key(key); end
|
653
653
|
|
654
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
654
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#62
|
655
655
|
def interpolate_or_raise_missing(key); end
|
656
656
|
|
657
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
657
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#79
|
658
658
|
def missing_key(key); end
|
659
659
|
|
660
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
660
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#75
|
661
661
|
def nil_key(key); end
|
662
662
|
|
663
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
663
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#83
|
664
664
|
def reserved_key(key); end
|
665
665
|
|
666
666
|
# tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"]
|
667
667
|
#
|
668
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#
|
668
|
+
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#44
|
669
669
|
def tokenize(str); end
|
670
670
|
end
|
671
671
|
|
672
|
-
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#25
|
673
|
-
I18n::Backend::InterpolationCompiler::Compiler::INTERPOLATION_SYNTAX_PATTERN = T.let(T.unsafe(nil), Regexp)
|
674
|
-
|
675
672
|
# source://i18n//lib/i18n/backend/interpolation_compiler.rb#24
|
676
673
|
I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp)
|
677
674
|
|
@@ -1064,14 +1061,14 @@ end
|
|
1064
1061
|
# The implementation is provided by a Implementation module allowing to easily
|
1065
1062
|
# extend Simple backend's behavior by including modules. E.g.:
|
1066
1063
|
#
|
1067
|
-
#
|
1068
|
-
#
|
1069
|
-
#
|
1070
|
-
#
|
1071
|
-
#
|
1072
|
-
#
|
1064
|
+
# module I18n::Backend::Pluralization
|
1065
|
+
# def pluralize(*args)
|
1066
|
+
# # extended pluralization logic
|
1067
|
+
# super
|
1068
|
+
# end
|
1069
|
+
# end
|
1073
1070
|
#
|
1074
|
-
#
|
1071
|
+
# I18n::Backend::Simple.include(I18n::Backend::Pluralization)
|
1075
1072
|
#
|
1076
1073
|
# source://i18n//lib/i18n/backend/simple.rb#21
|
1077
1074
|
class I18n::Backend::Simple
|
@@ -1196,69 +1193,69 @@ class I18n::Backend::Transliterator::ProcTransliterator
|
|
1196
1193
|
def transliterate(string, replacement = T.unsafe(nil)); end
|
1197
1194
|
end
|
1198
1195
|
|
1199
|
-
# source://i18n//lib/i18n.rb#
|
1196
|
+
# source://i18n//lib/i18n.rb#55
|
1200
1197
|
module I18n::Base
|
1201
|
-
# source://i18n//lib/i18n.rb#
|
1198
|
+
# source://i18n//lib/i18n.rb#70
|
1202
1199
|
def available_locales; end
|
1203
1200
|
|
1204
|
-
# source://i18n//lib/i18n.rb#
|
1201
|
+
# source://i18n//lib/i18n.rb#74
|
1205
1202
|
def available_locales=(value); end
|
1206
1203
|
|
1207
1204
|
# @return [Boolean]
|
1208
1205
|
#
|
1209
|
-
# source://i18n//lib/i18n.rb#
|
1206
|
+
# source://i18n//lib/i18n.rb#386
|
1210
1207
|
def available_locales_initialized?; end
|
1211
1208
|
|
1212
|
-
# source://i18n//lib/i18n.rb#
|
1209
|
+
# source://i18n//lib/i18n.rb#70
|
1213
1210
|
def backend; end
|
1214
1211
|
|
1215
|
-
# source://i18n//lib/i18n.rb#
|
1212
|
+
# source://i18n//lib/i18n.rb#74
|
1216
1213
|
def backend=(value); end
|
1217
1214
|
|
1218
1215
|
# Gets I18n configuration object.
|
1219
1216
|
#
|
1220
|
-
# source://i18n//lib/i18n.rb#
|
1217
|
+
# source://i18n//lib/i18n.rb#57
|
1221
1218
|
def config; end
|
1222
1219
|
|
1223
1220
|
# Sets I18n configuration object.
|
1224
1221
|
#
|
1225
|
-
# source://i18n//lib/i18n.rb#
|
1222
|
+
# source://i18n//lib/i18n.rb#62
|
1226
1223
|
def config=(value); end
|
1227
1224
|
|
1228
|
-
# source://i18n//lib/i18n.rb#
|
1225
|
+
# source://i18n//lib/i18n.rb#70
|
1229
1226
|
def default_locale; end
|
1230
1227
|
|
1231
|
-
# source://i18n//lib/i18n.rb#
|
1228
|
+
# source://i18n//lib/i18n.rb#74
|
1232
1229
|
def default_locale=(value); end
|
1233
1230
|
|
1234
|
-
# source://i18n//lib/i18n.rb#
|
1231
|
+
# source://i18n//lib/i18n.rb#70
|
1235
1232
|
def default_separator; end
|
1236
1233
|
|
1237
|
-
# source://i18n//lib/i18n.rb#
|
1234
|
+
# source://i18n//lib/i18n.rb#74
|
1238
1235
|
def default_separator=(value); end
|
1239
1236
|
|
1240
1237
|
# Tells the backend to load translations now. Used in situations like the
|
1241
1238
|
# Rails production environment. Backends can implement whatever strategy
|
1242
1239
|
# is useful.
|
1243
1240
|
#
|
1244
|
-
# source://i18n//lib/i18n.rb#
|
1241
|
+
# source://i18n//lib/i18n.rb#91
|
1245
1242
|
def eager_load!; end
|
1246
1243
|
|
1247
|
-
# source://i18n//lib/i18n.rb#
|
1244
|
+
# source://i18n//lib/i18n.rb#70
|
1248
1245
|
def enforce_available_locales; end
|
1249
1246
|
|
1250
1247
|
# Raises an InvalidLocale exception when the passed locale is not available.
|
1251
1248
|
#
|
1252
|
-
# source://i18n//lib/i18n.rb#
|
1249
|
+
# source://i18n//lib/i18n.rb#380
|
1253
1250
|
def enforce_available_locales!(locale); end
|
1254
1251
|
|
1255
|
-
# source://i18n//lib/i18n.rb#
|
1252
|
+
# source://i18n//lib/i18n.rb#74
|
1256
1253
|
def enforce_available_locales=(value); end
|
1257
1254
|
|
1258
|
-
# source://i18n//lib/i18n.rb#
|
1255
|
+
# source://i18n//lib/i18n.rb#70
|
1259
1256
|
def exception_handler; end
|
1260
1257
|
|
1261
|
-
# source://i18n//lib/i18n.rb#
|
1258
|
+
# source://i18n//lib/i18n.rb#74
|
1262
1259
|
def exception_handler=(value); end
|
1263
1260
|
|
1264
1261
|
# Returns true if a translation exists for a given key, otherwise returns false.
|
@@ -1266,26 +1263,51 @@ module I18n::Base
|
|
1266
1263
|
# @raise [Disabled]
|
1267
1264
|
# @return [Boolean]
|
1268
1265
|
#
|
1269
|
-
# source://i18n//lib/i18n.rb#
|
1266
|
+
# source://i18n//lib/i18n.rb#265
|
1270
1267
|
def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end
|
1271
1268
|
|
1269
|
+
# Returns an array of interpolation keys for the given translation key
|
1270
|
+
#
|
1271
|
+
# *Examples*
|
1272
|
+
#
|
1273
|
+
# Suppose we have the following:
|
1274
|
+
# I18n.t 'example.zero' == 'Zero interpolations'
|
1275
|
+
# I18n.t 'example.one' == 'One interpolation %{foo}'
|
1276
|
+
# I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}'
|
1277
|
+
# I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}']
|
1278
|
+
# I18n.t 'example.one', locale: :other == 'One interpolation %{baz}'
|
1279
|
+
#
|
1280
|
+
# Then we can expect the following results:
|
1281
|
+
# I18n.interpolation_keys('example.zero') #=> []
|
1282
|
+
# I18n.interpolation_keys('example.one') #=> ['foo']
|
1283
|
+
# I18n.interpolation_keys('example.two') #=> ['foo', 'bar']
|
1284
|
+
# I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz']
|
1285
|
+
# I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz']
|
1286
|
+
# I18n.interpolation_keys('does-not-exist') #=> []
|
1287
|
+
# I18n.interpolation_keys('example') #=> []
|
1288
|
+
#
|
1289
|
+
# @raise [I18n::ArgumentError]
|
1290
|
+
#
|
1291
|
+
# source://i18n//lib/i18n.rb#254
|
1292
|
+
def interpolation_keys(key, **options); end
|
1293
|
+
|
1272
1294
|
# Localizes certain objects, such as dates and numbers to local formatting.
|
1273
1295
|
#
|
1274
1296
|
# @raise [Disabled]
|
1275
1297
|
#
|
1276
|
-
# source://i18n//lib/i18n.rb#
|
1298
|
+
# source://i18n//lib/i18n.rb#335
|
1277
1299
|
def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
|
1278
1300
|
|
1279
|
-
# source://i18n//lib/i18n.rb#
|
1301
|
+
# source://i18n//lib/i18n.rb#70
|
1280
1302
|
def load_path; end
|
1281
1303
|
|
1282
|
-
# source://i18n//lib/i18n.rb#
|
1304
|
+
# source://i18n//lib/i18n.rb#74
|
1283
1305
|
def load_path=(value); end
|
1284
1306
|
|
1285
|
-
# source://i18n//lib/i18n.rb#
|
1307
|
+
# source://i18n//lib/i18n.rb#70
|
1286
1308
|
def locale; end
|
1287
1309
|
|
1288
|
-
# source://i18n//lib/i18n.rb#
|
1310
|
+
# source://i18n//lib/i18n.rb#74
|
1289
1311
|
def locale=(value); end
|
1290
1312
|
|
1291
1313
|
# Returns true when the passed locale, which can be either a String or a
|
@@ -1293,28 +1315,28 @@ module I18n::Base
|
|
1293
1315
|
#
|
1294
1316
|
# @return [Boolean]
|
1295
1317
|
#
|
1296
|
-
# source://i18n//lib/i18n.rb#
|
1318
|
+
# source://i18n//lib/i18n.rb#375
|
1297
1319
|
def locale_available?(locale); end
|
1298
1320
|
|
1299
1321
|
# Localizes certain objects, such as dates and numbers to local formatting.
|
1300
1322
|
#
|
1301
1323
|
# @raise [Disabled]
|
1302
1324
|
#
|
1303
|
-
# source://i18n//lib/i18n.rb#
|
1325
|
+
# source://i18n//lib/i18n.rb#335
|
1304
1326
|
def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
|
1305
1327
|
|
1306
1328
|
# Merges the given locale, key and scope into a single array of keys.
|
1307
1329
|
# Splits keys that contain dots into multiple keys. Makes sure all
|
1308
1330
|
# keys are Symbols.
|
1309
1331
|
#
|
1310
|
-
# source://i18n//lib/i18n.rb#
|
1332
|
+
# source://i18n//lib/i18n.rb#363
|
1311
1333
|
def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end
|
1312
1334
|
|
1313
1335
|
# Tells the backend to reload translations. Used in situations like the
|
1314
1336
|
# Rails development environment. Backends can implement whatever strategy
|
1315
1337
|
# is useful.
|
1316
1338
|
#
|
1317
|
-
# source://i18n//lib/i18n.rb#
|
1339
|
+
# source://i18n//lib/i18n.rb#83
|
1318
1340
|
def reload!; end
|
1319
1341
|
|
1320
1342
|
# Translates, pluralizes and interpolates a given key using a given locale,
|
@@ -1387,7 +1409,7 @@ module I18n::Base
|
|
1387
1409
|
# or <tt>default</tt> if no translations for <tt>:foo</tt> and <tt>:bar</tt> were found.
|
1388
1410
|
# I18n.t :foo, :default => [:bar, 'default']
|
1389
1411
|
#
|
1390
|
-
#
|
1412
|
+
# <b>BULK LOOKUP</b>
|
1391
1413
|
#
|
1392
1414
|
# This returns an array with the translations for <tt>:foo</tt> and <tt>:bar</tt>.
|
1393
1415
|
# I18n.t [:foo, :bar]
|
@@ -1406,7 +1428,7 @@ module I18n::Base
|
|
1406
1428
|
# E.g. assuming the key <tt>:salutation</tt> resolves to:
|
1407
1429
|
# lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
|
1408
1430
|
#
|
1409
|
-
# Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
|
1431
|
+
# Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith')</tt> will result in "Mrs. Smith".
|
1410
1432
|
#
|
1411
1433
|
# Note that the string returned by lambda will go through string interpolation too,
|
1412
1434
|
# so the following lambda would give the same result:
|
@@ -1418,7 +1440,7 @@ module I18n::Base
|
|
1418
1440
|
# always return the same translations/values per unique combination of argument
|
1419
1441
|
# values.
|
1420
1442
|
#
|
1421
|
-
#
|
1443
|
+
# <b>Ruby 2.7+ keyword arguments warning</b>
|
1422
1444
|
#
|
1423
1445
|
# This method uses keyword arguments.
|
1424
1446
|
# There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
|
@@ -1435,13 +1457,13 @@ module I18n::Base
|
|
1435
1457
|
#
|
1436
1458
|
# @raise [Disabled]
|
1437
1459
|
#
|
1438
|
-
# source://i18n//lib/i18n.rb#
|
1460
|
+
# source://i18n//lib/i18n.rb#211
|
1439
1461
|
def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
|
1440
1462
|
|
1441
1463
|
# Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
|
1442
1464
|
# this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
|
1443
1465
|
#
|
1444
|
-
# source://i18n//lib/i18n.rb#
|
1466
|
+
# source://i18n//lib/i18n.rb#230
|
1445
1467
|
def t!(key, **options); end
|
1446
1468
|
|
1447
1469
|
# Translates, pluralizes and interpolates a given key using a given locale,
|
@@ -1514,7 +1536,7 @@ module I18n::Base
|
|
1514
1536
|
# or <tt>default</tt> if no translations for <tt>:foo</tt> and <tt>:bar</tt> were found.
|
1515
1537
|
# I18n.t :foo, :default => [:bar, 'default']
|
1516
1538
|
#
|
1517
|
-
#
|
1539
|
+
# <b>BULK LOOKUP</b>
|
1518
1540
|
#
|
1519
1541
|
# This returns an array with the translations for <tt>:foo</tt> and <tt>:bar</tt>.
|
1520
1542
|
# I18n.t [:foo, :bar]
|
@@ -1533,7 +1555,7 @@ module I18n::Base
|
|
1533
1555
|
# E.g. assuming the key <tt>:salutation</tt> resolves to:
|
1534
1556
|
# lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
|
1535
1557
|
#
|
1536
|
-
# Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
|
1558
|
+
# Then <tt>I18n.t(:salutation, :gender => 'w', :name => 'Smith')</tt> will result in "Mrs. Smith".
|
1537
1559
|
#
|
1538
1560
|
# Note that the string returned by lambda will go through string interpolation too,
|
1539
1561
|
# so the following lambda would give the same result:
|
@@ -1545,7 +1567,7 @@ module I18n::Base
|
|
1545
1567
|
# always return the same translations/values per unique combination of argument
|
1546
1568
|
# values.
|
1547
1569
|
#
|
1548
|
-
#
|
1570
|
+
# <b>Ruby 2.7+ keyword arguments warning</b>
|
1549
1571
|
#
|
1550
1572
|
# This method uses keyword arguments.
|
1551
1573
|
# There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
|
@@ -1562,13 +1584,13 @@ module I18n::Base
|
|
1562
1584
|
#
|
1563
1585
|
# @raise [Disabled]
|
1564
1586
|
#
|
1565
|
-
# source://i18n//lib/i18n.rb#
|
1587
|
+
# source://i18n//lib/i18n.rb#211
|
1566
1588
|
def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
|
1567
1589
|
|
1568
1590
|
# Wrapper for <tt>translate</tt> that adds <tt>:raise => true</tt>. With
|
1569
1591
|
# this option, if no translation is found, it will raise <tt>I18n::MissingTranslationData</tt>
|
1570
1592
|
#
|
1571
|
-
# source://i18n//lib/i18n.rb#
|
1593
|
+
# source://i18n//lib/i18n.rb#230
|
1572
1594
|
def translate!(key, **options); end
|
1573
1595
|
|
1574
1596
|
# Transliterates UTF-8 characters to ASCII. By default this method will
|
@@ -1623,12 +1645,12 @@ module I18n::Base
|
|
1623
1645
|
# I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen"
|
1624
1646
|
# I18n.transliterate("Jürgen", :locale => :de) # => "Juergen"
|
1625
1647
|
#
|
1626
|
-
# source://i18n//lib/i18n.rb#
|
1648
|
+
# source://i18n//lib/i18n.rb#324
|
1627
1649
|
def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end
|
1628
1650
|
|
1629
1651
|
# Executes block with given I18n.locale set.
|
1630
1652
|
#
|
1631
|
-
# source://i18n//lib/i18n.rb#
|
1653
|
+
# source://i18n//lib/i18n.rb#346
|
1632
1654
|
def with_locale(tmp_locale = T.unsafe(nil)); end
|
1633
1655
|
|
1634
1656
|
private
|
@@ -1652,13 +1674,16 @@ module I18n::Base
|
|
1652
1674
|
# I18n.exception_handler = I18nExceptionHandler.new # an object
|
1653
1675
|
# I18n.exception_handler.call(exception, locale, key, options) # will be called like this
|
1654
1676
|
#
|
1655
|
-
# source://i18n//lib/i18n.rb#
|
1677
|
+
# source://i18n//lib/i18n.rb#422
|
1656
1678
|
def handle_exception(handling, exception, locale, key, options); end
|
1657
1679
|
|
1658
|
-
# source://i18n//lib/i18n.rb#
|
1680
|
+
# source://i18n//lib/i18n.rb#464
|
1681
|
+
def interpolation_keys_from_translation(translation); end
|
1682
|
+
|
1683
|
+
# source://i18n//lib/i18n.rb#440
|
1659
1684
|
def normalize_key(key, separator); end
|
1660
1685
|
|
1661
|
-
# source://i18n//lib/i18n.rb#
|
1686
|
+
# source://i18n//lib/i18n.rb#392
|
1662
1687
|
def translate_key(key, throw, raise, locale, backend, options); end
|
1663
1688
|
end
|
1664
1689
|
|
@@ -1820,7 +1845,7 @@ class I18n::Disabled < ::I18n::ArgumentError
|
|
1820
1845
|
def initialize(method); end
|
1821
1846
|
end
|
1822
1847
|
|
1823
|
-
# source://i18n//lib/i18n.rb#
|
1848
|
+
# source://i18n//lib/i18n.rb#36
|
1824
1849
|
I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
|
1825
1850
|
|
1826
1851
|
# source://i18n//lib/i18n/exceptions.rb#6
|
@@ -2012,12 +2037,20 @@ class I18n::Locale::Fallbacks < ::Hash
|
|
2012
2037
|
# source://i18n//lib/i18n/locale/fallbacks.rb#55
|
2013
2038
|
def defaults=(defaults); end
|
2014
2039
|
|
2040
|
+
# @return [Boolean]
|
2041
|
+
#
|
2042
|
+
# source://i18n//lib/i18n/locale/fallbacks.rb#82
|
2043
|
+
def empty?; end
|
2044
|
+
|
2045
|
+
# source://i18n//lib/i18n/locale/fallbacks.rb#86
|
2046
|
+
def inspect; end
|
2047
|
+
|
2015
2048
|
# source://i18n//lib/i18n/locale/fallbacks.rb#67
|
2016
2049
|
def map(*args, &block); end
|
2017
2050
|
|
2018
2051
|
protected
|
2019
2052
|
|
2020
|
-
# source://i18n//lib/i18n/locale/fallbacks.rb#
|
2053
|
+
# source://i18n//lib/i18n/locale/fallbacks.rb#92
|
2021
2054
|
def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end
|
2022
2055
|
end
|
2023
2056
|
|
@@ -770,12 +770,15 @@ class Logger
|
|
770
770
|
|
771
771
|
private
|
772
772
|
|
773
|
-
# source://logger//lib/logger.rb#
|
773
|
+
# source://logger//lib/logger.rb#758
|
774
774
|
def format_message(severity, datetime, progname, msg); end
|
775
775
|
|
776
776
|
# source://logger//lib/logger.rb#745
|
777
777
|
def format_severity(severity); end
|
778
778
|
|
779
|
+
# source://logger//lib/logger.rb#754
|
780
|
+
def level_key; end
|
781
|
+
|
779
782
|
# Guarantee the existence of this ivar even when subclasses don't call the superclass constructor.
|
780
783
|
#
|
781
784
|
# source://logger//lib/logger.rb#750
|