File tree Expand file tree Collapse file tree 2 files changed +1
-26
lines changed
app/components/solidus_admin Expand file tree Collapse file tree 2 files changed +1
-26
lines changed Original file line number Diff line number Diff line change @@ -13,31 +13,6 @@ def icon_tag(name, **attrs)
1313 render component ( "ui/icon" ) . new ( name : name , **attrs )
1414 end
1515
16- module InheritableTranslations
17- def build_i18n_backend
18- return if compiled?
19-
20- # We need to load the translations files from the ancestors so a component
21- # can inherit translations from its parent and is able to overwrite them.
22- translation_files = ancestors . reverse_each . with_object ( [ ] ) do |ancestor , files |
23- if ancestor . is_a? ( Class ) && ancestor < ViewComponent ::Base
24- files . concat ( ancestor . sidecar_files ( %w[ yml yaml ] . freeze ) )
25- end
26- end
27-
28- # In development it will become nil if the translations file is removed
29- self . i18n_backend = if translation_files . any?
30- ViewComponent ::Translatable ::I18nBackend . new (
31- i18n_scope : i18n_scope ,
32- load_paths : translation_files
33- )
34- end
35- end
36- end
37-
38- # Can be removed once https://github.com/ViewComponent/view_component/pull/1934 is released
39- extend InheritableTranslations unless Gem ::Version . new ( ViewComponent ::VERSION ::STRING ) >= Gem ::Version . new ( "3.9" )
40-
4116 def missing_translation ( key , options )
4217 keys = I18n . normalize_keys ( options [ :locale ] || I18n . locale , key , options [ :scope ] )
4318
Original file line number Diff line number Diff line change @@ -30,5 +30,5 @@ Gem::Specification.new do |s|
3030 s . add_dependency 'solidus_core' , '> 4.2'
3131 s . add_dependency 'stimulus-rails' , '~> 1.2'
3232 s . add_dependency 'turbo-rails' , '~> 1.4'
33- s . add_dependency 'view_component' , '~> 3.3 '
33+ s . add_dependency 'view_component' , '~> 3.9 '
3434end
You can’t perform that action at this time.
0 commit comments