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

Title of Metadata fields displaying on search page displaying inaccurately #469

Closed
4 tasks
jillpe opened this issue Jan 17, 2023 · 4 comments
Closed
4 tasks
Assignees

Comments

@jillpe
Copy link

jillpe commented Jan 17, 2023

Summary

In client meeting 1-17, Katharine confirmed the metadata fields being displayed hit expectations, however the title's were showing inaccurately, as "translation missing". See link for reference.

Acceptance Criteria

  • Title of metadata fields displayed on search page display like the 'Description' field

Before:
Image

Testing Instructions

  • Go to homepage
  • Click search button on search bar
  • The resulting entries should display correctly and should not display "translations missing"

After:
image

Notes

Implementation suggestion:

Find the view partial, and locate the mapping for the fields. It may look something like
en.helpers.action.importer.new

In the above example, you should be able to trace the mapping to the en locale file. Missing translation means that the mapping doesn't exist for that file, so you'll need to add one.

The last step is to run translations for the project, so that it can convert the newly added english mapping to all the languages the project supports. But you may run into a blocker on this part (and it's ok to create a separate ticket for this).

Our google account needed to do this doesn't have any money on it. Crystal posted a Q to Rob in slack for how to resolve this.

@ShanaLMoore
Copy link
Contributor

dev notes

We found the cause of the missing translation error, for the adventist search result page.
It’s because the field_names are the solr names, and dog_biscuits.yml keys are not.
ie: part_of_tesim vs part_of
I’m wondering if we should add the solr name equivalent to the yml and call it a day?
Or, is there’s a way to convert the solr name to not include the suffix? I hesitate there because there are many suffix possibilities.
We may be able to do the latter programmatically, by chopping off the suffix, if we identify the ones it wants.

@ShanaLMoore
Copy link
Contributor

We also noticed that there may be a dog biscuits auto loading issue, which could be the ultimate problem.

When we make a change to the catalog controller, the correct labels suddenly appear 🙃

/_[tesimb]+$/

DeonFranklin referenced this issue in scientist-softserv/adventist-dl Jan 30, 2023
Prior to this change, the applications specific translations were not loaded. Dogbiscuits were assuming the translations were already loaded.

Ref: #227
@DiemBTran
Copy link

This passes SoftServ QA: See attached screenshot.

tested on:

"translation missing" is no longer found on the search results page

Index Catalog Adventist Digital Library 2023-01-31 at 12 08 31 PM

@KatharineV
Copy link
Collaborator

I'm seeing the titles display properly across the board. Thanks!

@jeremyf jeremyf closed this as completed Feb 27, 2023
jeremyf referenced this issue 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 referenced this issue 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 referenced this issue 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 referenced this issue 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 referenced this issue 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 referenced this issue 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)
@kirkkwang kirkkwang transferred this issue from scientist-softserv/adventist-dl May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

6 participants