Skip to content

Commit

Permalink
default geonames_username to HYKU_GEONAMES_USERNAME
Browse files Browse the repository at this point in the history
Setting HYKU_GEONAMES_USERNAME doesn't work per the README's instruction without this change.

The username is also configurable per tenant. This commit includes instructions to clarify such with the user.
  • Loading branch information
Shana Moore committed Feb 14, 2024
1 parent 083535c commit fce8374
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/models/concerns/account_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module AccountSettings
setting :file_size_limit, type: 'string', default: 5.gigabytes.to_s
setting :google_analytics_id, type: 'string'
setting :google_scholarly_work_types, type: 'array', disabled: true
setting :geonames_username, type: 'string', default: ''
setting :geonames_username, type: 'string', default: ENV['HYKU_GEONAMES_USERNAME']
setting :gtm_id, type: 'string'
setting :locale_name, type: 'string', disabled: true
setting :monthly_email_list, type: 'array', disabled: true
Expand Down Expand Up @@ -159,7 +159,7 @@ def reload_library_config
config.contact_email = contact_email
config.analytics = google_analytics_id.present?
config.google_analytics_id = google_analytics_id if google_analytics_id.present?
config.geonames_username = geonames_username
config.geonames_username = geonames_username if geonames_username.present?
config.uploader[:maxFileSize] = file_size_limit
end

Expand Down
6 changes: 4 additions & 2 deletions config/locales/hyrax.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,8 @@ en:
description: A brief overarching description that applies to all works collected in this set. For example, "Theses and supplementary files created by the School of Earth Sciences graduate students."
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 <a href='http://www.geonames.org'>GeoNames web service</a>.
based_near: "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 <a href='http://www.geonames.org'>GeoNames web service</a>. Please note, you must configure your geonames username in the account settings, or this field will have a loading error.</br>
</br><b>Steps to enable this field:</b><br/>1. Create a free account on the <a href='http://www.geonames.org'>Geonames web service page.</a></br>2. Go to your <a href='http://www.geonames.org/manageaccount'>geonames account settings</a> and select the option at the bottom to enable free services.</br>3. Go into your hyku account settings in the <a href='/admin/account/edit?locale=en'>dashboard.</a></br>4. Enter your geonames username in the hyrax account settings.<br/>5. You should now be able to see the list of locations in this dropdown."
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. &quot;Smith, John.&quot;.
date_created: The date on which the collection was created.
Expand All @@ -1129,7 +1130,8 @@ en:
share_applies_to_new_works: When new works are created directly in the collection, grant sharing users and groups permissions for the new work according to their collection roles.
title: ""
defaults:
based_near: 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 <a href='http://www.geonames.org'>GeoNames web service</a>.
based_near: "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 <a href='http://www.geonames.org'>GeoNames web service</a>. Please note, you must configure your geonames username in the account settings, or this field will have a loading error.</br>
</br><b>Steps to enable this field:</b><br/>1. Create a free account on the <a href='http://www.geonames.org'>Geonames web service page.</a></br>2. Go to your <a href='http://www.geonames.org/manageaccount'>geonames account settings</a> and select the option at the bottom to enable free services.</br>3. Go into your hyku account settings in the <a href='/admin/account/edit?locale=en'>dashboard.</a></br>4. Enter your geonames username in the hyrax account settings.<br/>5. You should now be able to see the list of locations in this dropdown."
contributor: A person or group you want to recognize for playing a role in the creation of the work, but not the primary role.
creator: The person or group responsible for the work. Usually this is the author of the content. Personal names should be entered with the last name first, e.g. &quot;Smith, John.&quot;.
date_created: The date on which the work was created.
Expand Down

0 comments on commit fce8374

Please sign in to comment.