Bug in remove-default-locale Branch - Locale Switching Issue
Environment:
- Branch:
remove-default-locale
- Browser's Default Locale:
en
- Project's Default Locale:
de
Description:
There appears to be a bug affecting locale switching functionality. When the browser's default locale is set to English ('en') and the project's default locale is set to German ('de'), the following issue occurs:
Steps to Reproduce:
- Open the application with the browser's default locale set to 'en'.
- The first render redirects to '/en' (expected behavior).
- Attempt to switch to the German locale ('de') using the provided button.
Expected Behavior:
Upon clicking the switch button, the application should redirect to the '/de' route.
Actual Behavior:
The button does not work as intended. The redirectedPathName becomes '/' and the middleware interprets this as if no locale is found, resulting in a redirect back to the user's default locale ('en'). Consequently, switching to '/de' via the button is not possible.
Bug in
remove-default-localeBranch - Locale Switching IssueEnvironment:
remove-default-localeendeDescription:
There appears to be a bug affecting locale switching functionality. When the browser's default locale is set to English ('en') and the project's default locale is set to German ('de'), the following issue occurs:
Steps to Reproduce:
Expected Behavior:
Upon clicking the switch button, the application should redirect to the '/de' route.
Actual Behavior:
The button does not work as intended. The
redirectedPathNamebecomes '/' and the middleware interprets this as if no locale is found, resulting in a redirect back to the user's default locale ('en'). Consequently, switching to '/de' via the button is not possible.