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

feat: Category translation #261

Closed
wants to merge 2 commits into from
Closed

feat: Category translation #261

wants to merge 2 commits into from

Conversation

dq18
Copy link
Collaborator

@dq18 dq18 commented Jan 30, 2024

What

  • call Searchalicious API to get list of category in local language
  • Will need to test on preprod server to check CORS issues
  • WIP

if (newVal && newVal.length > 0) {
this.category_loading = true
api
.getCategories(newVal, 'category', 10)
Copy link
Member

@raphodn raphodn Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on every new price(s) we fetch the categories ? this isn't ideal 😅

  • we could fetch them when the language is changed in the user settings (and put them in the store)
  • we could have the translations directly in the raw json

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe document some implementation solutions first in the corresponding issue ? #224

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the API is called:

  • once at page mount (with a simple query "a")
  • Everytime the user inputs something in autocomplete field. So for example if the user type "rad", it will call for "r", then "ra" and "rad"

The fetch returns a list of max 10 categories (max number can be changed) and this list will be shown in the autocomplete field.

I will list solutions in the issue

@dq18 dq18 linked an issue Jan 30, 2024 that may be closed by this pull request
@raphodn
Copy link
Member

raphodn commented Feb 4, 2024

Done in #273 & #275 & #276 instead

@raphodn raphodn closed this Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Translate raw product categories
2 participants