ZORALab / Hestia

One Peaceful Frontend+Backend Software Library Suite.
https://hestia.zoralab.com
Other
19 stars 1 forks source link

Languaged-oriented redirection Always redirects to Default Language #54

Closed hollowaykeanho closed 1 year ago

hollowaykeanho commented 1 year ago

Description

Please provide a short description of what you have encountered below.

When deploying multiple languages redirection, it appeared that it always goes to the default language.

Expected Behavior

Please specify the expected behavior of your usage below.

Redirection will go to last visited language page; default if not available.

Current Behavior

Please specify the current behavior of software below.

Always goes into default language regardlessly.

Steps to Reproduce (COMPULSORY)

Please specify all the steps required to re-produce the problem.
  1. Deploy /en and /zh-hans english + mandarin pages.
  2. Set landing page / wtih language specific redirection.
  3. Visit /zh-hans page to save the last locale.
  4. Visit / page, observe should redirect towards /zh-hans page. However, it will be redirected to the default /en page instead.

Attachments

Please drag and drop the necessary data files (e.g. screenshot, logs, etc)
below.
hollowaykeanho commented 1 year ago

Bug confirmed. Caused by missing break in JS switch.

hollowaykeanho commented 1 year ago

fixed in 926d42640bf866c61e5f2600af2bc48b539b9537

hollowaykeanho commented 1 year ago

Released in https://github.com/ZORALab/Hestia/releases/tag/v1.0.0