rails/activesupport/CHANGELOG.md
Nick Schwaderer e617046124 Do not watch translations from gems when reloading is enabled
Co-authored-by: Gannon McGibbon <gannon@hey.com>

I18n is intialized with file watchers for all translation paths when
reloading is enabled.

This includes translations contained within gems; which the user will
not be editing in development. This adds unnecessary performance
overhead.

This change ensures we're only watching the files we care about.

```ruby
[
  "/Users/schwad/.gem/ruby/3.3.3/gems/validate_url-1.0.15/lib/locale/ar.yml", #
  ...
  "/Users/schwad/path/to/my/app/config/locales/foo/en.yml"
  ...
]

```
[
  "/Users/schwad/path/to/my/app/config/locales/foo/en.yml"
  ...
]
```
2024-07-11 08:16:21 +01:00

982 B

  • Optimize load time for Railtie#initialize_i18n. Filter I18n.load_paths passed to the file watcher to only those under Rails.root. Previously the watcher would grab all available locales, including those in gems which do not require a watcher because they won't change.

    Nick Schwaderer

  • Add a filter option to in_order_of to prioritize certain values in the sorting without filtering the results by these values.

    Igor Depolli

  • Improve error message when using assert_difference or assert_changes with a proc by printing the proc's source code (MRI only).

    Richard Böhme, Jean Boussier

  • Add a new configuration value :zone for ActiveSupport.to_time_preserves_timezone and rename the previous true value to :offset. The new default value is :zone.

    Jason Kim, John Hawthorn

Please check 7-2-stable for previous changes.