Skip to content

Commit

Permalink
Merge pull request #2118 from samvera/local-file-load-order
Browse files Browse the repository at this point in the history
🧹 Change locale file load order so that our local files are prioritized
  • Loading branch information
ShanaLMoore authored Jan 2, 2024
2 parents 5e58fd9 + 4162498 commit 5907888
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ def self.path_for(relative_path)
# Seems at some point `ActiveRecord::Base.yaml_column_permitted_classes` loses all the values we set above
# so we need to set it again here.
ActiveRecord::Base.yaml_column_permitted_classes = yaml_column_permitted_classes

# Because we're loading local translations early in the to_prepare block for our decorators,
# the I18n.load_path is out of order. This line ensures that we load local translations last.
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.yml')]
end
end
end

0 comments on commit 5907888

Please sign in to comment.