-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: add missing sw-language-id header #1657
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@shopware/api-client
@shopware/api-gen
@shopware/cms-base-layer
@shopware/composables
@shopware/helpers
@shopware/nuxt-module
commit: |
why does API ignore the current session language set by |
It's not ignoring. The second tab request overrides this session language by a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a lot of work done down here 🔥 ⛑️ 🏅
TODO:
- fix breadcrumbs for navigation because it still mixes the languages (when I refresh the page on the different language in a second tab - breadcrumbs at the first tab is in a wrong language)
TO CONSIDER:
- as
languageIdChain
is broadly used now, it still tells nothing and the name might be confusing for developers, maybe we can alias it to something more clear and fancy? - maybe we can hook-in the apiClient instance and set
sw-language-id
globally for entire app?
Description
This pull request includes several changes to add the missing
sw-language-id
header property for API calls across multiple components and modules. The most important changes are grouped by theme as follows:API Header Updates:
sw-language-id
header property for API calls inuseCart
,useCategorySearch
,useCheckout
,useCustomerOrders
,useInternationalization
, anduseLandingSearch
composables. [1] [2] [3] [4] [5] [6]Import and Context Updates:
useSessionContext
in various files to accesslanguageIdChain
. [1] [2] [3] [4] [5] [6]Test Updates:
sw-language-id
header property for API call expectations inuseCart
,useCategorySearch
,useInternationalization
, anduseListing
components. [1] [2] [3] [4]Component-Specific Changes:
sw-language-id
header property inSwContactForm.vue
andApp.vue
components. [1] [2]closes #1651
Type of change
ToDo's
Screenshots (if applicable)
Additional context