Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load locales early #365

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 49 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: /app/samvera/hyrax-webapp
specs:
iiif_print (1.0.0)
iiif_print (3.0.0)
blacklight_iiif_search (>= 1.0, < 3.0)
derivative-rodeo (~> 0.5)
hyrax (>= 2.5, < 6)
Expand Down Expand Up @@ -65,7 +65,7 @@ GEM
activemodel (= 5.2.8.1)
activesupport (= 5.2.8.1)
arel (>= 9.0)
activerecord-import (1.5.1)
activerecord-import (1.7.0)
activerecord (>= 4.2)
activestorage (5.2.8.1)
actionpack (= 5.2.8.1)
Expand All @@ -76,8 +76,8 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
almond-rails (0.3.0)
rails (>= 4.2)
arel (9.0.0)
Expand All @@ -87,29 +87,30 @@ GEM
awesome_nested_set (3.6.0)
activerecord (>= 4.0.0, < 7.2)
aws-eventstream (1.3.0)
aws-partitions (1.857.0)
aws-sdk-core (3.188.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (1.951.0)
aws-sdk-core (3.201.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.73.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.140.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.156.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.6)
aws-sdk-sqs (1.68.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.7.0)
aws-sigv4 (~> 1.5)
aws-sdk-sqs (1.80.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
backport (1.2.0)
base64 (0.2.0)
bcp47 (0.3.3)
i18n
bcrypt (3.1.20)
Expand Down Expand Up @@ -183,6 +184,7 @@ GEM
thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
crass (1.0.6)
csv (3.3.0)
database_cleaner (1.99.0)
date (3.3.4)
declarative (0.0.20)
Expand All @@ -191,7 +193,7 @@ GEM
declarative-option (0.1.0)
deprecation (1.1.0)
activesupport
derivative-rodeo (0.5.2)
derivative-rodeo (0.5.3)
activesupport (>= 5)
aws-sdk-s3
aws-sdk-sqs
Expand All @@ -200,13 +202,13 @@ GEM
mime-types
mini_magick
nokogiri
devise (4.9.3)
devise (4.9.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-guests (0.8.2)
devise-guests (0.8.3)
devise
diff-lcs (1.5.0)
disposable (0.4.7)
Expand Down Expand Up @@ -305,43 +307,45 @@ GEM
faraday
fcrepo_wrapper (0.9.0)
ruby-progressbar
ffi (1.16.3)
ffi (1.17.0)
flipflop (2.7.1)
activesupport (>= 4.0)
terminal-table (>= 1.8)
flot-rails (0.0.7)
jquery-rails
font-awesome-rails (4.7.0.8)
railties (>= 3.2, < 8.0)
geocoder (1.8.2)
geocoder (1.8.3)
base64 (>= 0.1.0)
csv (>= 3.0.0)
globalid (1.1.0)
activesupport (>= 5.0)
google-apis-core (0.11.2)
google-apis-core (0.11.3)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-drive_v3 (0.44.0)
google-apis-drive_v3 (0.46.0)
google-apis-core (>= 0.11.0, < 2.a)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
haml (6.2.3)
haml (6.3.0)
temple (>= 0.8.2)
thor
tilt
hashie (5.0.0)
hiredis (0.6.3)
htmlentities (4.3.4)
http_logger (0.7.0)
httparty (0.21.0)
httparty (0.22.0)
csv
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
httpclient (2.8.3)
Expand Down Expand Up @@ -452,10 +456,10 @@ GEM
activesupport (>= 3.2.18)
faraday (>= 0.9)
json
iiif_manifest (1.3.1)
iiif_manifest (1.5.0)
activesupport (>= 4)
jaro_winkler (1.5.6)
jbuilder (2.11.5)
jbuilder (2.12.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jmespath (1.6.2)
Expand All @@ -482,9 +486,10 @@ GEM
json-ld-preloaded (3.1.6)
json-ld (~> 3.1)
rdf (~> 3.1)
json-schema (4.1.1)
json-schema (4.3.0)
addressable (>= 2.8)
jwt (2.7.1)
jwt (2.8.2)
base64
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand Down Expand Up @@ -569,10 +574,10 @@ GEM
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mime-types (3.5.1)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1003)
mini_magick (4.12.0)
mime-types-data (3.2024.0702)
mini_magick (4.13.1)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
Expand Down Expand Up @@ -626,7 +631,7 @@ GEM
posix-spawn (0.3.15)
power_converter (0.1.2)
psych (3.3.4)
public_suffix (5.0.4)
public_suffix (5.1.1)
puma (3.12.6)
qa (5.11.0)
activerecord-import
Expand Down Expand Up @@ -678,7 +683,7 @@ GEM
rainbow (3.1.1)
rake (13.1.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdf (3.2.11)
link_header (~> 0.0, >= 0.0.8)
Expand Down Expand Up @@ -759,7 +764,7 @@ GEM
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
request_store (1.5.1)
request_store (1.7.0)
rack (>= 1.4)
responders (3.1.1)
actionpack (>= 5.2)
Expand All @@ -768,7 +773,7 @@ GEM
reverse_markdown (2.1.1)
nokogiri
rexml (3.2.6)
rsolr (2.5.0)
rsolr (2.6.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
rspec-activemodel-mocks (1.1.0)
Expand Down Expand Up @@ -853,12 +858,12 @@ GEM
sxp (~> 1.1)
shoulda-matchers (3.1.3)
activesupport (>= 4.0.0)
signet (0.18.0)
signet (0.19.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simple_form (5.3.0)
simple_form (5.3.1)
actionpack (>= 5.2)
activemodel (>= 5.2)
simplecov (0.16.1)
Expand Down Expand Up @@ -913,7 +918,7 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.7.2)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
ssrf_filter (1.0.8)
sxp (1.2.4)
Expand Down Expand Up @@ -964,20 +969,19 @@ GEM
rdf-vocab
reform (~> 2.2)
reform-rails
version_gem (1.1.3)
version_gem (1.1.4)
warden (1.2.9)
rack (>= 2.0.9)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
webrick (1.8.1)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
yard (0.9.34)
zeitwerk (2.6.12)
zeitwerk (2.6.16)

PLATFORMS
ruby
Expand Down
4 changes: 4 additions & 0 deletions lib/iiif_print/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class Engine < ::Rails::Engine

Hyrax.publisher.subscribe(IiifPrint::Listener.new) if Hyrax.respond_to?(:publisher)

# Load locales early so decorators can use them during initialization
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.yml'),
IiifPrint::Engine.root.join('config', 'locales', '**', '*.yml')]

# Allows us to use decorator files
Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")).sort.each do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
Expand Down
Loading