This repository has been archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Fixes search results page translations. #244
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prior to this change, the applications specific translations were not loaded. Dogbiscuits were assuming the translations were already loaded. Ref: #227
jeremyf
approved these changes
Jan 30, 2023
jeremyf
added a commit
to scientist-softserv/adventist_knapsack
that referenced
this pull request
Oct 5, 2023
Prior to this change, assuming my default translation was "en" when I called the following—`I18n.t('dog_biscuits.fields.date_issued')`—I would get `Translation missing: en.dog_biscuits.fields.date_issued`. We had added DogBiscuits into that path but we had not reloaded the back-end. Further, the catalog controller was no longer doing useful work. The `Rails.root` is `hyrax-webapp`; which would already be working. For more on this anti-pattern, see [Potential Issues Around Knapsack and Rails.root][1]. With this change, I have a small test to verify that dog biscuits translations are in fact loaded. Related to: - https://github.com/scientist-softserv/adventist-dl/issues/611 - https://github.com/scientist-softserv/adventist-dl/issues/227 - scientist-softserv/adventist-dl#244 [1]: #60)
jeremyf
added a commit
to scientist-softserv/adventist_knapsack
that referenced
this pull request
Oct 5, 2023
Prior to this change, assuming my default translation was "en" when I called the following—`I18n.t('dog_biscuits.fields.date_issued')`—I would get `Translation missing: en.dog_biscuits.fields.date_issued`. We had added DogBiscuits into that path but we had not reloaded the back-end. Further, the catalog controller was no longer doing useful work. The `Rails.root` is `hyrax-webapp`; which would already be working. For more on this anti-pattern, see [Potential Issues Around Knapsack and Rails.root][1]. With this change, I have a small test to verify that dog biscuits translations are in fact loaded. Related to: - https://github.com/scientist-softserv/adventist-dl/issues/611 - https://github.com/scientist-softserv/adventist-dl/issues/227 - scientist-softserv/adventist-dl#244 [1]: #60)
jeremyf
added a commit
to scientist-softserv/adventist_knapsack
that referenced
this pull request
Oct 5, 2023
Prior to this change, assuming my default translation was "en" when I called the following—`I18n.t('dog_biscuits.fields.date_issued')`—I would get `Translation missing: en.dog_biscuits.fields.date_issued`. We had added DogBiscuits into that path but we had not reloaded the back-end. Further, the catalog controller was no longer doing useful work. The `Rails.root` is `hyrax-webapp`; which would already be working. For more on this anti-pattern, see [Potential Issues Around Knapsack and Rails.root][1]. With this change, I have a small test to verify that dog biscuits translations are in fact loaded. Related to: - https://github.com/scientist-softserv/adventist-dl/issues/611 - https://github.com/scientist-softserv/adventist-dl/issues/227 - scientist-softserv/adventist-dl#244 [1]: #60)
jeremyf
added a commit
to scientist-softserv/adventist_knapsack
that referenced
this pull request
Oct 5, 2023
Prior to this change, assuming my default translation was "en" when I called the following—`I18n.t('dog_biscuits.fields.date_issued')`—I would get `Translation missing: en.dog_biscuits.fields.date_issued`. We had added DogBiscuits into that path but we had not reloaded the back-end. Further, the catalog controller was no longer doing useful work. The `Rails.root` is `hyrax-webapp`; which would already be working. For more on this anti-pattern, see [Potential Issues Around Knapsack and Rails.root][1]. With this change, I have a small test to verify that dog biscuits translations are in fact loaded. Related to: - https://github.com/scientist-softserv/adventist-dl/issues/611 - https://github.com/scientist-softserv/adventist-dl/issues/227 - scientist-softserv/adventist-dl#244 [1]: #60)
jeremyf
added a commit
to scientist-softserv/adventist_knapsack
that referenced
this pull request
Oct 6, 2023
Prior to this change, we had ensured knapsack's translations took precedence over Hyku's. However, that ensuring occurred at the after_initialize. We had missed the CatalogController's translation moment as well. When we specify the index fields in the CatalogController, blacklight caches those translations. However, in the case of dogbiscuits, those are not yet loaded. Which results in a translation error; even though we later load the dog biscuits translations. With this change, I have added two tests to: 1. verify that translations are correct for the catalog controller 2. that when the app boots, the Knapsack translations take precedence over Hyku. Related to: - https://github.com/scientist-softserv/adventist-dl/issues/611 - https://github.com/scientist-softserv/adventist-dl/issues/227 - scientist-softserv/adventist-dl#244 - #63 [1]: #60)
jeremyf
added a commit
to scientist-softserv/adventist_knapsack
that referenced
this pull request
Oct 6, 2023
Prior to this change, we had ensured knapsack's translations took precedence over Hyku's. However, that ensuring occurred at the after_initialize. We had missed the CatalogController's translation moment as well. When we specify the index fields in the CatalogController, blacklight caches those translations. However, in the case of dogbiscuits, those are not yet loaded. Which results in a translation error; even though we later load the dog biscuits translations. With this change, I have added two tests to: 1. verify that translations are correct for the catalog controller 2. that when the app boots, the Knapsack translations take precedence over Hyku. Related to: - https://github.com/scientist-softserv/adventist-dl/issues/611 - https://github.com/scientist-softserv/adventist-dl/issues/227 - scientist-softserv/adventist-dl#244 - #63 [1]: #60)
jeremyf
added a commit
to scientist-softserv/adventist_knapsack
that referenced
this pull request
Oct 12, 2023
Related to: - https://github.com/scientist-softserv/adventist-dl/issues/611 - https://github.com/scientist-softserv/adventist-dl/issues/227 - scientist-softserv/adventist-dl#244 - #63 - #60 Co-authored-by: LaRita Robinson <[email protected]>
jeremyf
added a commit
to scientist-softserv/adventist_knapsack
that referenced
this pull request
Oct 12, 2023
Related to: - https://github.com/scientist-softserv/adventist-dl/issues/611 - https://github.com/scientist-softserv/adventist-dl/issues/227 - scientist-softserv/adventist-dl#244 - #63 - #60 Co-authored-by: LaRita Robinson <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this change, the applications specific translations were not loaded. Dogbiscuits were assuming the translations were already loaded.
Ref: scientist-softserv/adventist_knapsack#469