File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ * Don't execute i18n watcher on boot. It shouldn't catch any file changes initially,
2
+ and unnecessarily slows down boot of applications with lots of translations.
3
+
4
+ * Gannon McGibbon* , * David Stosik*
5
+
1
6
* Fix ` ActiveSupport::HashWithIndifferentAccess#stringify_keys ` to stringify all keys not just symbols.
2
7
3
8
Previously:
Original file line number Diff line number Diff line change @@ -68,15 +68,14 @@ def self.initialize_i18n(app)
68
68
directories = watched_dirs_with_extensions ( reloadable_paths )
69
69
root_load_paths = I18n . load_path . select { |path | path . to_s . start_with? ( Rails . root . to_s ) }
70
70
reloader = app . config . file_watcher . new ( root_load_paths , directories ) do
71
- I18n . load_path . delete_if { |p | p . to_s . start_with? ( Rails . root . to_s ) && !File . exist? ( p ) }
71
+ I18n . load_path . delete_if { |path | path . to_s . start_with? ( Rails . root . to_s ) && !File . exist? ( path ) }
72
72
I18n . load_path |= reloadable_paths . flat_map ( &:existent )
73
73
end
74
74
75
75
app . reloaders << reloader
76
76
app . reloader . to_run do
77
77
reloader . execute_if_updated { require_unload_lock! }
78
78
end
79
- reloader . execute
80
79
end
81
80
82
81
@i18n_inited = true
You can’t perform that action at this time.
0 commit comments