From 7ad4268f3778ace4492aea4b6b3ab225a7582562 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Mon, 12 Feb 2024 15:46:55 -0800 Subject: [PATCH 1/2] i693 - controlled vocab location dropdown does not load Add missing translation for based_near label. Add geonames_username configuration to hyrax initializater to match production settings. Issue - https://github.com/scientist-softserv/adventist-dl/issues/693 --- config/initializers/hyrax.rb | 5 +++++ config/locales/hyrax.en.yml | 1 + hyrax-webapp | 2 +- ops/staging-deploy.tmpl.yaml | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/initializers/hyrax.rb b/config/initializers/hyrax.rb index 529a4a2d..914e5679 100644 --- a/config/initializers/hyrax.rb +++ b/config/initializers/hyrax.rb @@ -16,4 +16,9 @@ # Also, we will continue to extract txt file's text using Adventist::TextFileTextExtractionService config.extract_full_text = false config.work_requires_files = false + + # Location autocomplete uses geonames to search for named regions. + # Specify the user for connecting to geonames: + # Register here: http://www.geonames.org/manageaccount + config.geonames_username = 'jcoyne' end diff --git a/config/locales/hyrax.en.yml b/config/locales/hyrax.en.yml index 2bf07b11..70e09416 100644 --- a/config/locales/hyrax.en.yml +++ b/config/locales/hyrax.en.yml @@ -1083,6 +1083,7 @@ en: title: A name to aid in identifying the Administrative Set and to distinguish it from other Administrative Sets in the repository. collection: based_near: A place name related to the collection, such as its site of publication, or the city, state, or country the collection contents are about. Calls upon the GeoNames web service. + based_near_label: A place name related to the work, such as its site of publication, or the city, state, or country the work contents are about. Calls upon the GeoNames web service. contributor: A person or group you want to recognize for playing a role in the creation of the collection, but not the primary role. creator: The person or group responsible for the collection. Usually this is the author of the content. Personal names should be entered with the last name first, e.g. "Smith, John.". date_created: The date on which the collection was created. diff --git a/hyrax-webapp b/hyrax-webapp index dbe996e7..e339f60d 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit dbe996e71afa63a5ba8f68f55e4c50ed25d3729d +Subproject commit e339f60d0b549d7f19c4a4dce43adf7d5135c7ea diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index 93077b4f..0b26802c 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -95,6 +95,8 @@ extraEnvVars: &envVars value: "8080" - name: FCREPO_REST_PATH value: rest + - name: HYKU_GEONAMES_USERNAME + value: 'jcoyne' # - name: GOOGLE_ANALYTICS_ID # value: $GOOGLE_ANALYTICS_ID # - name: GOOGLE_OAUTH_APP_NAME From 9d1bee72de3e1aa521d12059b405335403058602 Mon Sep 17 00:00:00 2001 From: Shana Moore Date: Tue, 13 Feb 2024 15:10:39 -0800 Subject: [PATCH 2/2] :gift: Set HYKU_GEONAMES_USERNAME geonames username and password are in 1Password too. --- config/initializers/hyrax.rb | 2 +- ops/dev-deploy.tmpl.yaml | 2 ++ ops/production-deploy.tmpl.yaml | 2 ++ ops/staging-deploy.tmpl.yaml | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/initializers/hyrax.rb b/config/initializers/hyrax.rb index 914e5679..3fc5ac56 100644 --- a/config/initializers/hyrax.rb +++ b/config/initializers/hyrax.rb @@ -20,5 +20,5 @@ # Location autocomplete uses geonames to search for named regions. # Specify the user for connecting to geonames: # Register here: http://www.geonames.org/manageaccount - config.geonames_username = 'jcoyne' + config.geonames_username = ENV.fetch('HYKU_GEONAMES_USERNAME', 'jcoyne') end diff --git a/ops/dev-deploy.tmpl.yaml b/ops/dev-deploy.tmpl.yaml index e211b61f..2fd06bb7 100644 --- a/ops/dev-deploy.tmpl.yaml +++ b/ops/dev-deploy.tmpl.yaml @@ -94,6 +94,8 @@ extraEnvVars: &envVars value: 'changeme@example.com' - name: HYKU_DEFAULT_HOST value: "%{tenant}.s2.adventistdigitallibrary.org" + - name: HYKU_GEONAMES_USERNAME + value: 'scientist' - name: HYKU_MULTITENANT value: "true" - name: HYKU_ROOT_HOST diff --git a/ops/production-deploy.tmpl.yaml b/ops/production-deploy.tmpl.yaml index a48b0a00..ef4b0eb6 100644 --- a/ops/production-deploy.tmpl.yaml +++ b/ops/production-deploy.tmpl.yaml @@ -100,6 +100,8 @@ extraEnvVars: &envVars value: "%{tenant}.b2.adventistdigitallibrary.org" - name: HYKU_FILE_ACL value: "false" + - name: HYKU_GEONAMES_USERNAME + value: 'scientist' - name: HYKU_MULTITENANT value: "true" - name: HYKU_ROOT_HOST diff --git a/ops/staging-deploy.tmpl.yaml b/ops/staging-deploy.tmpl.yaml index 0b26802c..85c382d8 100644 --- a/ops/staging-deploy.tmpl.yaml +++ b/ops/staging-deploy.tmpl.yaml @@ -96,7 +96,7 @@ extraEnvVars: &envVars - name: FCREPO_REST_PATH value: rest - name: HYKU_GEONAMES_USERNAME - value: 'jcoyne' + value: 'scientist' # - name: GOOGLE_ANALYTICS_ID # value: $GOOGLE_ANALYTICS_ID # - name: GOOGLE_OAUTH_APP_NAME