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

Facet values linked to taxonomies should be translated using the taxonomy #120

Closed
alexgarel opened this issue Jun 4, 2024 · 2 comments · Fixed by #121 or #104
Closed

Facet values linked to taxonomies should be translated using the taxonomy #120

alexgarel opened this issue Jun 4, 2024 · 2 comments · Fixed by #121 or #104
Labels
✨ enhancement New feature or request

Comments

@alexgarel
Copy link
Member

alexgarel commented Jun 4, 2024

What

  • We currently display facets value as the normalized value, while we should display the translated value.
  • Facet values linked to taxonomies should be translated using the taxonomy

Part of

@alexgarel alexgarel added the ✨ enhancement New feature or request label Jun 4, 2024
@github-project-automation github-project-automation bot moved this to Todo (selected) in 🔎 Search-a-licious Jun 4, 2024
@alexgarel
Copy link
Member Author

I see two way to do that:

  1. simply keep a dict in memory that maps values to translation in the different languages
  2. use a key value database like leveldb or equivalent and update it on each taxonomy changes

First option might be memory consuming, and could take time to start-up.
Second option is nearly as fast, more efficient in memory and do not consume time at startup, but adds a dependency.

I considered the option to generate po files when we import taxonomies and use Babel to translate, but Babel is not memory efficient at all !

@alexgarel alexgarel moved this from Todo (selected) to In Progress in 🔎 Search-a-licious Jun 4, 2024
@alexgarel
Copy link
Member Author

Finally there is even simpler: using ES in one query to get all translated values.

@alexgarel alexgarel moved this from In Progress to 👁 Review in 🔎 Search-a-licious Jun 4, 2024
@github-project-automation github-project-automation bot moved this from 👁 Review to Done in 🔎 Search-a-licious Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
Archived in project
1 participant